7. Specifying details for a process with a child diagram
Next, we will add details for the process Check Room Availability. We will decompose this process with a child diagram. Because of this, it is not necessary to add a Service Time Profile for it.
1 Decompose the process Check for Room Availability – right-click the process and select Create Child Diagram from the pop-up menu. Name the new diagram Check for Room Availability Simulation.
2 Draw the first part of the child diagram as shown below.
3 Make sure to open the definition of the Start event Start Availability, go to its Sim Definition tab, and make its BPMN Event Type a Start event.
4 Open the definition of the decision symbol “Am I Family?”, specify its Stereotype as XOR, and then click Apply. A new Sim Fan Out tab will appear within the Definition dialog.
5 Open the Sim Fan Out tab and select Outflow Routing of Probability.
6 On the Sequence Flow called Standard, go to the Sim Symbol tab and select a Fan Out Logic of Probability. Click Apply. On the Sim Probability tab, specify a probability of 80 percent.
7 On the Sequence Flow called Family, go to the Sim Symbol tab and select a Fan Out Logic of Probability. Click Apply. On the Sim Probability tab, specify a probability of 20 percent.
Setting ‘requested room type’ to the value of an attribute
There are numerous ways that you can specify how tokens pass through gateways in a BPMN Business Process diagram – you can specify based on a matching of Object Type, Attributes, Probability, Shortest Queue, or Time in Model. In this decomposed process, we will use Attributes.
The full WITNESS simulator enables users to specify as many attributes as they like, including user-defined ones. For the ‘lite’ version of WITNESS provided as SA Viewer, seven attributes have been provided. The attributes provided are listed in the table below, alongside the attribute they are mapped to in SA Viewer (WITNESS ‘lite’) and full WITNESS (some names were changed in System Architect so that they might make more sense to the System Architect user).
Attribute in System Architect
Attribute in SA Viewer and WITNESS
User Text 1
String1
User Text 2
String2
User Value 1
Numeric1
User Value 2
Numeric2
Description
Description
Rejected
Rejected
Value
Value
You are not limited to seven attributes for simulation – in System Architect, we create a definition called a Simulation Attribute, and assign one of these types to the created definition instance.
In our example, we want to use an attribute to specify the room type requested. The attribute can take on two values – “Standard” room and “Family” room. For this, we should use a Text type attribute (since the value takes on a text value). We will use User Text 1.
We will create a Simulation Attribute definition in System Architect, and assign it the attribute type User Text 1.When a Standard room is requested, we want User Text 1 to be set to “Standard”; when a Family room is requested, we want User Text 1 to be set to “Family”.
1 In the definition of the process Check Availability of Standard Room, go to the Sim Definition tab and add an Attribute on Leaving called SetResTypetoStandard. In the definition of this Simulation Attribute, specify its type as User Text 1, and the value as “Standard”. We are creating an assignment of the User Text 1 attribute to the Simulation Attribute SetResTypetoStandard.
2 For the process Check Availability of Family Room, go to the Sim Definition tab and add an Attribute on Leaving called SetResTypetoFamily. In the definition of this Simulation Attribute, specify its type as User Text 1, and the value as “Family”.
3 For the XOR gates Standard Room Available and Family Room Available, set the Stereotype to XOR and the Outflow Routing (on its Sim Fan Out tab) to Probability.
Continue drawing the child diagram
1 Continue drawing the child diagram, so that it looks like the diagram below.
Add a Gateway to the output
If you continued to fill in simulation information and tried to simulate this diagram, it would not simulate successfully. You need to be explicit about how output flows from the two processes to the End event, End Availability Check. We need to add a Gateway to the diagram.
1 Add a gateway to the diagram, between the processes OK and No, and the event End Availability Check, as shown in the diagram below. You can leave the Gateway at its default name, Gateway_1, and its default type – XOR.
Setting ‘availability of room’ to the value of an attribute
We also want to use an attribute to specify the availability of a room. If the ‘room availability’ attribute is equal to 1, the room is available; if it is 0, the room is not available. We will use User Value 1 for this, since the value of the attribute will be a number.
1 For the process named OK, on the Sim Definition tab of its definition, specify an Attribute on Leaving of assignavailability. In its definition, set its type to User Value 1, and its value to 1. If this process is entered, the attribute is set to 1 – the room is available.
2 For the process named No, on the Sim Definition tab of its definition, specify an Attribute on Leaving of assignnonavailability. In its definition, set its type to User Value 1, and its value to 0.
Specifying the probability of rooms being available
Our diagram is set up to generate the right output (attributes on leaving the processes OK and No). Now we need to specify the probability of a Standard room being available, and a Family room being available.