@Override
    public Event resolveSingle(final RequestContext context) throws Throwable {
        val events = resolve(context);
        if (events == null || events.isEmpty()) {
            LOGGER.trace("No event could be determined");
            return null;
        }
        val event = events.iterator().next();
        LOGGER.debug("Resolved single event [{}] via [{}] for this context",
            event.getId(), event.getSource().getClass().getName());
        val targetState = WebUtils.getTargetTransition(context);
        return FunctionUtils.doIf(StringUtils.isNotBlank(targetState) && event.getId().equals(CasWebflowConstants.TRANSITION_ID_SUCCESS),
                () -> eventFactory.event(this, targetState),
                () -> event)
            .get();
    }
This is {@link AbstractCasWebflowEventResolver} that provides parent
operations for all child event resolvers to handle core webflow changes.

@author Misagh Moayyed
@since 5.0.0
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/resolver/impl/AbstractCasWebflowEventResolver.java