Featured Post

Applying Email Validation to a JavaFX TextField Using Binding

This example uses the same controller as in a previous post but adds a use case to support email validation.  A Commons Validator object is ...

Saturday, December 14, 2013

Creating a BPMN 2.0 Subprocess in Enterprise Architect

An Activity is a fundamental type in Business Process Model and Notation (BPMN) 2.0.  There are three types of Activities in BPMN 2.0: Task, Subprocess, and Call Activity.  This blog post describes how to model a Subprocess using Sparx Systems Enterprise Architect.

In BPMN 2.0, a Subprocess is a composite Activity.  The Subprocess is part of an overall process consisting of elements like Activities and Sequence Flows.  The Subprocess itself can contain these elements and presents itself in either a collapsed or expanded view.

To create a Subprocess in Sparx Systems Enterprise Architect, create a BPMN 2.0 model using the New Model Wizard.  Selecting the root node in a project, press Ctrl-Shift-M and select BPMN 2.0 / Business Process.

This generates a sample BPMN 2.0 diagram and elements.

Stock BPMN 2.0 Model in EA Project Browser
Remove the generated diagram and Pools by selecting the three items in the Project Browser, right-clicking, and selecting Delete Selected Items.  Do not remove the top-level View.

Create a Top-Level Process

With the top-level View selected, press Ctrl+Insert which will insert a new diagram.  Select BPMN 2.0 / Business Process.

From the BPMN 2.0 Toolbox, drag an Activity on the diagram.  Select "Abstract" from the popup menu.  Enter "Place Order" for the name.  Repeat this two more times, naming the other Abstract Activities "Fill Order" and "Ship Order".

Connect the 3 Activities using the Sequence Flows in the BPMN 2.0 Toolbox.  Select Sequence Flow.  The cursor will change to a hand icon.  Drag from the middle of Place Order to the middle of Fill Order.  Press F3 to repeat the Sequence Flow selection and drag from the middle of Fill Order to the middle of Ship Order.


Simple BPMN 2.0 Process of Three Activities
At this point, you have created a simple BPMN 2.0 Process containing three Activities of type "Task".  This next sequence of steps will expand the Place Order Activity to include its own sequence of steps which can be hidden from the top-level diagram.

Create the Subprocess

With the Place Order Activity select, right-click and select New Diagram / Add Diagram.  Select BPMN 2.0 / Business Process.  Select this new diagram.  An empty canvas appears.

Add three activities as was done for the initial diagram.  Call these "View Inventory", "Select Item", and "Make Payment".  Add Sequence Flows from View to Select to Make.

Activities Within the Place Order Subprocess
Note that the Project Browser shows the nesting of the subprocess.

Activities within a Subprocess
Change the Activity Type


Return to the top-level process.  Select the Place Order Activity and bring up the Properties window.  Select the BPMN 2.0 tab. Under Activity / Activity Type, change Task to Sub-Process.

BPMN 2.0 Properties
The resulting diagram adds the plus symbol to the Activity to identify it as a Subprocess.

BPMN 2.0 Process with Subprocess
Link the Diagram

The final step is to tell EA that Place Order contains a diagram.  Right now, if you double-click on the Place Order Activity, you'll get the Properties Window just as if you had clicked on a Task.  To allow for drilling down, right-click on Place Order, select New Diagram, then Composite Structure Diagram.  By default, this will select the only diagram within Place Order.  If there are more, you can specify which one to display with the double-click.


Expanded Subprocess

The diagram shows a Collapsed Subprocess.  To view an Expanded Subprocess, right-click the Place Order Activity, select New Diagram and check Show Composite Diagram in Compartment.


I've noticed some glitches when working with BPMN, so I recommend resizing the Place Order Activity to something that can contain the digram prior to making the Show Composite setting.  These glitches are more apparent working with the Pools and Messages where selecting in different parts of the diagrams messes up the connectors.  I'm running EA 10.09 in this example.  Sparx Systems' support told me that these glitches are fixed in a later release.


7 comments:

  1. Thanks for the help! I have also found BPMN 2.0 Examples through lucidchart that are very easy to use!

    ReplyDelete
  2. Very helpful, many thanks!

    ReplyDelete
  3. Thanks! very helpful in quick adaptation of EA.

    ReplyDelete
  4. sadly the glitches are still not fixed in 12.1 ...
    anyway great explanation!

    ReplyDelete
  5. Thanks v much .. it was very easy to follow and helpful ..

    ReplyDelete
  6. I really liked your Information. Keep up the good work. BPMN

    ReplyDelete