Skip to content

Add workflow graph generation functionality #30

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

Merged
merged 7 commits into from
Jun 20, 2025

Conversation

oEscal
Copy link
Contributor

@oEscal oEscal commented Jun 20, 2025

This pull request implements feature #29.
It uses the Python transitions library, creating a state machine representing the given workflow. From that state machine, it can generate a graph using graphviz or the corresponding Mermaid code (as with the TypeScript SDK). By generating a state machine, it gives more flexibility to programmers to have more observability into the workflow itself programmatically.
Apart from generating a state machine and the corresponding graph, this implementation adds new features in relation to the TypeScript SDK one:

  • If the developer decides to do so, it also gets all the functions and their transitions related to actions inside a state. Therefore, the developer can create a graph that not only represents the workflow states and their interconnections, but also the actions and transitions of each state;
  • It can build the state machine and corresponding graph for workflows with subflows. The subflow will be generated as a nested state of the corresponding state/action.

oEscal added 4 commits June 18, 2025 17:03
…g graphs in mermaid and pygraphviz

Signed-off-by: Pedro Escaleira <pedroescaleira@hotmail.com>
Signed-off-by: Pedro Escaleira <pedroescaleira@hotmail.com>
Signed-off-by: Pedro Escaleira <pedroescaleira@hotmail.com>
Signed-off-by: Pedro Escaleira <pedroescaleira@hotmail.com>
Copy link
Member

@cdavernas cdavernas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

oEscal added 2 commits June 20, 2025 19:28
Signed-off-by: Pedro Escaleira <pedroescaleira@hotmail.com>
Signed-off-by: Pedro Escaleira <pedroescaleira@hotmail.com>
@oEscal oEscal requested a review from cdavernas June 20, 2025 18:41
Copy link
Member

@cdavernas cdavernas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Cheers ❤️

@cdavernas cdavernas merged commit be7b641 into serverlessworkflow:main Jun 20, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants