cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow: How to modify an assigned person in a task when the workflow has been initiated.

apagulayan_
Champ on-the-rise
Champ on-the-rise

I have a workflow which has been initiated. Is it possible to change the name of the person assigned in a particular task or node? What is the best way to do it?

5 REPLIES 5

Mariana_Cedica
Star Contributor
Star Contributor

Actually the best way is to modify the workflow definition and to use the "Compute additional assignees" field when defining the task assignees on the General task tab. This allows you to dynamically compute the task assignees from a MVEL expression when the workflow is run. For example, you could have a global workflow variable, "assignees" that can be set from a automation chain at any point during the workflow. In this case, the expression to use on the workflow definition for the additional assignees would be :"@{WorkflowVariables["assignees"]}". Of course, this solution doesn't work for a workflow already started.

Actually, we have already a global workflow variable called "collationneur-chef". We created an automation chain and associated it to a button. In this operation chain, we assigned a new value for the variable "collationneur-chef". However, the original value was not modified after the user clicked on the button "Change collationneur-chef".

Just to verify my comment, we have a global variable that is used in "Compute additional assignees". However, we could not change the value using the automation chain.

Are you using the SetWorkflowVariable operation ( available under the WorkflowContext category )?

milonette_
Star Collaborator
Star Collaborator

Hello,

We have also this problem.

We need to change a task affectation during workflow running.

And got "org.nuxeo.ecm.platform.routing.api.exception.DocumentRouteException: Executing unexpected SUSPENDED state" when trying to reaffect to an other person.