Model Structure and Reuse
A Business Process can be re-used by encapsulating the Pool (see Notes at the end of this topic). Once the Pool is encapsulated, a Business Process is created that is referenced by the Pool's Tagged Value processRef. At this point, elements that appeared in the Pool on the diagram will be nested in the referenced Business Process.
In Enterprise Architect, a BPMN Participant is represented by the Pool element. When you export your BPMN model to another tool, in order to comply with the BPMN 2.0 specification the Pool is interpreted as a Participant in the XML. On import to Enterprise Architect, a Participant is interpreted as a Pool.
You can also use a Call Activity to reference another Business Process. As an illustration:
- Drop an Activity element onto a diagram.
- Open the element's 'Properties' dialog.
- On the 'BPMN2.0' tab, click on the drop-down arrow in the Type field and select 'callProcessActivity'.
- In the Activity Tagged Value list, click on the button at the right of the calledActivityRef Tagged Value, and browse for the appropriate Business Process.
- Click on the browser and on the 'Properties' dialog OK button.
Now, whenever you move an element onto this Call Activity, it will be nested in the referencing Business Process.
BPMN 2.0 Sequence Flow and Message Flow Rules
Rules concerning the use of Sequence Flows and Message Flows, as defined in the BPMN 2.0 Specification and described here, are implemented by the BPMN 2.0 UML profile.
These rules apply to Sequence Flows in relation to Events (Start, Intermediate and End), Activities (Task and Sub-Process, for Processes), Choreography Activities (Choreography Task and Sub-Choreography, for Choreographies) and Gateways:
- A Sequence Flow cannot cross a Pool boundary
- An End Event cannot be the source element for a Sequence Flow
- A Start Event cannot be the target element for a Sequence Flow
- An Intermediate Event, if edge mounted on an Activity element, cannot be the source element for a Sequence Flow; it cannot have incoming Sequence Flows
- An Intermediate Event - if edge mounted on an Activity element and having the Tagged Value eventDefinition=Compensation, cannot be either the source or target element for a Sequence Flow
- Objects within a Sub-Process cannot have a Sequence Flow relationship with objects outside the Sub-Process
- A Sequence Flow cannot connect directly to a Pool
These rules apply to Message Flows in relation to Events (Start, Intermediate and End), Activities (Task and Sub-Process, for Processes), Choreography Activities (Choreography Task and Sub-Choreography, for Choreographies) and Pools:
- Message Flows can be created from objects in one Pool to objects in another Pool; Message Flows can connect directly to another Pool
- A Message Flow can connect to Events (Start, Intermediate and End) only if they have the Tagged Value eventDefinition=Message or eventDefinition=Multiple
- A Start Event cannot be the source element for a Message Flow
- An End Event cannot be the target element for a Message Flow
Generate Call Activities
If you drag a BPMN 2.0 Global Task or Business Process element from the Browser window onto a diagram, the system creates a Call Activity element containing Tagged Values appropriate to the type of element from which the Call Activity was generated.
Grammar of Pools and Lanes
- If a Pool element has the partnerEntity and partnerRole Tagged Values assigned, and an empty 'Name' field, the element will display the Tagged Values
- If a Lane element has the partitionElementRef Tagged Value assigned, and an empty 'Name' field, the element will display the Tagged Value
- When you create Lanes in a Pool, the first Lane will fill half the Pool and subsequent Lanes will fill the remaining space
- In the Browser window, you can right-click on the diagram, Pool or Collaboration model and select 'Encapsulate Process', which will move all the object's nested elements to a Business Process; elements placed inside the encapsulated element (during diagramming) will be moved to the Business Process
- Encapsulating the diagram and the Collaboration/Choreography model give the same result; the action:
- Creates a 'main Pool' that the Collaboration Model will reference via the mainPool Tagged Value
- Creates a Business Process that the 'main Pool' will reference via the processRef Tagged Value
- Moves everything nested in or added to the Collaboration (minus pools and diagrams) to the
new Business Process
- When you create a BPMN 2.0 diagram, the system prompts you to select whether or not to create an encapsulating element for the diagram; that is, a:
- Business Process for a Business Process diagram
- Choreography Model for a Choreography diagram
- Collaboration Model for a Collaboration or BPEL diagram
- Conversation Model for a Conversation diagram
- When a Pool is dropped onto a BPMN diagram that is directly under a Package (and only in this circumstance), the system prompts you to select whether or not to create a Collaboration Model for the Pool (rather than always creating the Collaboration Model)
- The two prompts each have the checkbox 'Do not show this message again' that, if checked, blocks the prompt from displaying and retains the current setting as the automatic action; you can reset the checkbox to unselected using the on the 'Diagram > Behavior' page of the 'Preferences' dialog
- Encapsulating supports the re-use of processes, in that you can create links to Pools in other Collaboration models for diagramming, and elements moved into them will be placed in the same Business Process (since the Pool represents a Process)