Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to apply policies to microflows #5

Open
xiwenc opened this issue Apr 10, 2024 · 3 comments · Fixed by #8
Open

Ability to apply policies to microflows #5

xiwenc opened this issue Apr 10, 2024 · 3 comments · Fixed by #8
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@xiwenc
Copy link
Contributor

xiwenc commented Apr 10, 2024

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.

@xiwenc xiwenc added enhancement New feature or request help wanted Extra attention is needed labels Apr 10, 2024
@xiwenc
Copy link
Contributor Author

xiwenc commented Apr 15, 2024

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.

@xiwenc
Copy link
Contributor Author

xiwenc commented Apr 19, 2024

mendix microflow conversion - Frame 1 (5)
mendix microflow conversion - Frame 4
mendix microflow conversion - Frame 3
mendix microflow conversion - Frame 2
Above is the rough idea for dealing with loops.

@xiwenc xiwenc linked a pull request Apr 19, 2024 that will close this issue
@xiwenc xiwenc closed this as completed in #8 Apr 19, 2024
@xiwenc xiwenc reopened this Apr 19, 2024
@xiwenc
Copy link
Contributor Author

xiwenc commented Apr 19, 2024

Closed by accident. Basic has been implemented; but we still want to have looping :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant