User Defined Flows Problem

Marvin Addison marvin.addison at gmail.com
Mon Jul 21 13:07:20 EDT 2014


I'm running into a puzzling problem with user-defined flows. The CAS
login flow is modeled after a profile flow, and after some initial
setup, it calls into the authn flow:

    <subflow-state id="authenticate" subflow="authn">
        <input name="calledAsSubflow" value="true" />
        <transition on="proceed" to="grantServiceTicket" />
    </subflow-state>

This worked fine in my initial demo, but now causes the following error:

07:57:44.924 - ERROR
[org.springframework.webflow.execution.FlowExecutionException:76] -
org.springframework.webflow.execution.FlowExecutionException:
Exception thrown in state 'authenticate' of flow 'cas/login'
...
Caused by: org.springframework.webflow.definition.registry.NoSuchFlowDefinitionException:
No flow definition 'authn' found

My hypothesis is that user flows cannot call into system flows since
they are defined in distinct flow registries. While there is a
parent-child relationship between user and system flows, there are two
registries. I'm thinking this is a case of first-one-wins where the
user-defined flow is pulled from the userFlowRegistry bean where no
authn flow is defined. I attempted to create a test case to prove this
and it demonstrates the same behavior as I'm seeing with CAS:

https://gist.github.com/serac/67a99189bf6e91712c37

While reproducing the behavior is not proof of my hypothesis, I hope
it's helpful in describing the problem. As far as workarounds, I tried
definining a single registry that used %{idp.home} as the base-path,
but that messed up the flow identifiers for user-defined flows (extra
"flow/" prefix in ID). I simply don't see a way to do this with
built-in components that preserves the clean flow identifiers in use
at present. If there is indeed a real problem here, I fear a custom
FlowRegistry that supports multiple basePaths will be required.

Thanks,
M


More information about the dev mailing list