Fetching task name from active process instances

Hi Everyone,

  • We have a requirement like, when i initiate a workflow and completed the userTask “A”, then the user wanted to know what is the next step/activity from the current process instance. For example, then engine should return from the process instance as “B”.

  • Is it possible to get what’s the next activity from the running process instance once completion upon of previous activity or making new rest api call to fetch what’s the next activity in the current running process instance?

You have to parse the Bpmn XML or use the model api to get the sequence flows / flow nodes that are leaving the task. But you will have to add logic handling for things like gateways and subsequent non human tasks that are in between the current task and subsequent user task.

Search the forums for info on determine the next task such as Get / Preview next task

@StephenOTT my use case is like when token arrives at specific activity, i have to read the name of that acitvity which holds the token in runtime.

Fetching activity names from bpmn model is like reading static flow.

You would need to run a second query to get the new task(s) that are available. So you complete your activity, and then perform a new query for the task(s) that are now available to the user.

From the rest api, it would be two queries: 1. complete tasks. 2. get tasks

1 Like