Find out TaskId automatically

I wanna make a REST call to get the Variables from an active task automatically.
The REST call for that would be:

GET /task/anId/form-variables

I know how to get the ID manually by using

GET /task?processDefinitionKey=processID

and find the active task from there.

But for my Usecase, I would need a way to automate that process and parse the ID automatically into the REST call.

Is there any way to do that?
Thanks in advance :slight_smile:

Hello @Patrick_Unverricht,
You’ll have to do a task query first (whether by Get List or Get List(POST)), and then for the found task id(s) fetch the form-variables. There is no combined call. Be aware, that a process instance might have several active user tasks at a time! So you should filter down to a certain user task definition key (depends on your requirements).
It is easy to automate, you can parse the response from the task query call for the taskId(s) and then for each taskId fetch the variables.

Best, McAlm

1 Like