I am developing custom advanced workflows. I need to get the active workflow instance in a workflow listener (task script). I have used the code below that gets a list of the active workflow instances. But how can I get the specific instance for the current task?
var workflowDef = workflow.getDefinition("activiti$" + task.processDefinitionId);
var activeinstanceslist=workflowDef .getActiveInstances();