You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On our project, we wanted to update the library version from 2.0.RELEASE to 4.0.0, but because of this, we started having errors.
State machine configurations:
The first action toWorkAction() is handled correctly. During the second action toReadyToInstallState(), a new event READY_TO_INSTALL is sent. But after a new event, the state machine closes without changing the state. In the following StateMachineListenerAdapter code after sending a new event Stage = STATEMACHINE_STOP and the code is not executed by condition.
@Override
public void stateContext(StateContext<ReplacementState, ReplacementEvent> stateContext) {
if (stateContext.getStage().equals(StateContext.Stage.STATE_CHANGED) && stateContext.getEvent() != null) {
var replacement = (AbstractReplacement) stateContext
.getStateMachine()
.getExtendedState()
.getVariables()
.getOrDefault(ReplacementStateMachineContextRepository.ENTITY_CONTEXT_KEY, null);
ReplacementState state = stateContext.getTarget().getId();
if (replacement != null) {
if (ReplacementEvent.CLOSE.equals(stateContext.getEvent())) {
baseReplacementService.updateStateSystem(replacement, stateContext.getEvent(), state);
} else {
baseReplacementService.updateState(replacement, stateContext.getEvent(), state);
}
}
}
}
Let me remind you that no code has changed except for version 2.0.RELEASE to 4.0.0.
The text was updated successfully, but these errors were encountered:
On our project, we wanted to update the library version from 2.0.RELEASE to 4.0.0, but because of this, we started having errors.
State machine configurations:
The first action
toWorkAction()
is handled correctly. During the second actiontoReadyToInstallState()
, a new event READY_TO_INSTALL is sent. But after a new event, the state machine closes without changing the state. In the following StateMachineListenerAdapter code after sending a new event Stage = STATEMACHINE_STOP and the code is not executed by condition.Let me remind you that no code has changed except for version 2.0.RELEASE to 4.0.0.
The text was updated successfully, but these errors were encountered: