AnsweredAssumed Answered

get BPMN Elements in order

Question asked by zohaibjabbar on Feb 24, 2016
Latest reply on Feb 29, 2016 by zohaibjabbar

I would like to get all Flow Elements in the same order as they appear in the diagram. Currently, I am retrieving list of flow elements like this:

List<FlowElement> elements = model.getMainProcess().getFlowElements()

However, the order of elements is not the same as it is in the BPMN Diagram.

I was thinking to write my own function and order the elements based on the value of source and target of sequence flows. But is there any way I can get elements in order using Activiti functions?