Task stage within process

Hi,

When one retrieves a process task with for example code like:

final List tasks = taskService.createTaskQuery().active().list();
Task task = tasks.get(0);

How does one then identify at which stage/step of the process the specific task is at?

I’m new to flowable and any help would be greatly appreciated.

Thanks.

  • Adrian.

BPMN does not have the concept of a stage.
If you want to get the corresponding element in the BPMN model, get the BpmnModel through the repositoryService, and get the FlowElement (which will be a UserTask) by passing the id (which is stored under the taskDefinitionKey property in the task you get in the query above).

Hi Joram,

Thanks for your answer - most helpful, I can now proceed.

Thanks.

  • Adrian.