diff options
Diffstat (limited to 'examples/statemachine/librarybookstate.pystate')
-rw-r--r-- | examples/statemachine/librarybookstate.pystate | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/statemachine/librarybookstate.pystate b/examples/statemachine/librarybookstate.pystate new file mode 100644 index 0000000..24f07ed --- /dev/null +++ b/examples/statemachine/librarybookstate.pystate @@ -0,0 +1,19 @@ +# +# librarybookstate.pystate +# +# This state machine models the state of books in a library. +# + +statemachine BookState: + New -(shelve)-> Available + Available -(reserve)-> OnHold + OnHold -(release)-> Available + Available -(checkout)-> CheckedOut + CheckedOut -(checkin)-> Available + + # add states for restricted books + New -(restrict)-> Restricted + Available -(restrict)-> Restricted + Restricted -(release)-> Available + Restricted -(checkout)-> CheckedOutRestricted + CheckedOutRestricted -(checkin)-> Restricted |