The code below is my state machine configuration class
@Autowired
private StateMachineRuntimePersister<States, Events, String> stateMachineRuntimePersister;
@Override
public void configure(StateMachineConfigurationConfigurer<States, Events> config) throws Exception {
config.withPersistence().runtimePersister(stateMachineRuntimePersister);
// set machineId or not?
config.withConfiguration().machineId("orderStateMachine").autoStartup(true);
}
stateMachineRuntimePersister instance type is MongoDbPersistingStateMachineInterceptor。
The questions and doubts I have are:
If 'machineId' is specified, then the persistence will be based on 'machineId' as the query key, resulting in multiple order state machines sharing a persistent state machine, thus influencing each other.
If 'machineId' is not specified, a null pointer exception is thrown.
The code below is my state machine configuration class
stateMachineRuntimePersister instance type is MongoDbPersistingStateMachineInterceptor。
The questions and doubts I have are: