List of usage examples for org.springframework.statemachine.event StateMachineEventPublisher publishStateChanged
void publishStateChanged(Object source, State<?, ?> sourceState, State<?, ?> targetState);
From source file:org.springframework.statemachine.support.StateMachineObjectSupport.java
protected void notifyStateChanged(StateContext<S, E> stateContext) { try {/* w ww . j a va 2s . c om*/ stateMachineHandlerCallHelper.callOnStateChanged(getBeanName(), stateContext); stateListener.stateChanged(stateContext.getSource(), stateContext.getTarget()); stateListener.stateContext(stateContext); if (contextEventsEnabled) { StateMachineEventPublisher eventPublisher = getStateMachineEventPublisher(); if (eventPublisher != null) { eventPublisher.publishStateChanged(this, stateContext.getSource(), stateContext.getTarget()); } } } catch (Throwable e) { log.warn("Error during notifyStateChanged", e); } }