BPMN task and sub-process

A business process (BPMN) is mainly formed by activities that need to be performed to complete the process. There are two kinds of activities in business process modeling - task and sub-process. You draw a task when the work in the process cannot be broken down to a finer level of detail. You use a sub-process when you want to model the internal details of work in a lower-level process diagram.

A BPMN task is an atomic activity which represents work that is not broken down. On the contrary, sub-process represents work that is broken down to a finer level of detail.

Task and sub-process
Task and sub-process

Task markers

You can assign markers to task. There are three markers: Loop, Multi-Instance, Compensation. A task can have one or two of these markers. Assignment of markers is done through the specification dialog box of task.

Name Representation Description
Loop Loop
This marker indicates that the task will loop as long as the condition that defined in the loop is true. The condition is evaluated in each iteration, at either the beginning or the end of iteration. This marker can be used in combination with the compensation marker.

Multi-instance
(parallel instances)

Multi-instance (parallel instances)
This marker indicates the execution of task in a desired number of instances or in a data driven approach. The instances will be started at the same time.
Multi-instance (sequential instances)
Multi-instance (sequential instances)
This marker indicates the execution of task in a desired number of instances or in a data driven approach. The instances will be executed one after the other.
Compensation Compensation
To undo (cancel) the result of another activity that have already been successfully completed. The execution of compensation task is due to the undesired results and possibily side effects produced by antoher activity that need to be reversed.

 

A compensation task is performed by a compensation handler, which performs the steps necessary to reverse the effects of an activity.

Different markers of task

Adding a Loop marker

  1. Right click on a task and select Open Specification... from the popup menu.
  2. Select Standard Loop for Loop type. Click OK to confirm the changes.
    NOTE: You can click on the ... button next to Loop type to set the loop condition, counter and the maximum number of iteration.

Adding a Multi-instance marker

  1. Right click on a task and select Open Specification... from the popup menu.
  2. Select Multi-Instance Loop for Loop type. Click OK to confirm the changes.
    NOTE: You can click on the ... button next to Loop type to set the ordering of loop, either parallel or sequential.

Adding a Compensation marker

  1. Right click on a task and select Open Specification... from the popup menu.
  2. Check Compensation at the bottom of specification and click OK to confirm the changes.

Task types

In business process modeling there are several types of task for you to separate the behavior of different tasks. You can set a type by right clicking on a task and selecting Type, then the type from the popup menu.

Name Representation Description
Service Service
A service task is a task that uses some sorts of service, e.g. a Web service.
Send Send
A send task is a task that sends a message to an external participate. The task is said to be completed once the message has been sent.
Receive Receive
A receive task is a task that waits for a message to arrive from an external participant. The task is said to be completed once the message has been received.
User User
A user task is a task performed by a human with the assistance of a software application.
Manual Manual
A manual task is a task that is performed without the aid of any business process execution engine.
Business Rule Business Rule
A business rule task allows the process to provide input to a business rules engine and to get the output from engine.
Script Script
A script task involves a script defined by modeler or implementer in a language that a business process engine can understand and is executed by a business process engine.
Reference Reference
A reference task refers to another task for its content.
Types of tasks

Sub-process markers

You can assign markers to sub-process. There are four markers: Loop, Multi-Instance, Ad-hoc and Compensation. A sub-process can have up to three markers, excluding the marker for collapsed: A loop/multi-instance marker, an Ad-hoc marker, and a Compensation marker. Assignment of markers is done through the specification dialog box of sub-process.

Name Representation Description
Loop Loop
This marker indicates that the sub-process will loop as long as the condition that defined in the loop is true. The condition is evaluated in each iteration, at either the beginning or the end of iteration. This marker can be used in combination with the ad-hoc and/or compensation marker.

Multi-instance
(parallel instances)

Multi-instance (parallel instances)
This marker indicates the execution of sub-process in a desired number of instances or in a data driven approach. The instances will be started at the same time.
Multi-instance (sequential instances)
Multi-instance (sequential instances)
This marker indicates the execution of sub-process in a desired number of instances or in a data driven approach. The instances will be executed one after the other.
Ad-hoc
Ad-hoc
This marker indicates that a sub-process is a group of activities that have no required sequence relationship. The sequence and number of performances for activities are determined by the performers of the activities.
Compensation Compensation
To undo (cancel) the result of another activity that have already successfully completed. The execution of compensation sub-process is due to the undesired results and possibly side effects produced by another activity that need to be reversed.

 

A compensation sub-process is performed by a compensation handler, which performs the steps necessary to reverse the effects of an activity.

Different markers of sub-process

Adding a Loop marker

  1. Right click on a sub-process and select Open Specification... from the popup menu.
  2. Select Standard Loop for Loop type. Click OK to confirm the changes.
    NOTE: You can click on the ... button next to Loop type to set the loop condition, counter and the maximum number of iteration.

