Retrieve main path in bpmn

how to retrieve only the main path of bpmn model in a list with node js?

What do you mean by main path? Please describe also your use case.

i mean i want retrieve only the activities of normal sequence without the activities of alternative gateway paths

So you mean the happy path in other words.

This is not possible with our toolkit. How would you determine, what the happy path is? There is more runtime context needed to get that. What you could do, in terms you know the element ids for the happy path, is to get all elements via the element registry module.

If you grab the start event from the element registry, you can traverse the process via elements’ outgoing and incoming properties. Please read the source code of @philippfromme’s famous token simulation project to learn how this can be implemented.

i want retrieve only the activities of normal sequence why is not possible ?

thank you @barmac il will try it

1 Like

It’s because there is no “normal sequence”.

ah ok i want create list without the gateway paths i want eliminate the gateway paths

For further assistance, please share a CodeSandbox that reproduces your issue in a way that we can inspect it.

1 Like