How to use directed graph to judge whether flow chart is reachable

Hi !

I hava a question,

how to use directed graph to judge whether flow chart is reachable ?
20200601162659

Branch 2 behind the gateway has no end node and no error is reported
微信截图_20200601162756

It seems that there is only one end node in the canvas, no matter whether other branches have end nodes or not.

Thanks in advance for any suggestion.

Are you referring to bpmn-js-bpmnlint?

Hey,

If you’re refering to the directed graph as an abstract data strcture, we don’t provide an implementation of that data structure, however it is possible to create it from a bpmn diagram.

Please see this answer: Get Elements In the Order of Flow In Canvas

Once you have a Graph representing your process, you may use a path finding algorithm to check if there’s a path between two nodes (in your case start node: Task, end node: End process).

thanks for your answer, I solved it in anothor way

Hey,
I solved it in anthor way , thanks your suggestions

Mind sharing your solution so others can benefit?

2 Likes

I changed packed-config.js , made can validate UserTask node must have outgoing and incoming , alse other node.