Example usage for org.springframework.statemachine.event StateMachineEventPublisher publishTransitionEnd

List of usage examples for org.springframework.statemachine.event StateMachineEventPublisher publishTransitionEnd

Introduction

In this page you can find the example usage for org.springframework.statemachine.event StateMachineEventPublisher publishTransitionEnd.

Prototype

void publishTransitionEnd(Object source, Transition<?, ?> transition);

Source Link

Document

Publish a transition end event.

Usage

From source file:org.springframework.statemachine.support.StateMachineObjectSupport.java

protected void notifyTransitionEnd(StateContext<S, E> stateContext) {
    try {//w w  w.  ja va 2  s .  c o  m
        stateMachineHandlerCallHelper.callOnTransitionEnd(getBeanName(), stateContext);
        stateListener.transitionEnded(stateContext.getTransition());
        stateListener.stateContext(stateContext);
        if (contextEventsEnabled) {
            StateMachineEventPublisher eventPublisher = getStateMachineEventPublisher();
            if (eventPublisher != null) {
                eventPublisher.publishTransitionEnd(this, stateContext.getTransition());
            }
        }
    } catch (Throwable e) {
        log.warn("Error during notifyTransitionEnd", e);
    }
}