https://github.com/choonchernlim/test-spring-statemachine
Examples on configuring Spring State Machine and how to test the state machine.
https://github.com/choonchernlim/test-spring-statemachine
spring spring-state-machine
Last synced: 4 months ago
JSON representation
Examples on configuring Spring State Machine and how to test the state machine.
- Host: GitHub
- URL: https://github.com/choonchernlim/test-spring-statemachine
- Owner: choonchernlim
- Created: 2017-11-14T19:15:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-28T20:42:17.000Z (over 8 years ago)
- Last Synced: 2025-04-06T22:38:16.327Z (about 1 year ago)
- Topics: spring, spring-state-machine
- Language: Groovy
- Homepage:
- Size: 31.3 KB
- Stars: 2
- Watchers: 0
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# test-spring-statemachine
Examples on configuring Spring State Machine and how to test the state machine.
## Default State Machine Factory
In this example, `MailingStateMachineConfig` where all states and events are configured in that configuration file.
* How to Run:
* `mvn clean compile spring-boot:run`.
* Pros:
* For simple state machine, it's simple to configure.
* Cons:
* For complex state machine, the states/events/actions configuration can get very tedious.
* Difficult to get "full picture" of the state machine containing many states and pseudo-states.
## UML-Based State Machine Factory
In this example, `MailingUmlStateMachineConfig` is used where all states and events are configured in the UML file
using Eclipse Papyrus.
* How to Run:
* `mvn clean compile spring-boot:run -Drun.profiles=uml`
* Pros:
* The UML file becomes a living documentation of the state machine.
* Easy to understand the entire state machine through UML visualization.
* Cons:
* Learning curve to create the UML file using Eclipse Papyrus.
* States and events must be type `String` instead of `Enum`.