-
-
Notifications
You must be signed in to change notification settings - Fork 103
Closed
Labels
Milestone
Description
Event has human readable name, but graph labels do not use it. Is it possible to fix it?
from statemachine import StateMachine, State, Event
from statemachine.contrib.diagram import DotGraphMachine
class ExampleStateMachine(StateMachine):
active = State(name='Active Human Text', initial=True)
suspended = State(name='Suspended Human Text', final=True)
suspend = Event(
active.to(suspended),
name="Human Suspend",
)
graph_machine = DotGraphMachine(ExampleStateMachine)
g = graph_machine()
g.write_png('example.png')
Thank you for this nice library!
Reactions are currently unavailable