Spring Statemachine - Reference Documentation

Authors

Janne Valkealahti

1.2.0.RC1

Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.


Table of Contents

Preface
I. Introduction
1. Background
2. Usage Scenarios
II. Getting started
3. System Requirements
4. Modules
5. Using Gradle
6. Using Maven
7. Developing your first Spring Statemachine application
III. What’s New
8. In 1.1
9. In 1.2
IV. Using Spring Statemachine
10. Statemachine Configuration
10.1. Using enable annotations
10.2. Configuring States
10.3. Configuring Hierarchical States
10.4. Configuring Regions
10.5. Configuring Transitions
10.6. Configuring Guards
10.7. Configuring Actions
10.7.1. State Actions
10.7.2. Transition Action Error Handling
10.7.3. State Action Error Handling
10.8. Configuring Pseudo States
10.8.1. Initial State
10.8.2. Terminate State
10.8.3. History State
10.8.4. Choice State
10.8.5. Junction State
10.8.6. Fork State
10.8.7. Join State
10.8.8. Exit/Entry Point States
10.9. Configuring Common Settings
10.10. Configuring Model
10.11. Things to Remember
11. State Machine Factories
11.1. Factory via Adapter
11.1.1. Adapter Factory Limitations
11.2. State Machine via Builder
12. Using Deferred Events
13. Using Scopes
14. Using Actions
14.1. SpEL Expressions with Actions
15. Using Guards
15.1. SpEL Expressions with Guards
16. Using Extended State
17. Using StateContext
17.1. Stages
18. Triggering Transitions
18.1. EventTrigger
18.2. TimerTrigger
19. Listening State Machine Events
19.1. Application Context Events
19.2. State Machine Listener
19.3. Limitations and Problems
20. Context Integration
20.1. Method Parameters
20.2. Transition Annotations
20.3. State Annotations
20.4. Event Annotation
20.5. State Machine Annotations
20.6. Extended State Annotation
21. State Machine Accessor
22. State Machine Interceptor
23. State Machine Security
23.1. Configuring Security
23.2. Securing Events
23.3. Securing Transitions
23.4. Securing Actions
23.5. Using Security Attributes and Expressions
23.5.1. Generic Attribute Usage
23.5.2. Generic Expression Usage
23.5.3. Event Attributes
23.5.4. Event Expressions
23.5.5. Transition Attributes
23.5.6. Transition Expressions
23.6. Understanding Security
24. State Machine Error Handling
25. Persisting State Machine
25.1. Using StateMachineContext
25.2. Using StateMachinePersister
25.3. Using Redis
26. Spring Boot Support
26.1. Monitoring and Tracing
26.2. Repository Config
27. Monitoring State Machine
28. Using Distributed States
28.1. ZookeeperStateMachineEnsemble
29. Testing Support
30. Eclipse Modeling Support
30.1. Using UmlStateMachineModelFactory
30.1.1. StateMachineComponentResolver
30.2. Creating Model
30.3. Define States
30.4. Define Events
30.4.1. Defer Event
30.5. Define Transitions
30.6. Define Timers
30.7. Define Choice
30.8. Define Junction
30.9. Define Entry/Exit
30.10. Define History
30.10.1. Shallow
30.10.2. Deep
30.10.3. Default
30.11. Define Fork/Join
30.12. Define Actions
30.12.1. Initial Action
30.13. Define Guards
30.14. Define Bean Reference
30.15. Define SpEL Reference
30.16. Using Sub-Machine Reference
31. Repository Config Support
31.1. JPA
31.2. Redis
31.3. MongoDB
V. Recipes
32. Persist
33. Tasks
VI. State Machine Examples
34. Turnstile
35. Showcase
36. CD Player
37. Tasks
38. Washer
39. Persist
40. Zookeeper
41. Web
42. Scope
43. Security
44. Event Service
45. Deploy
46. Order Shipping
47. JPA Config
48. Monitoring
VII. FAQ
49. State Changes
50. Extented State
VIII. Appendices
A. Support Content
A.1. Classes Used in This Document
B. State Machine Concepts
B.1. Quick Example
B.2. Glossary
B.3. A State Machines Crash Course
B.3.1. States
B.3.2. Pseudo States
Initial
End
Choice
Junction
History
Fork
Join
B.3.3. Guard Conditions
B.3.4. Events
B.3.5. Transitions
Internal Transition
External vs. Local Transition
B.3.6. Actions
B.3.7. Hierarchical State Machines
B.3.8. Regions
C. Distributed State Machine Technical Paper
C.1. Abstract
C.2. Intro
C.3. Generic Concepts
C.4. ZookeeperStateMachinePersist
C.5. ZookeeperStateMachineEnsemble
C.6. Distributed Tolerance
C.6.1. Isolated Events
C.6.2. Parallel Events
C.6.3. Concurrent Extended State Variable Changes
C.6.4. Partition Tolerance
C.6.5. Crash and Join Tolerance
51. Developer Documentation
51.1. StateMachine Config Model