fork-join后无法进入下一节点(state)的EventListener?
『抹·茶』
2014-06-11
环境:jbpm4.4。
背景:用fork-join处理两个并行的分支(Task1,Task2),当两个Task分别complete后按意图需要进入一个state节点,在此节点中完成业务相关的数据库操作,然后进入End。在state节点中写了一个EventListener(start),但是两个Task分别有人Complete后,下一节点state的EventListener没有进入,不知道是何原因? 我做的是一个web项目,两个Task是不同的用户执行审批的,按照自己本身的想法,Task全部提交后应该进入下一个节点的state,但是EventListener没有执行,数据库JBPM4_Execution表显示节点已经进入state,我的问题是EventListener为何不执行? 下面是jpdl代码 <?xml version="1.0" encoding="UTF-8"?> <process name="hldz_order" xmlns="http://jbpm.org/4.4/jpdl"> <start g="225,19,48,48" name="order start"> <transition g="-110,-11" name="to check order" to="check order"/> </start> <state g="204,102,92,52" name="check order"> <on event="start"> <event-listener class="com.hloto.hlerp.modules.workeffort.listener.CheckOrderListener"/> </on> <transition g="-108,-8" name="to checkdecision" to="checkdecision"/> </state> <decision expr="#{checkOrder}" g="226,189,48,48" name="checkdecision"> <transition g="151,213:-125,-22" name="to check order error" to="check order error"/> <transition g="368,213:-99,-22" name="to first approval" to="first approval"/> </decision> <task assignee="#{approval.firstPerson}" g="311,265,117,60" name="first approval"> <transition g="17,-10" name="to second approval" to="second approval"/> </task> <end-error g="128,255,48,48" name="check order error"/> <task assignee="#{approval.secondPerson}" g="312,355,118,63" name="second approval"> <transition g="-114,-13" name="to check amount" to="check amount"> <event-listener class="com.hloto.hlerp.modules.workeffort.listener.CheckAmountListener"/> </transition> </task> <decision expr="#{checkAmount}" g="347,459,48,48" name="check amount"> <transition g="538,484:-3,-22" name="small" to="fork order"/> <transition g="257,483:-104,-22" name="big" to="third approval"/> </decision> <fork g="516,560,48,48" name="fork order"> <transition g="-98,-22" name="to manufacturer" to="manufacturer"/> <transition g="20,-17" name="to finance" to="finance"/> </fork> <task assignee="#{approval.thirdPerson}" g="197,552,119,57" name="third approval"> <transition g="-21,-22" name="to fork order" to="fork order"/> </task> <task assignee="#{approval.manufacturer}" g="358,654,113,61" name="manufacturer"> <transition g="-72,5" name="to join end" to="join end"/> </task> <task assignee="#{approval.finance}" g="598,661,113,60" name="finance"> <transition g="17,9" name="to join end" to="join end"/> </task> <join g="519,766,48,48" name="join end"> <transition g="-50,-22" name="to order end" to="order end"> </transition> </join> <state name="order end" g="504,848,80,40"> <on event="start"> <event-listener class="com.hloto.hlerp.modules.workeffort.listener.OrderEndListener"></event-listener> </on> <transition name="to end" to="end" g="-43,-22" /> </state> <end g="522,919,48,48" name="end"/> </process> 流程到join后,直接进入order end(看数据库中JBPM_EXECUTION表可知),但是order end之前应该先进入event-listener才对吧? 请教有相关经验的朋友,QQ交流也可83759659 |