0

Alfresco 5.1 Enterprise.
I have a JS-script that outputs all nodeRef and active instances for given aspect.
I want modify the script to display details of active tasks associated with these instances:

  • name of active task,
  • assigned user/group,
  • task deadline.

My script:

var def = {
    query: "ASPECT:'cont:overdue'",
    language: "fts-alfresco"
};

var nodes = search.query(def); 

for each(var node in nodes) {
    
    // get nodes information
    print('NodeRef: ' + node.nodeRef);  
    
    // get active instances
    activeWorkflows = node.activeWorkflows;
    activeWorkflowsLen = activeWorkflows.length;
    for (i = 0; i < activeWorkflowsLen; i += 1) {
    instance = activeWorkflows[i];
    print("instance: " + instance.getId());
    }
}
ERemarque
  • 497
  • 3
  • 16
  • You need to use WorkflowService to get all those details. I think you need to use Java based webscript to get those data. – Sanjay Sep 19 '22 at 16:44

0 Answers0