Adding a Multi-instance marker

  1. Right click on a sub-process and select Open Specification... from the popup menu.
  2. Select Multi-Instance Loop for Loop type. Click OK to confirm the changes.
    NOTE: You can click on the ... button next to Loop type to set the ordering of loop, either parallel or sequential.

Adding an Ad-hoc marker

  1. Right click on a sub-process and select Open Specification... from the popup menu.
  2. Make sure the type of sub-process is set to be Embedded Sub-Process. Check Ad-hoc in the Details section and click OK to confirm the changes.

Adding a Compensation marker

  1. Right click on a sub-process and select Open Specification... from the popup menu.
  2. Check Compensation at the bottom of specification and click OK to confirm the changes.

Sub-process types

There are several types of sub-process for you to separate the behavior of different sub-processes. You can set a type by right clicking on a sub-process and selecting Type, then the type from the popup menu.

Name Representation Description
Embedded Embedded
An embedded sub-process is a sub-process that models its internal details in another process.
Reusable Reusable
A reusable sub-process calls a pre-defined process.
Reference Reference
A reference sub-process refers to another sub-process.
Types of tasks

Breaking down a sub-process

A sub-process can be opened up to model the detail in a lower level. To open up a sub-process, click on the plus marker in sub-process and select New Business Process Diagram. This will create a new business process diagram that belongs to the sub-process. In the sub-process diagram you will see the in/out flows that allow you to connect the flow from parent to sub-diagram. Click here you if you want to learn more about in/out flows.

To break down a sub-process
To break down a sub-process
NOTE: Once a sub-process diagram is created, its detail will be shown as the sub-process shape as a thumbnail of the diagram. To hide the thumbnail, click on the minus marker at the bottom of sub-process to turn it off.

Re-using elements from parent diagram

In the sub-process diagram, you can re-use pools, lanes and flow objects that appear in the parent diagram. To do this, right click on the sub-process diagram and select Add Pools/Lanes/Sub-Processes/Gateways from Parent Diagram... from the popup menu, and choose the element to reuse. Elements being re-used will have dog ear appeared at their corners.

A sub-process diagram with a lane reused from parent diagram
A sub-process diagram with a lane reused from parent diagram

You can jump from a re-used element back to the parent diagram through the resource-centric interface.

Jump to parent diagram
Jump to parent diagram

Defining procedure of activity

An activity within a process represents work need to be done. Each activity can be formed by a number of steps. For example, a task Process Application involves 2 steps - validate application, confirm application. To document the steps of an activity, you can make use of the procedure editor.


Procedure of a task

An overview of procedure editor

An overview of procedure editor
An overview of procedure editor
No. Name Description
1 Collapse/Expand Click on the triangle on the left hand side to maximize the editor. On the contrary, click on the inverted triangle to minimize the editor.
2 Procedure selector You can define multiple set of procedure per activity. Click on this drop down menu to select the one you want to read/edit.
3 Step
Click on this button to create a step under the step selected in editor.
4 Hyperlink... Add a link in the selected step for reference.
5 Font formats selector There are three buttons. While the first one increases the font size for one level, the second one decreases the font size for one level and the third button resets the font size setting to default.
6 Font size setting selector Click on this drop-down menu to select the sizes of highlighted text. Press Grow Font button to increase the font size for one level, press Shrink Font button to decrease the font size for one level and press Default Font button reset the font size setting to default. Moreover, you can adjust the font size for the highlighted text manually by slider.
7 Reorder step
Click on Move Up button to move the selected step upwards or Move Down button to move the selected step downwards.
8 Decrease Indent/ Increase Indent Click on Decrease Indent button to reduce the indentation of the selected step or click on Increase Indent button to indent the selected step.
9 Undo/ Redo Click on Undo button to revert change or click on Redo button to redo reverted change.
10 Close editor
Click on this button to close the editor.
11 Steps editor
The place where you can read and edit steps.
Description of procedure editor

Showing/Hiding procedure editor

The procedure editor is opened in business process diagram by default. To hide it, right click on the background of business process diagram and deselect Show Procedure Editor from the popup menu. You can select the same menu to show it when hidden.

NOTE: Alternatively, you can close the editor by clicking on the cross button at the top right corner of editor panel.

Documenting the procedure

  1. Select the task or sub-process that you want to document its procedure.
  2. Click on the first row labelled 1 and enter the first step.
  3. Press Enter to go to the next step. You can create a sub-step by pressing Tab on a step. Pressing Shift-Tab decreases the indentation of a sub-step. Repeat step 2 and 3 to enter the remaining steps the activities involve.

Related Resources

The following resources may help you to learn more about the topic discussed in this page.

 
2. Pool and lane Table of Contents 4. Event
 

Technical Support

Have technical issues or suggestions? Please contact Visual Paradigm Support Team.

Sales Support

Have questions related to registration, licensing or payment? Feel free to contact Visual Paradigm Sales Team.

Discussion Forum

Share your suggestions of opinions at VP Discussion Forum.