use of org.springframework.webflow.engine.DecisionState in project cas by apereo.
the class AbstractCasWebflowConfigurer method createDecisionState.
@Override
public DecisionState createDecisionState(final Flow flow, final String id, final String testExpression, final String thenStateId, final String elseStateId) {
if (containsFlowState(flow, id)) {
LOGGER.debug("Flow [{}] already contains a definition for state id [[{}]]", flow.getId(), id);
return (DecisionState) flow.getTransitionableState(id);
}
final DecisionState decisionState = new DecisionState(flow, id);
final Expression expression = createExpression(testExpression, Boolean.class);
final Transition thenTransition = createTransition(expression, thenStateId);
decisionState.getTransitionSet().add(thenTransition);
final Transition elseTransition = createTransition("*", elseStateId);
decisionState.getTransitionSet().add(elseTransition);
return decisionState;
}
use of org.springframework.webflow.engine.DecisionState in project cas by apereo.
the class OpenIdWebflowConfigurer method doInitialize.
@Override
protected void doInitialize() throws Exception {
final Flow flow = getLoginFlow();
if (flow != null) {
final String condition = getOpenIdModeCondition();
final DecisionState decisionState = createDecisionState(flow, "selectFirstAction", condition, OPEN_ID_SINGLE_SIGN_ON_ACTION, getStartState(flow).getId());
final ActionState actionState = createActionState(flow, OPEN_ID_SINGLE_SIGN_ON_ACTION, createEvaluateAction(OPEN_ID_SINGLE_SIGN_ON_ACTION));
actionState.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_SUCCESS, CasWebflowConstants.TRANSITION_ID_SEND_TICKET_GRANTING_TICKET));
actionState.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_ERROR, getStartState(flow).getId()));
actionState.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_WARN, CasWebflowConstants.TRANSITION_ID_WARN));
actionState.getExitActionList().add(createEvaluateAction("clearWebflowCredentialsAction"));
registerMultifactorProvidersStateTransitionsIntoWebflow(actionState);
setStartState(flow, decisionState);
}
}
use of org.springframework.webflow.engine.DecisionState in project cas by apereo.
the class Pac4jWebflowConfigurer method createSaml2ClientLogoutAction.
private void createSaml2ClientLogoutAction() {
final Flow logoutFlow = getLogoutFlow();
final DecisionState state = (DecisionState) logoutFlow.getState(CasWebflowConstants.STATE_UD_FINISH_LOGOUT);
state.getEntryActionList().add(saml2ClientLogoutAction);
}
Aggregations