Traversal of BPMN Elements using BFS , DFS or any Path Traversal Algorithm

How can i traverse and find the number of paths in a diagram containing the PARALLEL gateways using any of the Path traversal Algorithm .
For Example : Consider the Diagram below :
ParallelDecNodes
As per the regular algorithms , there are 3 path generated

  1. s0->t0->go->t2->f2
  2. s0->t0->go->t1->g1->t4->f1
  3. s0->t0->go->t1->g1->t3-> f0

But as per the BPMN rules , there can only be two paths ie:

  1. s0->t0->go->
    (t1->g1->t4->f1)
    (t2-f2)
  2. s0->t0->go->
    (t1->g1->t3-> f0)
    (t2-f2)

How can i achieve this ?

What algorithms are you talking about?

Breadth First Search Algorithm , Depth First Search or Dijkstra’s. Any graph traversal algorithm .

I guess you’d have to change the algorithm. I’m afraid I can’t help you with this as I’m not an expert.

How do we traverse a BPMN Diagram ???

You can do

const definitions = modeler.getDefinitions():

!!!

@Shruthi

You need know how to jump from a to b? or from a => b => c => end?

I’m working on a similar issue. Did you ever find a solution to this?