我有一个简单的3步流程定义,我已经在JBPM4.3的JPDL中定义了,我想在JBPM7中使用BPMN2进行重新构建,但我在尝试这样做时遇到了问题。例如,我有一个看起来像这样的JPDL(我将其简化为实际的一个非常复杂):
<?xml version="1.0" encoding="UTF-8"?>
<process key="PROCESS_EXTERNAL_RESPONSE" name="PROCESS_EXTERNAL_RESPONSE" xmlns="http://jbpm.org/4.2/jpdl">
<start g="66,20,48,48">
<transition to="SEND_AND_WAIT"/>
</start>
<state g="662,145,80,40" name="SEND_AND_WAIT" continue="async" class="com.examples.SendAndWaitStateHandler">
<transition g="-79,-18" name="Completed" to="PROCESS_RESPONSE"/>
<transition g="-85,-25" name="Error" to="ERROR_AND_ABORT" />
</state>
<decision g="673,346,80,40" name="PROCESS_RESPONSE" continue="async">
<handler class="com.examples.ProcessResponseStateHandler">
</handler>
<transition g="-79,-18" name="Completed" to="end"/>
<transition g="-79,-18" name="Error" to="ERROR_AND_ABORT"/>
</decision>
<state g="501,345,92,52" name="ERROR_AND_ABORT" class="com.examples.AbortStateHandler" continue="async">
<transition g="-45,-18" name="Retry" to="SEND_AND_WAIT"/>
<transition g="-45,-18" name="Abort" to="end"/>
</state>
<end g="391,494,48,48" name="end"/>
</process>
基本上,当流程启动时,它会创建一个请求并发送到外部系统。然后,它进入WAIT状态以等待响应。一旦得到响应,它就会处理响应并做出决定是否应该继续或出错。如果发生错误,进程将转换到“ERROR AND ABORT”等待状态,用户或计时器可以从应用程序发送“重试”信号,再次转换到“SEND_AND_WAIT”状态。如何使用BPMN2对此进行建模.PM在JBPM7中?