summaryrefslogtreecommitdiff
path: root/examples/statemachine/librarybookstate.pystate
diff options
context:
space:
mode:
authorptmcg <ptmcg@austin.rr.com>2018-12-31 13:10:59 -0600
committerptmcg <ptmcg@austin.rr.com>2018-12-31 13:10:59 -0600
commite177e2feed1bfbe29f32c3378978313d19ce1c26 (patch)
tree45eed16a9965597827d8dc2031b1012d222fc842 /examples/statemachine/librarybookstate.pystate
parent5132a91c470a8b6c34c7f0525c0bf41b9365e817 (diff)
downloadpyparsing-git-e177e2feed1bfbe29f32c3378978313d19ce1c26.tar.gz
Add document signoff and library book state examples;
Diffstat (limited to 'examples/statemachine/librarybookstate.pystate')
-rw-r--r--examples/statemachine/librarybookstate.pystate19
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