
NOTICE: All information contained herein is, and remains
the property of TechnoCore.
The intellectual and technical concepts contained
herein are proprietary to TechnoCore and dissemination of this information or reproduction of this material
is strictly forbidden unless prior written permission is obtained
from TechnoCore.
The WorkflowVisual class is a specialized tool for generating visual representations of workflows. It extends the base Workflow class to provide methods that can render a workflow's structure and execution path into diagrams. This is crucial for understanding, debugging, and documenting complex business processes.
The class supports two main visualization formats:
visualise(...)Generates a state diagram of a workflow in the Mermaid format. This method can highlight the actual path taken during a specific execution by coloring the nodes that were traversed. This is particularly useful for debugging and analyzing the results of a simulation run.
visualise_piper(...)Creates a more detailed process diagram using the ProcessPiper library. This method organizes the workflow nodes into pools and lanes based on their function and actor, providing a clear and structured view of the process. This is ideal for documentation and for understanding the roles and responsibilities within a workflow.
visualise_all()A utility method that iterates through all defined workflows in the current package and generates both Mermaid and ProcessPiper diagrams for each one.
The class provides a command-line interface using typer for easy generation of diagrams.
visual: Generates a Mermaid diagram for a specific workflow, optionally highlighting a given execution path.piper: Generates a ProcessPiper diagram for a specific workflow.visualall: Generates both types of diagrams for all workflows in the package.preflight: Runs pre-flight checks to ensure the environment is set up correctly for visualization.