I have used Spring state machine with some basic Spring MVC application. I have to admit, it is pretty easy to configure and use.
But it has many limitations as well, mainly because of it being in very early stages of development.
I also came across some workflow engines like Activiti which is an open-source workflow engine written in Java and stateless4j which is a Lightweight Java State Machine. They look much more polished and sophisticated.
I wanted to know what is the difference between these and Spring State Machine (Advantages or disadvantages).
Spring Statemachine is a framework for application developers to use state machine concepts with Spring applications. Spring Statemachine aims to provide following features: Easy to use flat one level state machine for simple use cases. Hierarchical state machine structure to ease complex state configuration.
Non-Blocking State MachinesAny time a library must wait a significant period of time for something to happen, it should not block the rest of the system. Instead, it should release the processor and let the rest of the system execute.
A state machine — also called a finite state machine or finite automaton — is a computational model used to build an abstract machine. These machines can only be in one state at a given time. Each state is a status of the system that changes to another state. These state changes are called transitions.
I would say so a Workflow Engine is a subset of State Machine. With a State Machine you can do much more things and you can think a Workflow Engine like a library for a State Machine, with use cases that are pre-configured but when you want something out of ordinary then you have to make your hands dirty again with a State Machine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With