Sagas as State Machine

We are in the process of implementing a complex business process using Axon framework for our client.

To be very honest we are learning right from the basics.

While developing we came across a concept of Sagas as State Machines.

With some more research we found out a new framework in spring related to state machine, as below.

Could you please help here to understand a bigger picture of how the State Machines fits into Axon Framework.

Also it would be of great help if you have any sample application which connects the above concepts at a high level.


that question is rather broad. I am not familiar with Spring State Machine, but have used different workflow engines. Generally, Sagas are nice to handle events, maintain state and trigger these workflows. The workflows would then make decisions and perform actions that cause events that the saga can react on, again.

I know the guys at Camunda have been experimenting with Axon Camunda integration. Maybe that provides some inspiration: