public Transition createTransitionForState ( final TransitionableState state , final String criteriaOutcome , final String targetState , final boolean removeExisting ) { try { if ( removeExisting ) { val success = ( Transition ) state . getTransition ( criteriaOutcome ) ; if ( success != null ) { state . getTransitionSet ( ) . remove ( success ) ; } } val transition = createTransition ( criteriaOutcome , targetState ) ; state . getTransitionSet ( ) . add ( transition ) ; LOGGER . trace ( "Added transition [{}] to the state [{}]" , transition . getId ( ) , state . getId ( ) ) ; return transition ; } catch ( final Exception e ) { LOGGER . error ( e . getMessage ( ) , e ) ; } return null ; }
Add transition to action state .