Description
The “Infinite Loop” is a BPM anti-pattern that runs indefinitely because either a termination condition is missing or the condition is never fulfilled. It is a specific type of cyclic dependency. The key distinction is that, unlike typical cyclic dependencies where the process flow can exit the cycle after a certain number of iterations, in this situation, the process is trapped in an infinite loop with no opportunity for termination. If the execution is not aborted externally, then it will run forever.
Context
Derived from: “Infinite Loop” BPM anti-pattern.
Consequences
Process does not end and may result into a lot of iterations before we can find the infinite loop.
Detection
We can consider two possible cases in the ArchiMate modeling language. In the first case, we assume the Infinite Loop is a small sub-graph with at least one cyclic path and no exiting edges that can escape from the loop. In the second case, there could also be an edge that can escape the loop, but the process will never go through that edge for different reasons. For example, the condition is never met. We can not detect the second case via the KG query, and a dynamic analysis is required.
Cypher query
MATCH (a) WITH collect(a) AS nodes CALL apoc.nodes.cycles(nodes, {maxDepth: $maxDepth}) <br /> YIELD path WITH path AS p <br /> WITH nodes(p) AS loopSet <br /> WHERE NOT EXISTS{ <br /> MATCH (a)--(b) <br /> WHERE a IN loopSet AND NOT b IN loopSet <br /> } <br /> Match p=(m)--(n)<br /> WHERE m IN loopSet AND n IN loopSet return pDiagram

Tags
Process, Control-flow Problems
Query parameters
[
{
"name": "maxDepth",
"type": "number",
"default": 5,
"description": "The maximum length of the path for detection."
}
]