cancel
Showing results for 
Search instead for 
Did you mean: 

Reassign task in Alfresco Javascript

sokolko
Champ in-the-making
Champ in-the-making
Hello, all!
I've searched across the web, but I still can't find a way to reassign a task to the specified user. I need something like "Reassign" button, but done with my own script during the workflow. Maybe anyone has any idea, how this can be done in Alfresco?
1 REPLY 1

robin
Champ in-the-making
Champ in-the-making
Hi Sokolko,

Reassignment of a task is possible by having a condition in the user Task itself.
For Eg: You can have a condition in the task "Reassign : Yes/No" and based on the selection route the flow of the task accordingly.
The listener code in the user task can be like:
check_CUN01=task.getVariable('reassign_check_CUN01');
execution.setVariable('reassign_check_CUN01',check_CUN01);
and the main config of the conditions can be:
${reassign_check_CUN01=='No'}  [flow should route to next user]
${reassign_check_CUN01=='Yes'} [flow should route to the person whom task should be reassigned]

This way you can reassign the task to a user based on the condition.

Regards,
Robin