Dynamically obtain the taskId of the previous step for the current user task

Hello, using the API taskService. complete to transfer the process, how can the user task node obtain the taskId of the current task in the next step? Try using variable methods, but if encountering parallel situations or more complex and intermediate events, there may be problems. What is a good solution

Hello my friend!
Welcome!

If I understand your need correctly…

A solution that I can give you quickly that will perhaps help you…

You could, for example, in the previous task, create an execution listner "END", to search for the taskID of this current task and save it in a variable… and use this variable in the next task…

You could do this in all your tasks, so you would always have the process variable “taskId” updated with the id value of the previous task to use in the next one.

William Robert Alves