Prev Next

Event Sub-Process

Event Sub-Processes enable your system to handle an Event within the context of a given Sub-Process or Process. An Event Sub-Process always begins with a Start Event; it is not instantiated by normal control flow, but only when the associated Start Event is triggered. Event Sub-Processes are self-contained and MUST not be connected to the rest of the Sequence Flows in the Sub-Processes.

  • If the isInterrupting attribute of its Start Event is set, an Event Sub-Process cancels execution of the enclosing Sub-Process
  • If the isInterrupting attribute is not set, execution of the enclosing Sub-Process continues in parallel to the Event Sub-Process

In this example, we demonstrate how Interrupting and Non-Interrupting Event Sub-Processes affect the life line of the enclosing Sub-Process and Process.

Create BPMN Model

Model the main process

  • Create a StartEvent Start1
  • Add a Sequence Flow to a target Parallel Gateway element fork
  • Add a Sequence Flow to
         -  a Sub-Process subProcess1, and from that add a Sequence Flow to a target End Event element
            End1
         -  an abstract Task Task5, and from that add a Sequence Flow to a target End Event element End2

Tips on how to model an Event Sub-Process

  • Drag an Activity from the 'BPMN2.0 - Business Process' toolbox onto the diagram
  • Double-click on the Activity to display the 'Properties' dialog and, in the 'Type' field, select 'subProcess'; set 'triggeredByEvent' to 'true' and click on the OK button
  • Right-click on the element and select the 'Is Expanded' option; this will display the element name on the top left corner

Model the Event Sub-Processes for the main process

  • Create an Event Sub-Process subProcess4
         -  Create a Timer Start Event Start5(@60), then double-click on it to display the 'Properties' dialog
            and, in the 'Type' field, select 'Event Sub-Process Non-Interrupting > Timer'; click on the OK button
         -  Add a Sequence Flow to a target abstract task Activity Task6(2000)
         -  Add a Sequence Flow to a target End Event element End6
  • Create an Event Sub-Process subProcess5
         -  Create a Timer Start Event Start6(@80), then double-click on it to display the 'Properties' dialog
            and, in the 'Type' field, select 'Event Sub-Process Interrupting > Timer'; click on the OK button
         -  Add a Sequence Flow to a target abstract task Activity Task7(2000)
         -  Add a Sequence Flow to a target End Event element End7

Model the Sub-Process subProcess1 and the enclosed Event Sub-Processes

  • Create a StartEvent Start2
         -  Add a Sequence Flow to a target abstract task Activity Task1(150)
         -  Add a Sequence Flow to a target End Event End3
  • Create an Event Sub-Process subProcess2
         -  Create a Timer Start Event Start3(@20), then double-click on it to display the 'Properties' dialog
            and, in the 'Type' field, select 'Event Sub-Process Non-Interrupting > Timer'
         -  Add a Sequence Flow to a target abstract task Activity Task2(100)
         -  Add a Sequence Flow to a target End Event element End4
  • Create an Event Sub-Process subProcess3
         -  Create a Timer Start Event Start4(@30), then double-click on it to display the 'Properties' dialog
            and, in the 'Type' field, select 'Event Sub-Process Interrupting > Timer'
         -  Add a Sequence Flow to a target abstract task Activity Task3(40)
         -  Add a Sequence Flow to a target abstract task Activity Task4(20)
         -  Add a Sequence Flow to a target End Event element End5

Configure BPSim

Using this table, we create the Artifact in the configuration Package and configure the parameter values of each element.

Task

Action

Create Artifact

  • Open the Configure BPSim window ('Simulate > BPSim > Manage > Open BPSim Manager')
  • Create an Artifact named 'Event Sub Process Interrupting and Non-Interrupting' (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.

InterTriggerTimer for Start Events in Event Sub-Process

From the tree on the left of the 'Configure BPSim' dialog, expand 'StartEvent'.

For each of the elements listed here, on the 'Control' tab click on the drop-down arrow in the 'New Parameter...' field and select the parameter 'InterTriggerTimer'. Click on the button in the 'Value' field to open the 'Parameter' dialog and select 'Constant > Numeric', then type in the value and select 'seconds'.

  • Start3(@20): 20 seconds
  • Start4(@30): 30 seconds
  • Start5(@60): 60 seconds
  • Start6(@80): 80 seconds

ProcessingTime for Tasks

From the tree on the left of the Configure BPSim window, expand 'Activity'.

For each of the elements listed here, on the 'Time' tab click on the drop-down arrow in the 'New Parameter...' field and select the parameter 'ProcessingTime'. Click on the button in the 'Value' field to open the 'Parameter' dialog and select 'Constant > Numeric', then type in the value and select 'seconds'.

  • Task1 (150): 150 seconds
  • Task2 (100): 100 seconds
  • Task3 (40): 40 seconds
  • Task4 (20): 20 seconds
  • Task5 (1000): 1000 seconds
  • Task6 (2000): 2000 seconds
  • Task7 (2000): 2000 seconds

Run Simulation

  • On the 'Configure BPSim' dialog Toolbar, click on the 'Run' icon to open the 'BPSim Simulation Controller' dialog
  • Click on the 'Run' icon drop-down arrow and select 'Standard Simulation'

Analysis

Reading the results, it might not be completely straightforward to see what has happened; however, if we draw the lifeline for each task in a Timing diagram, it becomes clearer.

  • Event Start3(@20) is Non-Interrupting, it did not stop Task1 at 20 seconds
  • Event Start4(@30) is Interrupting, it stopped Task1 and Task2 at 30 seconds; it did not affected Task5 because Task5's enclosing process (main process) level is higher than Start4's enclosing Sub-Process (subProcess1)
  • Event Start5(@60) is Non-Interrupting, it started Task6 at 60 seconds without affecting Task3 or Task5
  • Event Start6(@80) is Interrupting, it started Task7 at 80 seconds and interrupted the running Tasks (Task4, Task5, Task6) that were in the same or lower level of its enclosing process
  • Only End7 is reached as expected