I have a use case, where transaction goes through multiple states as below
- NEW (Initial)
- SUBMITTED (On submit event by user)
- APPROVALPENDING (There are can be multiple approvals to run in parallel, it can be auto approved through validation or can go for manual approval/reject through event)
- APPROVED (When all approval tasks are in end state approved)
- NEW (Back to new when any one of approvals is rejected)COMPLETE (End, auto transition from APPROVED)
Is the spring state machine the right solution for this flow, or spring flowable is more suitable.
What are basic check for when to use Spring State Machine or Spring Flowable.