With spring state machine, we have states and events. I could not find any documentation on whether it is possible to attach static data to a state during configuration.
For example, if there are the states S1 and S2
public void configure(StateMachineStateConfigurer<String, String> states) throws Exception {
states.withStates()
.initial("INIT")
.end("END")
.state("S1", null, exitAction())
.state("S2", entryAction());
}
If we could attach static data during the above configuration (like a java Map for example), it could be useful in the actions that are triggered (like entryAction and exitAction above)
I don't know if it is possible to do somehow.