Search code examples
javarestbpmncamunda

Retrieve a list of all tasks that are part of a process-definition via Camunda's Rest API


I am working on an application where I would like to show the user an interface that shows them the process they need to complete and highlights where in that process they currently are. I cannot seem to find a REST API that would give me this type of information.

For example, workflow has 4 steps, they have completed Step 1 and it is now in Step 2.

> Step 1 > Step 2 > Step 3 > Step 4

I am able to get the current task Step 2 for a user via the /task endpoint, and I can get Step 1 from the /history/task endpoint, but I can't seem to get Step 3 and Step 4. I could pull the xml from the respective endpoint and parse it, but that seems overkill.

Am I missing something?


Solution

  • The bpmn.io option listed will provide a list of tasks, however in my experience this doesnt really represent the "Milestones" of a process. Generally it is the milestones that users want to see. For example, in a loan origination process there may be 30 user tasks with multiple levels of approval. Clients dont want to see each task, what they want to see is the stage of the process they are at. e.g. initiation, underwriting, fulfillment etc, etc.

    If this is what you are looking for, I would recommend you maintain a variable in the process instance that holds the current milestone in the process.

    I tend to use "none" message throw events with an associated listener to set the milestone.

    I'm not saying the original answer is not correct, but in my experience, this is not really what end users really want to see.

    Hope this helps, Greg