【发布时间】:2021-02-24 20:11:44
【问题描述】:
似乎执行以下操作会使 id 为空
# before reset, this will log the id set when state machine was created using stateMachineFactory.getStateMachine(stateMachineId)
log.info(String.format("Before reset, current state: %s, id: %s", stateMachine.getState().getId().toString(), stateMachine.getId()));
# resetting the state machine
stateMachine.getStateMachineAccessor().doWithAllRegions(access -> access
.resetStateMachine(new DefaultStateMachineContext<>(correctState, null, null, null)));
# after reset, this will log id as null
log.info(String.format("After reset, state: %s, id: %s", stateMachine.getState().getId().toString(), stateMachine.getId()));
有没有办法再次保留或设置 id?
【问题讨论】:
标签: spring spring-statemachine