配置代碼春天的statemachine復位狀態不會觸發入口動作
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不會觸發時開始, 如何觸發