Global Exception handing with Spring WebFlow Flow.
I am working in a Spring webflow project and I would like to know if anyone knows how to add sometype of global exception handing in the flow so if any of my java calls throw a example it will catch in and bring in to the same error system for the full system?
My old flow worked with out a issues:
<var name="member" class="xxxx" />
<decision-state id="checkIsInPending">
<if test="flowControllerActions.isInPending(member)" then="endStateMemberPending" else="name" />
</decision-state>
once I added the global to it, I started to get a error.
<var name="member" class="xxxxx" />
<global-transitions>
<transition on-exception="java.lang.Exception"
to="SystemException" />
</global-transitions>
<decision-state id="checkIsInPending">
<if test="flowControllerActions.isInPending(member)" then="endStateMemberPending" else="name" />
</decision-state>
Here is my error:
org.xml.sax.SAXParseException; lineNumber: 29; columnNumber: 40; cvc-complex-type.2.4.a: Invalid content was found starting with element 'decision-state'. One of '{"http://www.springframework.org/schema/webflow":on-end, "http://www.springframework.org/schema/webflow":output, "http://www.springframework.org/schema/webflow":exception-handler, "http://www.springframework.org/schema/webflow":bean-import}' is expected.
Try to rearrange XML tags. You are getting this exception because your flow XML does not comply with XSD. Myabe just put global-transition in the end