Task LIstener in User Task

Hi everyone, I want to ask you some explanations about the lifecycle of Event Type category inside Task Listeners (User Task). I start a process and assing to the User Task a task Listener of type create. When the user manage to complete the task he has to wait 30s and then move to the next task. My question is: why if I put create in the Task Listener of the second task it gives me an error, but if I put update it’s ok? There is a pathway that I have to follow to assign create/update/completed ecc?

I want to specify that the error appears because I’m executing external groovy files and recall them inside task listener, and the errors starts when I arrive to the second task, for the first is ok (and I execute the same code for both of them).

Thank you,

Hey there @Elena_Jackson! :wave:
Can you maybe share this in a simplified BPMN diagram?

I understood that you are having two user tasks which both have a create listener. Usually I would not expect that this leads to a problem.
It would also be interesting to see how you are calling the external Groovy scripts in both listeners. :thinking:

Looking forward to some further insights.

Hi @Elena_Jackson,

you can find more details on the Usertask event lifecycle here: Delegation Code | docs.camunda.org

Hope this helps, Ingo


Hi, so I have these 2 processes. The problem is that: for the first image you can see that I have the first
User Task “Respirazione Consapevole” with a clock that activates the Reminder above. Inside the Task
I add ax external script in Groovy and it works. In the second image I have a parallel gateway with 3 User Tasks that start in parallel. The problem is that the Groovy script that I added doesn’t work for them. The script simply says to assign the current Username as Assignee so I can assign indirectly tasks to any User when they log. I manage the script but the best result that I obtained is the assignment to the User only to one task, while the others remain without the name of the user.
Thank you in advance,

Thank you so much!