REST-API: List tasks for a process-definition

is it possible to show all tasks where “I” am assignee or candidate user for a process-definition? I could only find the REST “call” /process-definition/ and get all active tasks with /task.

Best Regards

You can use query parameters in your rest call to ask for tasks for a specific assignee or process definition.
This example might be useful.

Hi thanks for that fast response :slight_smile:
I thought with /task I get only all open tasks. I need to get all tasks defined in a process-definition.

All tasks including those that have been completed?

If i designed and deployed a workflow “Test-WF” with task 1: assignee A and task 2: assignee B, I got a bpm file which I can access through /process-definition/Test-WF1-id.

Now, I want to read the tasks for this process-definition and determine if tasks are assigned to a user (no matter of instanced tasks).

I hope I could clarify my issue now :slight_smile:

You can do that with the rest endpoint that Niall mentioned.

Just append the two parameters in your request:

  • processDefinitionKey=Test-WF
  • unassigned=true

This will give you all tasks which are unassigned for the given processDefinitionKey.

Doesn’t that endpoint only work for process instances? I think this question is regarding how to query task definitions using a process definition that may or may not have any running instances.

Also it appears the task endpoint only returns tasks that are open, or that have been already reached by the process. I can’t figure out any way to return task definitions, even from a running process instance. Only the tasks that have been reached are returned, but I would really like to query on the task definitions defined on the process.

I have a similar use case where I would like to query the definition for all the user task definitions present in the definition of the process.

Hi @rvinzent
Welcome to the forum.
This topic is 4 years old, so maybe it would be better if you start a new topic where you can explain your problem in detail and we can try to find a solution for you.

I’m going to lock this topic for now.