There is currently no general builder pattern for building a machine like pojo. Of course, you can use the necessary classes manually, but looking at unit tests, this approach is too detailed.
Based on the discussions after we got 1.0.0.M1, we need a better low-level api builder. Although we can create a factory based on JavaConfig, this may not be enough for some use cases.
I created a new topic https://github.com/spring-projects/spring-statemachine/issues/45 to track this. Thus, either we add a common constructor, or if this model is too confusing, then perhaps a set of recipe modules can be used to create a simple configuration for specific use cases.
source share