2 Replies Latest reply on Jun 4, 2014 4:06 AM by marcj

    Error Boundary Events in jBPM

    marcj

      Hey guys,

      I'm trying to include an error boundary event into my sample process. The event has been attached to a service task and should catch all exception types. My model looks like this at the moment:

      PT_HEH.png

      Now, I receive the following error messages, which I neither could clarify with the documentation nor with forum/web search... I'm especially curious about the ErrorRef property of the boundary event.

       

      Process 'XXX' [XXX]: Event node 'Exchange Rate Error Event' [33] should specify an event type.

      Process 'XXX' [XXX]: Fault node '' [29] has no fault name.

       

      Can anyone assist? Is there a jBPM example regarding exception handling with boundary events?

       

      Thx in advance!

        • 1. Re: Error Boundary Events in jBPM
          swiderski.maciej

          check properties panel of error boundary event and ensure it has set the error.

           

          In addition, I believe your process is bit incorrect - the subprocess seems to be event sub process meaning it expects to catch errors as well. So you have like to elements that would attempt to catch errors while I believe you should have only one. So either use event subprocess with error start event or boundary event and change the start event of the subprocess to none start event and make sure it's not event subprocess.

           

          Here you can find an example of service task with error boundary event.

           

          HTH

          1 of 1 people found this helpful
          • 2. Re: Error Boundary Events in jBPM
            marcj

            Hi Maciej,

            thx for your reply. I guess the concepts of an event subprocess and a regular subprocess to handle exception got mixed =)

             

            Yet, I noticed something different:

             

            Boundary Event Definition from jbpm-console-ng-playground-kjar / async-examples / async executor:

             

            <bpmn2:boundaryEvent xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" id="_7023C4A2-D1A9-4935-A454-29868B4D2C80" drools:bgcolor="#f5deb3" xmlns:drools="http://www.jboss.org/drools" drools:selectable="true" drools:bordercolor="#a0522d" drools:boundaryca="false" name="" attachedToRef="_C9273EB3-AA10-4A6A-8578-1269B0565554">

                  <bpmn2:outgoing>_358A2B1A-A368-449B-B765-238EA696D921</bpmn2:outgoing>

                  <bpmn2:errorEventDefinition id="_EhGnauu9EeOQcJpqh5naCw" drools:erefname="java.lang.IllegalArgumentException" errorRef="java.lang.IllegalArgumentException"/>

                </bpmn2:boundaryEvent>

             

             

            My Boundary Event Definition:

             

            <bpmn2:boundaryEvent xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" id="_AD53F3A7-9B0D-4048-9034-8E8BEABB205C" drools:bgcolor="#f5deb3" xmlns:drools="http://www.jboss.org/drools" drools:selectable="true" drools:bordercolor="#a0522d" drools:boundaryca="true" name="Exchange Rate Error Event" attachedToRef="_EACC3F59-598B-4F80-81DC-15E35D14D17C">

              <bpmn2:outgoing>_9998E9EE-0090-47A0-9F66-2D7D70582431</bpmn2:outgoing>

                  <bpmn2:errorEventDefinition id="_NYsTOeu9EeOQcJpqh5naCw" drools:erefname="java.lang.IllegalArgumentException"/>

                </bpmn2:boundaryEvent>

             

             

            After Saving and Re-Open the process, the definition looks like this:

             

            <bpmn2:boundaryEvent xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" id="_AD53F3A7-9B0D-4048-9034-8E8BEABB205C" drools:bgcolor="#f5deb3" xmlns:drools="http://www.jboss.org/drools" drools:selectable="true" drools:bordercolor="#a0522d" drools:boundaryca="true" name="Exchange Rate Error Event" attachedToRef="_EACC3F59-598B-4F80-81DC-15E35D14D17C">

                  <bpmn2:outgoing>_9998E9EE-0090-47A0-9F66-2D7D70582431</bpmn2:outgoing>

                  <bpmn2:errorEventDefinition id="_S9wCC-u-EeOQcJpqh5naCw"/>

                </bpmn2:boundaryEvent>

             

             

            So the problem seems to be:

            - ErrorRef can be defined in KIE-WB, but the ErrorRef Tag will not be added to the boundary event definition.

            - Therefore, the ErrorRef seems to be incomplete and therefore can´t be saved...

             

            Any ideas?