TransitionDefinition getMatchingTransition(String eventId) { FlowSessionImpl session = getActiveSessionInternal(); if (session == null) { return null; } TransitionableState currentState = (TransitionableState) session.getState(); TransitionDefinition transition = currentState.getTransition(eventId); if (transition == null) { transition = session.getFlow().getGlobalTransition(eventId); } return transition; }
/** * Add transition to action state. * * @param state the action state * @param criteriaOutcome the criteria outcome * @param targetState the target state * @param removeExisting the remove existing * @return the transition */ 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; }
public TransitionDefinition getMatchingTransition(String eventId) throws IllegalStateException { TransitionableState state = (TransitionableState) getFlowExecutionContext().getActiveSession().getState(); TransitionDefinition transition = state.getTransition(eventId); if (transition == null) { transition = getRootFlow().getGlobalTransition(eventId); } return transition; }
/** * Contains transition boolean. * * @param state the state * @param transition the transition * @return the boolean */ public boolean containsTransition(final TransitionableState state, final String transition) { if (state == null) { LOGGER.error("State is not configured correctly and cannot be null."); return false; } return state.getTransition(transition) != null; }
TransitionDefinition getMatchingTransition(String eventId) { FlowSessionImpl session = getActiveSessionInternal(); TransitionableState currentState = (TransitionableState) session.getState(); TransitionDefinition transition = currentState.getTransition(eventId); if (transition == null) { transition = session.getFlow().getGlobalTransition(eventId); } return transition; }
TransitionDefinition getMatchingTransition(String eventId) { FlowSessionImpl session = getActiveSessionInternal(); if (session == null) { return null; } TransitionableState currentState = (TransitionableState) session.getState(); TransitionDefinition transition = currentState.getTransition(eventId); if (transition == null) { transition = session.getFlow().getGlobalTransition(eventId); } return transition; }
public TransitionDefinition getMatchingTransition(String eventId) throws IllegalStateException { TransitionableState state = (TransitionableState) getFlowExecutionContext().getActiveSession().getState(); TransitionDefinition transition = state.getTransition(eventId); if (transition == null) { transition = getRootFlow().getGlobalTransition(eventId); } return transition; }
public TransitionDefinition getMatchingTransition(String eventId) throws IllegalStateException { TransitionableState state = (TransitionableState) getFlowExecutionContext().getActiveSession().getState(); TransitionDefinition transition = state.getTransition(eventId); if (transition == null) { transition = getRootFlow().getGlobalTransition(eventId); } return transition; }
val targetSuccessId = actionState.getTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS).getTargetStateId(); val targetWarningsId = actionState.getTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS_WITH_WARNINGS).getTargetStateId(); val targetDenied = actionState.getTransition(CasWebflowConstants.TRANSITION_ID_DENY).getTargetStateId(); val targetUnavailable = actionState.getTransition(CasWebflowConstants.TRANSITION_ID_UNAVAILABLE).getTargetStateId();
@Override public boolean isEnabled() { boolean transitionExistsForCurrentView = false; FlowDefinition flowDef = ((FlowExecutorImpl)PageFlowWebApplication.get().getFlowExecutor()).getDefinitionLocator().getFlowDefinition(PageFlowWebApplication.get().getFlowId()); // Retrieve the flow instance for the input view state Flow flow = (Flow)flowDef; StateDefinition currState = flow.getState(PageFlowSession.get().getFlowState().getCurrentViewStateId()); TransitionableState transitionState = null; if(currState instanceof TransitionableState){ transitionState = (TransitionableState)currState; } else { //End states aren't transitional and so none of the links should be enabled return false; } if(transitionState.getTransition(getEventId()) != null || flow.getGlobalTransition(getEventId()) != null){ transitionExistsForCurrentView = true; } return transitionExistsForCurrentView; }
CasWebflowConstants.VIEW_ID_MUST_CHANGE_PASSWORD, realSubmit .getTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS).getTargetStateId()) .getEntryActionList().add(createEvaluateAction("flowScope.pswdChangePostLogin=true")); "flowScope.pswdChangePostLogin == true", getTransitionableState(flow, CasWebflowConstants.VIEW_ID_SHOW_AUTHN_WARNING_MSGS) .getTransition(CasWebflowConstants.TRANSITION_ID_PROCEED).getTargetStateId(), autoLogin ? CasWebflowConstants.STATE_ID_REAL_SUBMIT : CasWebflowConstants.STATE_ID_REDIRECT_TO_LOGIN);