配置代码
states
.withStates()
.initial(OrderState.Create)
.state(OrderState.Create, startAction)
.state(OrderState.Payed, paymentAction)
.states(EnumSet.allOf(OrderState.class));
运行代码
stateMachine
.getStateMachineAccessor()
.doWithAllRegions(access -> {
access.resetStateMachine(new DefaultStateMachineContext<> (OrderState.Payed, null, null, null, null));
});
stateMachine.start();
paymentAction 启动时未触发,如何触发