use of org.alfresco.repo.jscript.ValueConverter in project alfresco-repository by Alfresco.
the class JscriptWorkflowInstance method getPaths.
/**
* Get all paths for the specified workflow instance
*/
public Scriptable getPaths() {
WorkflowService workflowService = serviceRegistry.getWorkflowService();
List<WorkflowPath> cmrPaths = workflowService.getWorkflowPaths(this.id);
ArrayList<Serializable> paths = new ArrayList<Serializable>();
for (WorkflowPath cmrPath : cmrPaths) {
paths.add(new JscriptWorkflowPath(cmrPath, this.serviceRegistry, this.scope));
}
Scriptable pathsScriptable = (Scriptable) new ValueConverter().convertValueForScript(this.serviceRegistry, this.scope, null, paths);
return pathsScriptable;
}
Aggregations