IBM BPM, V8.0.1, All platforms > Create processes in IBM Process Designer > Modeling processes > Create a business process definition (BPD) > Subprocess types

Modeling event subprocesses

Event subprocesses are triggered by an event that occurs in the parent process. Event subprocesses are similar to other subprocesses in that they are contained within a parent process, and are not reusable outside of that process. They are unlike other subprocesses in that they are not connected to other activities in the process by incoming or outgoing connections, but are instead triggered by an event or timer.

The event subprocess is a specialized subprocess that you can use to model event-handling logic for a process or subprocess. It is triggered upon occurrence of a configured start event, and as a result it is not connected to other steps through sequence flow. It has access to the business objects (variables) of its parent process and so can encapsulate steps that use those variables. When triggered, an event subprocess can either interrupt the execution of its parent or it can run in parallel.

You can use event subprocesses to handle exceptional process flows within your process.

For example, an event subprocess can be used to handle an out-of-stock situation that arises during an order-fulfilment process. The out-of-stock event in the parent process triggers the start event in the event subprocess, which contains activities to order more stock or to check supplies at other locations.

An event subprocess can have only one start event. The start event implementation is represented visually in the event subprocess activity in the parent process. It can have any of the following implementation types:

Event subprocess implementation types and visualizations
Start event implementation type Event subprocess visualization
Error

Message

Timer

A parent process cannot complete until all active event subprocesses are complete, unless the parent is terminated by a terminate end event. A terminate end event in an event subprocess terminates only the activities that are contained within that event subprocess.

Boundary events cannot be attached to event subprocesses. To handle exceptions within an event subprocess, for example, errors that arise during the event subprocess execution, event subprocesses can themselves contain event subprocesses.

To add an event subprocess to your BPD:


Procedure

  1. Open the parent business process definition (BPD) in the Process Designer.

  2. Drag an activity from the palette onto the diagram area, and type the name of the activity in the highlighted box.

  3. In the Implementation tab of the Properties view, select Event Subprocess. The visualization of the activity in the diagram is updated to reflect the event subprocess activity type. By default, new event subprocesses are assigned an error start event.

  4. To change the start event type and properties and to add activities to the event subprocess, double-click the event subprocess activity to expand it.

  5. Select the start event and, from the Implementation tab in the properties view, select a new implementation type from the list.

  6. The start events for event subprocesses can be interrupting or non-interrupting. When triggered, event subprocesses with an interrupting start event terminate all activities in the parent process. Activities in an event subprocess with a non-interrupting start event run in parallel with the parent process. You can specify whether the start event of the event subprocess is interrupting or non-interrupting by selecting or by clearing Interrupt Parent Process.

    Error start events in an event subprocess always interrupt the parent process and cannot be set to non-interrupting.

  7. To configure an event subprocess to be repeatable, select Repeatable? on the Implementation tab. When you select this property, the event subprocess might run several times during the execution of a process, and might have multiple instances that run in parallel.

    Unlike subprocesses, looping behavior is not supported for event subprocesses.

  8. Drag elements from the palette onto the canvas. The names of the activities created in your subprocess must be different from the names of the activities in the top-level process or any other subprocess or event subprocess under the same top-level process.

    Any swimlanes or milestones that you add to your subprocess are independent from the swimlanes and milestones that are contained in the parent BPD.

  9. Like subprocesses, event subprocesses have access to the data of the parent process. Data mapping is not required to pass data into or out of the event subprocess. You can also declare private variables within the event subprocess itself, which are not visible to the parent BPD.


What to do next

To return to the parent BPD, use the navigation in the upper left of the canvas.

Subprocess types


Related concepts:
Modeling message events