Prev Next

Paint Wall Process Simulation (Call Activity)

This is a simple example to simulate the process of painting a wall. We define the main process as preparing the surface and then painting it three times. Preparing the surface is further divided into tasks such as sanding and cleaning.

We assume that applying each of the three coats of paint is the same process, except that the time randomly spent on each coat might be different.

Create BPMN Model

This simulation operates on two processes.

The main process - Paint Wall Process

Example BPMN Business Process Simulation in Sparx Systems Enterprise Architect

  1. Create a Start Event called S1.
  2. Add a Sequence Flow to a target callProcessActivity called Call Prepare Surface.
  3. Add a Sequence Flow to a target callGlobalTaskActivity called Coat Surface 1st Round.
  4. Add a Sequence Flow to a target callGlobalTaskActivity called Coat Surface 2nd Round.
  5. Add a Sequence Flow to a target callGlobalTaskActivity called Coat Surface 3rd Round.
  6. Add a Sequence Flow to a target End Event called E1.

The re-used process - Prepare Surface Process

Example BPMN Business Process for Simulation in Sparx Systems Enterprise Architect

  1. Create a Start Event called S2.
  2. Add a Sequence Flow to a target Abstract Task called Sand Surface.
  3. Add a Sequence Flow to a target Abstract Task called Clean Surface.
  4. Add a Sequence Flow to a target End Event called E2.

Set Global Task and re-used process to call Activities

  1. Create a Global Task Activity called Coat Surface.
  2. Double-click on each of Coat Surface 1st Round, Coat Surface 2nd Round and Coat Surface 3rd Round, and set the tag 'calledActivityRef' to Coat Surface.
    Tip: You can also drag the Global Task 'Coat Surface' from the Browser window and drop it on the Call Activity element, clicking the 'Set calledActivityRef' option on the context menu.
  3. Double-click on Call Prepare Surface and set the tag 'calledActivityRef' to Prepare Surface Process.
    Tip: You can also drag the process 'Prepare Surface Process' from the Browser window and drop it on the Call Activity element, clicking the 'Set calledActivityRef' option on the context menu.

Configure BPSim

  1. Open the 'Configure BPSim' dialog ('Simulate > Process Analysis > BPSim > Open BPSim Manager').
  2. Click on the icon and create a Business Process Simulation Artifact named Paint Wall Simulation.
  3. Click on the icon and select the Package containing the corresponding BPMN 2.0 model.

Object

Activity

Fixed Scaling Time

  1. Open the 'Prepare Surface Process' diagram.
  2. Click on the Activity Sand Surface and, on the Configure BPSim window, click on the New Parameter drop-down arrow and create a Time parameter called 'Processing Time'.
  3. In the 'Values' field, change the setting to 0 00:30:00 (that is, 30 minutes).
  4. Click on the Activity Clean Surface and, on the Configure BPSim window, click on the New Parameter drop-down arrow and create a Time parameter called 'Processing Time'.
  5. In the 'Values' field, change the setting to 0 00:10:00, (that is, 10 minutes).
  6. Click on the icon.

Random Coating Time

  1. In the Browser window, click on the Global Task Activity Coat Surface.
  2. In the Configure BPSim window, click on the New Parameter drop-down arrow and create a Time parameter called 'Processing Time'.
  3. In the 'Values' field click on the Browse. button, and on the parameter dialog click on the 'Distribution' tab and on 'Poisson'.
  4. In the 'Mean' field type '10', then click on the OK button.
  5. Click on the icon.

With this setting, the mean value of the random numbers generated by the Poisson distribution is 10. If you prefer, you can choose other types of distribution.

TriggerCount on S1

On the 'Paint Wall Process' diagram click on the Start Event S1.

  1. In the Configure BPSim window, click on the New Parameter drop-down arrow and create a Control parameter called 'TriggerCount'.
  2. In the 'Values' field type '1'.
  3. Click on the icon.

Run Simulation

  1. On the 'Execute' tab of the Configure BPSim window, click on the icon.

When the simulation is complete, it provides a result similar to this:

Flow Analysis

For the only token started on S1, we can see from the Configure BPSim window 'Execute' tab how the flow develops:

  • When reaching the callProcessActivity, the called process is activated; so we have S2 ~ E2
  • When reaching a callGlobalTaskActivity, the called Global Task is activated - the notation reads: GlobalTask name (called activity name); the global Coat Surface was called three times:
         -  Coat Surface(Coat Surface 1st Round)
         -  Coat Surface(Coat Surface 2nd Round)
         -  Coat Surface(Coat Surface 3rd Round)

Time Analysis

Click on the 'Steps' tab of the Configure BPSim window, and on the Tokens tab, which resembles this illustration:

You can check timing in the list as it is, but to make the process easier type 'Leave' in the Filter bar field of the 'Action' column to show only the records containing that text string in that column.

The report displays as shown, and we can make this analysis:

  • The Call Activity Call Prepare Surface took 40 minutes, composed of Sand Surface (30 minutes) and Clean Surface (10 minutes), as defined
  • Coat Surface (1st Round) took 11 minutes; Coat Surface (2nd Round) took 11 minutes; Coat Surface (3rd Round) took 7 minutes - the figures 11, 11, 7 are randomly generated by the Poisson(10) distribution; what is important here is that each call instance of the Global Task has its own values
  • Coat Surface has a total time collected from all instances: 11 + 11 + 7 = 29
  • The Sum Processing Time for the Paint Wall Process is 69 minutes, composed of the four Call Activities: 40 + 11 + 11 + 7 = 69

Customized Simulation

We can configure a 'Result Request' on BPMN elements to customize the simulation report so that we only report on the parameters we are interested in.

Configure Result Request

  1. On the 'Paint Wall Process' diagram click on the Activity Coat Surface 1st Round.
  2. In the Configure BPSim window, click on the New Parameter drop-down arrow and create a Time parameter called 'ProcessingTime'.
  3. Click on the toolbar icon. The 'Result Request' column displays to the right of the 'Parameter' column; click on the drop-down arrow and select the 'sum' checkbox. Click on the OK button.
  4. In the 'Values' field type '1'.
  5. Click on the icon.
  6. Repeat steps 1 to 5 for the Activities Call Prepare Surface, Coat Surface 2nd Round, Coat Surface 3rd Round
  • Expand the 'Business Process' group and repeat these steps for Paint Wall Process

Run Simulation

  • On the 'Configure BPSim' dialog toolbar, click on the Run button; the 'BPSim Simulation Controller' dialog displays
  • Click on the Run button drop-down arrow and select, in this case, 'Customized Simulation'

Flow Analysis

The Flow Analysis is exactly the same as for a Standard Simulation.

Time Analysis

On the 'BPSim Simulation Controller' dialog toolbar, click on the button; the 'BPMN Simulation Report View' displays.

The Time Analysis is the same as for a Standard Simulation; however, the report only contains the 'sum' results we requested.

Note: Currently, in the Time Analysis, we can not request ProcessingTime either on the called process itself or on the Activities contained by the called process. If you have this requirement, use the Standard Simulation.