cancel
Showing results for 
Search instead for 
Did you mean: 

Use assignee from previous user task

wblancqu
Champ in-the-making
Champ in-the-making
Hi guys,

Imagine following workflow:

Start –> User task 1 –> User task 2 –> End

Assume User task 1 has a candidate group. We want to assign User task 2 automatically to the same user who claimed and completed User task 1.

Is there any way to achieve this without using custom Java code (so using expressions in task listeners for example).

Thanks!
2 REPLIES 2

wblancqu
Champ in-the-making
Champ in-the-making
Ok guys, already found a solution, but maybe you can point me out to a simpler one.

I'm using a org.activiti.engine.impl.bpmn.listener.ScriptTaskListener @complete event and use groovy script to assign task.getAssignee() to a variable. I re-use this variable in the assignee field of subsequent tasks.

Can this be done even easier?

jbarrez
Star Contributor
Star Contributor
You are correct: using a task listener + storing the variable (and using that variable in an expression later on) is the way to go.