Open Ibukun2021 opened 3 years ago
fsm_draw_state_diagram
class
option refers to the full dotted path (project.module:ClassName) where the State Machine can be foundinitial_state
is optional -- can be used to specify the initial state of the FSMHave you tried cloning this repo and running the example command from the project root in a virtual environment where finite-state-machine
is installed?
Hello,
I am not really clear on the 'fsm_draw_state_diagram' command and how to generate a state diagram after implementing your State Machine code. I am trying to generate a state machine diagram for the code below using your implementation. The comment below from one of the documentations wasn't really clear to me and it reads thus: ................................................................................................................................................................................................................................................................... "State Machine workflows can be visualized using a state diagram. finite-state-machine generates diagrams using Mermaid Markdown syntax, which can be viewed using the Mermaid Live Editor. Use the fsm_draw_state_diagram command and point to State Machine workflow class that inheritences from StateMachine.
class parameter is required
$ fsm_draw_state_diagram --class examples.turnstile:Turnstile
initial_state parameter is optional
$ fsm_draw_state_diagram --class examples.turnstile:Turnstile --initial_state close .................................................................................................................................................................................................................................................................
How do I go about this? I already have my code written up. Just need to finish up with the visualization of the state diagram. Will appreciate any help.