AnsweredAssumed Answered

Is there a way to determine if the task was reassigned?

Question asked by Aleksey Bykov on Apr 13, 2017
Latest reply on Apr 13, 2017 by jearles

I have the multi-instance parallel workflow.


By using the Activiti ScriptTaskListener I write to the some aspect of the workflow-model.xml some details of the business process. For example, in the event "start" I write all assignees:


var assigneesNodeRefs = '';
for(var i = 0; i < bpm_assignees.size(); i++) {
    var assignee = bpm_assignees.get(i);
    assigneesNodeRefs += ' separator ' + assignee.nodeRef;
execution.setVariable('mswf_participants', assigneesNodeRefs);

In the event "complete" I write some another details:


var reviewDate = new Date();
var bpmComment = task.getVariable('bpm_comment');
var result;
if(task.getVariableLocal('mswf_reviewOutcome') == 'Approve') {
     result = 'Approve';



Then, by using the Alfresco Content Services REST API (tasks) I can get the list of variables for my task in JSON format.
Next, by using JavaScript, I can parse it and display various data tables in different places.


I'm interested in the ability to reassign assignees.


Let's say, if "assignee_1" reassigns his task to "assignee_2", I want to write this fact In the Activiti ScriptTaskListener.


Is it possible?..


I would be very grateful for the information. Thanks to all.