6 Replies Latest reply on Jun 10, 2014 12:48 PM by Arif Mohammed

    Can not create "boundary catch error event" on multi instance subprocess.

    Arif Mohammed Novice

         I have 2 problems related to adding "boundary catch error event" on multi instance subprocess.

       

      1) First KIE workbench is not allowing to add boundary events no matter where you add, it could be on a task or it could be on a subprocess. When you drag and drop an event it is highlighting the back ground color of the target node. But when you see the actual BPMN definition file it is creating "intermediateCatchEvent" I have to change it manually to "boundaryEvent"

       

      2) boundaryEvent's are working fine for a task but if I attach an error boundary event to multi instance subprocess it is failing with message "unable to parse xml : Exception class java.lang.IllegalArgumentException : Could not find node to attach to: _945D8CD1-C1AE-41A7-9165-CA977DE6CBF5"

           I modified that boundary catch event element manually since editor is not allowing me to create boundary events. Following is the snippet of xml

       

            <bpmn2:boundaryEvent id="_69BA5E79-7C94-4000-BC38-EA2C2A3037BA" drools:bgcolor="#f5deb3" drools:selectable="true" drools:bordercolor="#FF6600" drools:boundaryca="true" name="Restart" attachedToRef="_945D8CD1-C1AE-41A7-9165-CA977DE6CBF5">

              <bpmn2:outgoing>_26110A92-11F0-4B00-9299-827E547C6F17</bpmn2:outgoing>

              <bpmn2:signalEventDefinition id="_wweq08wBEeOMKIxJzrx6dQ" signalRef="Restart"/>

            </bpmn2:boundaryEvent>

       

         And here is sub-process definition

       

      <bpmn2:subProcess id="_945D8CD1-C1AE-41A7-9165-CA977DE6CBF5" drools:selectable="true" name="Approvers">

        ....

       

      I have attached both the process diagram and bpmn file.

        • 1. Re: Can not create "boundary catch error event" on multi instance subprocess.
          Arif Mohammed Novice

          Ok I have resolved the above "unable to parse xml" by moving the boundary event outside of subprocess definition as follows(Attached latest bpmn). But now Iam getting the exception in jBPM execution when Restart event is triggered.

           

          .....

          .....

              </bpmn2:subProcess>

              <bpmn2:boundaryEvent id="_8BEA8860-F87B-4326-AB9F-E06B7DF965EB" drools:bgcolor="#f5deb3" drools:selectable="true" drools:bordercolor="#FF6600" drools:boundaryca="true" name="" attachedToRef="_945D8CD1-C1AE-41A7-9165-CA977DE6CBF5">

                  <bpmn2:outgoing>_E733B776-EA67-4B00-918A-1C8A40033848</bpmn2:outgoing>

                  <bpmn2:errorEventDefinition id="_wweq1MwBEeOMKIxJzrx6dQ" drools:erefname="EndApproval" errorRef="EndApproval"/>

              </bpmn2:boundaryEvent>

           

          And here is the exception.

           

          Exception in thread "main" org.jbpm.workflow.instance.WorkflowRuntimeException: [approval-process:46 - EndApproval:8] -- org.jbpm.ruleflow.instance.RuleFlowProcessInstance cannot be cast to org.kie.api.runtime.process.NodeInstance

            at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:161)

            at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:337)

            at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:296)

            at org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted(ExtendedNodeInstanceImpl.java:44)

            at org.jbpm.workflow.instance.node.EventNodeInstance.triggerCompleted(EventNodeInstance.java:73)

            at org.jbpm.workflow.instance.node.EventNodeInstance.signalEvent(EventNodeInstance.java:54)

            at org.jbpm.workflow.instance.node.BoundaryEventNodeInstance.signalEvent(BoundaryEventNodeInstance.java:45)

            at org.jbpm.workflow.instance.node.CompositeNodeInstance.signalEvent(CompositeNodeInstance.java:256)

            at org.jbpm.workflow.instance.node.CompositeNodeInstance.signalEvent(CompositeNodeInstance.java:264)

            at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:425)

            at com.xyz.ras.util.ProcessUtility.signalProcessEvent(ProcessUtility.java:265)

            at com.xyz.ras.service.ProcessService.signalProcessEvent(ProcessService.java:109)

            at com.xyz.ras.service.ProcessService$$FastClassByCGLIB$$d0c69e4b.invoke(<generated>)

            at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)

            at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:698)

            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)

            at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)

            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

            at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:631)

            at com.xyz.ras.service.ProcessService$$EnhancerByCGLIB$$6d29aa79.signalProcessEvent(<generated>)

            at com.xyz.test.MyTest.signalEvent(MyTest.java:56)

            at com.xyz.test.MyTest.main(MyTest.java:37)

          Caused by: java.lang.ClassCastException: org.jbpm.ruleflow.instance.RuleFlowProcessInstance cannot be cast to org.kie.api.runtime.process.NodeInstance

            at org.jbpm.workflow.instance.impl.NodeInstanceImpl.getContextInstanceContainer(NodeInstanceImpl.java:398)

            at org.jbpm.workflow.instance.impl.NodeInstanceImpl.resolveContextInstance(NodeInstanceImpl.java:378)

            at org.jbpm.workflow.instance.node.FaultNodeInstance.getExceptionScopeInstance(FaultNodeInstance.java:86)

            at org.jbpm.workflow.instance.node.FaultNodeInstance.internalTrigger(FaultNodeInstance.java:54)

            at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155)

            ... 21 more

          • 3. Re: Can not create "boundary catch error event" on multi instance subprocess.
            Arif Mohammed Novice

            Hi Maciej. It seems tobe issue is still not resolved, can you please run the test case attached in the jira ticket ? I have updated the ticket with the details.

            • 4. Re: Can not create "boundary catch error event" on multi instance subprocess.
              Arif Mohammed Novice

              Hi Maciej,

               

                 Is there anything wrong in process definition ? or is still the issue exists ? Do you had a chance to execute the updated test case ?

              • 5. Re: Can not create "boundary catch error event" on multi instance subprocess.
                Maciej Swiderski Master

                will try to find some time to look into it today or tomorrow and update jira

                • 6. Re: Can not create "boundary catch error event" on multi instance subprocess.
                  Arif Mohammed Novice

                  Hi Maciej,

                   

                     I copied your test case and executed and problem still remains. Only difference is I am running in spring context. I have also updated the ticket with details If you still want me to check with non oracle DB I can try with mysql is that fine ?