I need some help with a Graph that may have a looping path.
The graph is built in jsPlumb, but I’d also be happy to get a general idea of the solution.
The graph represents some flow/path for incoming phone call.
Each node represents an action to be triggered and can have [0,1,2,…] next and/or previous nodes.
The issue is to check that all possible paths from the starting node to the last node contain, at least, one specific node (by action type).
For example: each Call was assigned to some Model before other actions were activated.
Recursion from end nodes failed in case of a path loop. And I have no idea how to solve this problem