Model 11 - Events attached to Sub-Processes
How-to
In this model we will catch Cancel Events that are fired in the subprocess model of a subprocess activity. Have a look at Model 11 and Model 11a (the subprocess model).
Therefore we will define a stochastic variable which then will be used for the decision making at the branching exclusive gateway in Model 11. Depending on this variable the subprocess will either finish normally. Or it will throw one of the cancel events, which will fire the respective cancel event attached to the subprocess activity. Each of the two attached cancel events will lead to a respective activity that will be executed to treat the canceling of the subprocess.
Approach
-
Define a stochastic variable called x in Model 11a (the subprocess model, see Figure 2 below)
-
Pick the Discrete Uniform Distribution with
-
A minimum value of 2
-
A maximum value of 5
-
-
Also create these conditions at the branching exclusive gateway in Model 11a
-
Upper edge:
x > 3
-
Lower edge:
x < 3
-
Middle edge:
default
-
Explanation
This means that the subprocess model will only finish with the general end event, if x equals 3. otherwise it will trigger one of the receiving cancel events that are attached to the subprocess activity.
Report
See below for the run configuration, which we set up to receive the report statistics from below.
Please refer to the section Experiment Results for more information on the report specific data.
Run configuration
-
Stochastic Seed: 12345
-
Simulation start date: 1/1/2014 12:00:00 a.m.
-
Simulation stop time: 240
-
Simulation stop time unit: Hours
Report statistics
-
In Figure 3 you find the process cycle times for the main process and the subprocess that is being executed in the subprocess activity "Sub Process"
The subprocess' cycle times are identical to the run-times of the subprocess activity (Figure 4) |
-
Figure 5 shows the event details, which can directly be linked to the gateway details from Figure 6
-
Due to our configuration of the subprocess' gateway depending on the stochastic variable x,
-
the sending cancel end event "Archive" has been executed most times
-
the default end event and the second cancel end event have been executed nearly similar ("#12" with 56 times, and "Operator#2" with 65 times)
-