Spring Statemachine - Reference Documentation

Authors

Janne Valkealahti

1.2.8.RC3

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 ID
11.1. With @EnableStateMachine
11.2. With @EnableStateMachineFactory
11.3. With StateMachineModelFactory
12. State Machine Factories
12.1. Factory via Adapter
12.1.1. Adapter Factory Limitations
12.2. State Machine via Builder
13. Using Deferred Events
14. Using Scopes
15. Using Actions
15.1. SpEL Expressions with Actions
16. Using Guards
16.1. SpEL Expressions with Guards
17. Using Extended State
18. Using StateContext
18.1. Stages
19. Triggering Transitions
19.1. EventTrigger
19.2. TimerTrigger
20. Listening State Machine Events
20.1. Application Context Events
20.2. State Machine Listener
20.3. Limitations and Problems
21. Context Integration
21.1. Enabling Integration
21.2. Method Parameters
21.3. Transition Annotations
21.4. State Annotations
21.5. Event Annotation
21.6. State Machine Annotations
21.7. Extended State Annotation
22. State Machine Accessor
23. State Machine Interceptor
24. State Machine Security
24.1. Configuring Security
24.2. Securing Events
24.3. Securing Transitions
24.4. Securing Actions
24.5. Using Security Attributes and Expressions
24.5.1. Generic Attribute Usage
24.5.2. Generic Expression Usage
24.5.3. Event Attributes
24.5.4. Event Expressions
24.5.5. Transition Attributes
24.5.6. Transition Expressions
24.6. Understanding Security
25. State Machine Error Handling
26. Persisting State Machine
26.1. Using StateMachineContext
26.2. Using StateMachinePersister
26.3. Using Redis
27. Spring Boot Support
27.1. Monitoring and Tracing
27.2. Repository Config
28. Monitoring State Machine
29. Using Distributed States
29.1. ZookeeperStateMachineEnsemble
30. Testing Support
31. Eclipse Modeling Support
31.1. Using UmlStateMachineModelFactory
31.1.1. StateMachineComponentResolver
31.2. Creating Model
31.3. Define States
31.4. Define Events
31.4.1. Defer Event
31.5. Define Transitions
31.6. Define Timers
31.7. Define Choice
31.8. Define Junction
31.9. Define Entry/Exit
31.10. Define History
31.10.1. Shallow
31.10.2. Deep
31.10.3. Default
31.11. Define Fork/Join
31.12. Define Actions
31.12.1. Initial Action
31.13. Define Guards
31.14. Define Bean Reference
31.15. Define SpEL Reference
31.16. Using Sub-Machine Reference
32. Repository Config Support
32.1. JPA
32.2. Redis
32.3. MongoDB
V. Recipes
33. Persist
34. Tasks
VI. State Machine Examples
35. Turnstile
36. Showcase
37. CD Player
38. Tasks
39. Washer
40. Persist
41. Zookeeper
42. Web
43. Scope
44. Security
45. Event Service
46. Deploy
47. Order Shipping
48. JPA Config
49. Monitoring
VII. FAQ
50. State Changes
51. Extended 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
Entry Point
Exit Point
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
52. Developer Documentation
52.1. StateMachine Config Model