Get all elements under all processes in Sequence

Hi,

I would like to ask for your help regarding how does the token simulation gets the sequence flow of multiple process. I need the list of all elements under each proccess by its sequence. Hoping for your kind help.

Thanks,
Erwin

@philippfromme Can you please have a look at this?

Please describe in clear terms what you are trying to achieve.

I would like to get all elements under all ‘Process’ and ‘Sub-process’ by it’s sequence

I still don’t understand the question. What are you referring to as it’s sequence?

For example. I have a ‘Process’ which has 3 ‘Sub-Process’. What i mean by it’s sequence is once ‘Process’ is executed what ‘Sub-Process’ will be next. Just like how Token Simulation works.

Okay, I understand your question now. This is not trivial. What have you done already to achieve this?

Well i just browsed to all methods that can be executed in ‘modeler.get([sample_method])’. Also just understand that Token Simulation uses all ‘processInstances’. But can’t get through on how this is getting values

Out of the box bpmn-js doesn’t provide any information other than the bare elements themselves which you can retrieve using the elementRegistry.

bpmn-js-token-simulation builds on top of that and introduces the processInstances feature. This won’t be of any use for you if you don’t want to use the simulation.