cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Boundary Error Event

robmckinnon
Champ on-the-rise
Champ on-the-rise
Activiti 5.10

It seems to me that the Boundary Error Event is not working. I have a sub process that has a Boundary Error Event configured with it but when errors are thrown within the sub process the boundary is never processed. 

1. Does Boundary Error Event working for anybody?
2. Is there some setting I need to turn on for Boundary Error Events to be processed?
3. I have attached a snippet from my bpmn file, did I configure incorrectly?

<subProcess id="subprocess1" name="Alfresco File Tasks">
      <serviceTask id="saveFileToAlfresco" name="Save File To Alfresco" activiti:class="com.myco.activiti.pos.SaveFileToAlfresco"></serviceTask>
      <startEvent id="startevent2" name="Start"></startEvent>
      <endEvent id="endevent5" name="End"></endEvent>
      <endEvent id="endevent3" name="ErrorEnd">
        <errorEventDefinition errorRef="error"></errorEventDefinition>
      </endEvent>
      <sequenceFlow id="flow32" name="" sourceRef="saveFileToAlfresco" targetRef="endevent5"></sequenceFlow>
      <serviceTask id="moveFilesToArchiveAlfresco" name="Move Files To Archive Alfresco" activiti:class="com.myco.activiti.pos.MoveFilesToArchiveAlfresco"></serviceTask>
      <sequenceFlow id="flow1121" name="" sourceRef="startevent2" targetRef="moveFilesToArchiveAlfresco"></sequenceFlow>
      <sequenceFlow id="flow1122" name="" sourceRef="moveFilesToArchiveAlfresco" targetRef="saveFileToAlfresco"></sequenceFlow>
</subProcess>

<boundaryEvent id="boundaryerror1" name="" cancelActivity="false" attachedToRef="subprocess1">
      <errorEventDefinition></errorEventDefinition>
</boundaryEvent>

<userTask id="alfrescoFileTaskError" name="Alfresco File Task Error" default="flow36" activiti:candidateGroups="POSReporting">
      <extensionElements>
        <activiti:formProperty id="tryAgain" name="Re-Attempt Alfresco Files Tasks" type="enum" required="true" writable="true">
          <activiti:value id="yes" name="Yes"></activiti:value>
          <activiti:value id="no" name="No"></activiti:value>
        </activiti:formProperty>
      </extensionElements>
</userTask>

<sequenceFlow id="flow35" name="" sourceRef="boundaryerror1" targetRef="alfrescoFileTaskError"></sequenceFlow>
2 REPLIES 2

trademak
Star Contributor
Star Contributor
Hi,

Is there a reason why you left out the errorCode attribute in the boundary error event definition?

Best regards,

robmckinnon
Champ on-the-rise
Champ on-the-rise
Hi,

Is there a reason why you left out the errorCode attribute in the boundary error event definition?

Best regards,

Tijs,

Thanks for the response. I went back and re-read the user guide and discovered that I was confused on how the the error event boundary functioned. The two key take aways for using error event boundaries were 1.) you need to throw a BpmnError in your code   and 2.) in the error event definition you need to refer to the errorCode that was referenced in the BpmnError. Again thanks for taking the time to respond.

Rob