使用 Spring WebFlow Flow 处理全局异常。
我在一个 Spring webflow 项目中工作,我想知道是否有人知道如何在流中添加某种类型的全局异常处理,所以如果我的任何 java 调用抛出一个示例,它将捕获并引入相同的错误系统整个系统?
我的旧流程解决了一个问题:
<var name="member" class="xxxx" />
<decision-state id="checkIsInPending">
<if test="flowControllerActions.isInPending(member)" then="endStateMemberPending" else="name" />
</decision-state>
一旦我将全局添加到其中,我就开始出现错误。
<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>
这是我的错误:
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.