Prev Next

Error Event

When an Intermediate Error Event connects to the boundary of an Activity, it becomes part of an exception flow. The event is triggered when a token causes a fault name to be raised in the normal flow, going through to an Error End Event.

Create BPMN Model

Create the main process

  • Create a Start Event s1
  • Add a Sequence Flow to a target Activity element subProcess1; enlarge the Activity and right-click, selecting the 'Is Expanded' option, then open the 'Properties' dialog and set 'Type' to 'subprocess'
  • Add a Sequence Flow to a target End Event element e1 ('Type' set to 'None')
  • Create three Boundary Intermediate Events, dragging the elements from the Toolbox and dropping them on subProcess1; from the instant menus select 'Edge-Mounted' and 'Error':
         -  error_ie_fault1; add a Sequence Flow to a target EndEvent element e2 ('Type' set to 'None')
         -  error_ie_fault2; add a Sequence Flow to a target EndEvent element e3 ('Type' set to 'None')
         -  error_ie_default; add a Sequence Flow to a target EndEvent elemenr e4 ('Type' set to 'None')

Create the subprocess

Within the subProcess1 Activity:

  • Create a Start Event s2, 'Standalone' and set 'Type' to 'None'
  • Create a Sequence Flow to a target Gateway element set to 'Exclusive' and with the name '40,10,20,30 Probabilities'
  • Create Sequence Flows to four target Activiy elements of Type 'abstractTask' called:
         -  Task1, and add a Sequence Flow to a target EndEvent called normal_end, 'Type' set to 'None'
         -  Task2, and add a Sequence Flow to a target EndEvent called error_end_fault1, 'Type' set to 'Error'
         -  Task3, and add a Sequence Flow to a target EndEvent called error_end_fault2, 'Type' set to 'Error'
         -  Task4, and add a Sequence Flow to a target EndEvent called error_end_default, 'Type' set to
             'Error'

Create BPMN2.0::Error elements

Create the Error elements Fault1 and Fault2, which will be used as error code by Events.

  • Double-click on the error_end_fault1 element and, in the 'Properties' dialog 'BPMN2.0' tab, locate the 'errorRef' tag
  • In the 'Value' field, click on the button and browse to the Package containing this model
  • Click on the Add New button and, in the 'Name' field, type the name Fault1, then click on the Save button
  • Again click on the Add New button and, in the 'Name' field, type the name Fault2, then click on the Save button
  • Click on the OK button, and again on the next OK button

Set up Events for Error Codes

  • Double-click on the error_end_fault1 element and, in the 'Properties' dialog 'BPMN2.0' tab, locate the 'errorRef' tag
  • In the 'Value' field, click on the button and browse to the Package containing this model
  • Click on Fault1, then on the OK button, and again on the OK button.

Do the same for these elements:

  • error_end_fault2, clicking on Fault2
  • error_ie_fault1, clicking on Fault1
  • error_ie_fault2, clicking on Fault2

Configure BPSim

Object

Action

Artifact & Package

  • Open the Configure BPSim window ('Simulate > BPMN/BPSim > Manage > Open BPSim Manager')
  • Create an Artifact named 'IntermediateEvent - Boundary - Error' (in the 'Select/Create Artifact' field, click on the button and select its parent Package and click on the Add New button, then type in the element name and click on the Save button and the OK button)

Then all the BPMN elements will be loaded in to the Configure BPSim window.

s1

  • From the tree on the left of the Configure BPSim window, expand 'StartEvent' and click on 's1'
  • On the 'Control' tab, in the 'New Parameter...' field, click on the drop-down arrow and select 'TriggerCount'
  • In the 'Value' field, type '100'

Probability

From the tree on the left of the Configure BPSim window, expand 'Gateway | 40,10,20,30 Probabilities'.

Tips: You can also float the Configure BPSim window, then click on the element or connectors on the BPMN diagram; the element in the Configure BPSim window will be automatically selected.

For each of the Taskn elements, in the 'Control' tab click on the 'New Parameter' drop-down arrow and select 'Probability', then type the corresponding value in the 'Value' field:

  • For Task1 type '0.4'
  • For Task2 type '0.1'
  • For Task3 type '0.2'
  • For Task4 type '0.3'

Run Simulation

  • On the 'Configure BPSim' dialog Toolbar, click on the 'Run' icon to open the 'BPSim Controller' dialog
  • Click on the Run button and select 'Standard Simulation'
  • The results of the simulation resemble this:

Analysis:

The Probability set on the Sequence Flows outgoing from 40,10,20,30 Probabilities are 0.4, 0.1, 0.2 and 0.3 respectively.

  • 36 out of 100 passes finished at normal_end, which flowed to e1
  • 11 out of 100 passes finished at error_end_fault1, which triggered error_ie_fault1 by the ErrorRef Fault1, and the exception flowed to e2
  • 23 out of 100 passes finished at error_end_fault2, which triggered error_ie_fault2 by ErrorRef Fault2, and the exception flowed to e3
  • 30 out of 100 passes finished at error_end_default, which triggered error_ie_default because they did not set ErrorRef and the exception flowed to e4

The numbers 36, 11, 23 and 30 add up to 100, which was set as the TriggerCount in s1, so they match the 100% probability