Problem with Boundary Error Event

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2012 06:31 PM
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>
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>
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2012 02:59 AM
Hi,
Is there a reason why you left out the errorCode attribute in the boundary error event definition?
Best regards,
Is there a reason why you left out the errorCode attribute in the boundary error event definition?
Best regards,

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2012 08:42 AM
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
