Model Activity

An Activity represents work that is performed within a Process. An Activity can be modeled as a:

  • Sub-Process - a compound Activity that is defined as a flow of other BPMN elements or
  • Task - an atomic Activity that cannot be broken down into a smaller unit.

Activities - both Tasks and Sub-Processes - can also act as Looping constructs. The OMG BPMN 1.1 Specification defines two types of Looping construct:

  • Standard Loops (while or until)
  • Multi-Instance Loops (for each).

A Standard Loop has a boolean Condition that is evaluated after each cycle of the loop. If the evaluation is True, then the loop continues. If Test Time is set to After, the loop is equivalent to a while loop. If Test Time is set to Before, the loop is equivalent to an until loop.

A Multi-Instance Loop is equivalent to a for each loop and has a numeric expression as a Condition that is evaluated only once before the Activity is performed. The result of the evaluation specifies the number of times the loop is repeated.

Sub-Process

The BPMN Specification defines three types of Sub-Process:

  • Embedded
  • References
  • Reusable.

In Enterprise Architect, two of these Sub-Process types can be mapped to BPEL:

  • Embedded
  • References.

To create a new Sub-Process Activity in your model, follow the steps below.

  1. Open a BPEL diagram created under a BPEL Process.
  2. Drag the Activity element from the BPMN 1.1 Core page of the Toolbox onto the diagram. The BPEL Properties dialog displays.
     
    BPELActivityDlg

 

  1. In the Name field, type a name for the Activity.
  2. In the Type field click on the drop-down arrow and select the Sub-Process option.
  3. In the Task Type field click on the drop-down arrow and select the Sub Process type - Embedded or References.
  4. If you select Embedded, you do not have to set any other properties.
  5. If you select References, the Details tab displays as follows:
     
    SubProcActRefDlg
     
  6. To the right of the SubProcess field, click on the [ ... ] button and select a Sub-Process from the list of all Sub-Processes in the BPEL process.

Note:

Click on the UML button if you need to define further properties of the Activity, using the normal element Properties dialog.

Alternatively, right-click on the element and select the Properties context menu option.

  1. Click on the OK button to close the dialog.

To return to the BPEL Properties dialog for subsequent editing:

  • Double-click on the element in the diagram or Project Browser (the Shows Properties option must be selected in the Double click on browser panel of the Options dialog) or
  • Right-click on the element in the diagram or Project Browser and select the BPEL | BPEL Properties context menu option.

Task

The OMG BPMN 1.1 Specification defines eight types of Task:

  • Service
  • User
  • Receive
  • Send
  • Script
  • Manual
  • Reference
  • None.

In Enterprise Architect, six of these Task types can be mapped to BPEL, as per the OMG BPMN 1.1 Specification:

  • Service
  • User
  • Receive
  • Send
  • Reference
  • None.

To create a new Task Activity in your model, follow the steps below.

  1. Open a BPEL diagram generated under a BPEL Process.
  2. Drag the Activity element from the BPMN 1.1 Core page of the Toolbox onto the diagram. The BPEL Properties dialog displays.
     
    BPELActTaskDlg

 

  1. In the Name field, type a name for the Activity.
  2. In the Type field click on the drop-down arrow and select the Task option.
  3. In the Task Type field click on the drop-down arrow and select the Task type.

Depending on the Task type you select, further details might be required.

If you select None:

  1. No further details are required. Go to step 11

If you select Reference:

  1. The Details tab changes, as below.
     
    ActRefDlg

 

  1. To the right of the Activity field, click on the [ ... ] button and select an Activity from the list of all Tasks in the process.
  2. Go to step 11.

If you select Send:

  1. The Details tab changes, as below.
     
    ActSendDlg

 

  1. To the right of the Web Service field, click on the [ ... ] button and select a BPEL web service from the list.
  2. To the right of the Message field, click on the [ ... ] button and select a message from the list of all messages in the selected web service.
  3. Go to step 11.

If you select Receive:

  1. The Details tab changes, as below.
     
    ActReceiveDlg
     
  2. To the right of the Web Service field, click on the [ ... ] button and select a BPEL web service from the list.
  3. To the right of the Message field, click on the [ ... ] button and select a message from the list of all messages in the selected web service.
  4. In the Instantiate field click on the drop-down arrow and select True if this is the first Activity after the Start Event, otherwise select False.
  5. Go to step 11.

If you select Service or User:

  1. The Details tab changes, as below.
     
    ActivServDlg

 

  1. To the right of the Web Service field, click on the [ ... ] button and select a BPEL web service from the list.
  2. To the right of the Input Message field, click on the [ ... ] button and select a message from the list of all messages in the selected web service.
  3. To the right of the Output Message field, click on the [ ... ] button and select a message from the list of all messages in the selected web service.
  4. Go to step 11.

 

Resume the procedure:

  1. (Optional) Click on the Assignments tab.
     
    ActAssign

 

  1. To the right of the field, click on the [ ... ] button and select one or more Assignment elements from the list of Assignments created in the Supporting Elements package.
  2. (Optional) Click on the Loop Details tab.
     
    LoopDetailsDlg     MultiInstance Loop
     
  3. In the Type field click on the drop-down arrow and select the loop type - Standard or MultiInstance (the field defaults to None).
  4. In the Condition field, type the condition to be evaluated (boolean for a Standard loop, numeric expression for a MultiInstance loop).
  5. In the Min Value field, type the minimum value for the evaluation.
  6. (Standard loop) In the Max Value field type the maximum value for the evaluation.
  7. (Standard loop) In the Test Time field click on the drop-down arrow and select After to define a while loop or Before to define an until loop.

Note:

Click on the UML button if you need to define further properties of the Activity, using the normal element Properties dialog.

Alternatively, right-click on the element and select the Properties context menu option.

  1. Click on the OK button to close the dialog.

 

To return to the BPEL Properties dialog for subsequent editing:

  • Double-click on the element in the diagram or Project Browser (the Shows Properties option must be selected in the Double click on browser panel of the Options dialog) or
  • Right-click on the element in the diagram or Project Browser and select the BPEL | BPEL Properties context menu option.