cancel
Showing results for 
Search instead for 
Did you mean: 

New task ID

aurelienpel
Champ in-the-making
Champ in-the-making
Hello !

In the REST API, when I move in my workflow from a task to another one thanks to the task action :

POST runtime/tasks/{taskId}

Complete a task - Body JSON:

{
  "action" : "complete",
  "variables" : …
}

I would like to retrieve the id of the new task, how can I do please ? At the beginning I thought it was possible with the success response body, but it is with the old id, and not the new one.

Thanks

Aurelien
3 REPLIES 3

trademak
Star Contributor
Star Contributor
Correct, you need to do a task query REST call to get the new task id.

Best regards,

aurelienpel
Champ in-the-making
Champ in-the-making
Yes, I thought about it, but if several persons are working with the same instance, how do you know which new task ID is yours ?

aurelienpel
Champ in-the-making
Champ in-the-making
Ok, sorry my bad, I've just understood my mistake, or at least in my example, I will retrieve the new task id thanks to the current process instance.
Thanks a lot !