idpv3 and web flow : flow-location or flow-location-pattern ?

Tom Zeller tzeller at dragonacea.biz
Tue Jun 11 20:48:01 EDT 2013


Do we want to map profile paths to flow definitions explicitly via
configuration elements or implicitly via file system hierarchy ?

I ask because there may be minor implications for flow inheritance and
<bean-import />.

Not sure if I am using explicitly and implicitly correctly.

Mapping profile paths to flows explicitly would require a
webflow:flow-location configuration element for every profile-to-flow
mapping. By default, the flow-location id is mapped to the path info
of the URL request string and the path is the path to the flow
definition file. For example :

 <webflow:flow-location id="SAML2/POST/SSO" path="/SAML2/sso-post-flow.xml" />
 <webflow:flow-location id="SAML2/Redirect/SSO"
path="/SAML2/sso-redirect-flow.xml" />

Mapping profile paths implicitly via the file system would involve the
webflow:flow-location-pattern configuration element :

 <webflow:flow-location-pattern value="/**/*-flow.xml" />

and a file system hierarchy such as

 webflows/abstract/common-flow.xml
 webflows/abstract/common-flow-beans.xml
 webflows/SAML2/POST/SSO/sso-post-flow.xml
 webflows/SAML2/POST/SSO/sso-post-flow-beans.xml
 webflows/SAML2/Redirect/SSO/sso-redirect-flow.xml
 webflows/SAML2/Redirect/SSO/sso-redirect-flow-beans.xml

I think I prefer mapping implicitly via the file system and
flow-location-pattern, mainly because profile-to-flow mappings are
thus external to the war, if I understand correctly. If we go this
route, then importing parent beans in a child flow would look like

 <bean-import resource="../../../abstract/common-flow-beans.xml" />

which is not attractive or maybe even a good idea because of the ../s.
Importing beans via <bean-import resource="common-flow-beans.xml" />
in common-flow.xml will not work because "relative paths in the parent
flow will become relative to the child flow". [1]

If we go with flow-location, then we have more control over
inheritance paths, I think.

So, before I go any further with <bean-import />, I though I would ask
for feedback regarding flow-location and flow-location-pattern.

Thanks.

[1] http://static.springsource.org/spring-webflow/docs/2.3.x/reference/html/ch09s05.html


More information about the dev mailing list