Closed xiwenc closed 1 month ago
The current approach is:
Convert the directed cyclic graph to a directed acyclic graph. Whenever we encounter a merge, we will do a backtrack walk to check if it is cycle. If it is, we stop at the merge, mark it as a loop. This loop is then recorded as such in the list of loops.
Above is the rough idea for dealing with loops.
Closed by accident. Basic has been implemented; but we still want to have looping :)
Use case
We would like to be able to implement policies that checks anatomy of microflow implementations. Like avoid commit inside of a loop.
Solution
translate the flows into nested dictionaries. Dictionaries (objects) and lists can be processed easily by OPA. If we convert to some human-readable pseudo code, OPA might not be able to parse it efficiently.