private void createValidateRecaptchaAction(final Flow flow) {
        val state = getState(flow, CasWebflowConstants.STATE_ID_REAL_SUBMIT, ActionState.class);
        val actionList = state.getActionList();
        val currentActions = new ArrayList<Action>(actionList.size());
        actionList.forEach(currentActions::add);
        currentActions.forEach(actionList::remove);

        actionList.add(createEvaluateAction(CasWebflowConstants.ACTION_ID_VALIDATE_CAPTCHA));
        currentActions.forEach(actionList::add);
        state.getTransitionSet().add(createTransition(CasWebflowConstants.TRANSITION_ID_CAPTCHA_ERROR, CasWebflowConstants.STATE_ID_INIT_LOGIN_FORM));
    }
This is {@link CasCaptchaWebflowConfigurer}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-captcha-core/src/main/java/org/apereo/cas/web/flow/CasCaptchaWebflowConfigurer.java