Architecting and designing > Business Process Analysis (BPA) > Simulation of Process Models > Simulation tutorials > Simulation of BPMN Business Process Flows > Simulating a SOA Process > 2. Modeling message passing between processes
  
2. Modeling message passing between processes
We want to specify that the process issues a message – we will use this event to specify this behavior.
1 Add an event to the Hotel Reservation System pool, underneath the Check Customer Credit process, and name it Send Information Out for Credit Check.
2 Draw a Sequence line to it from the process.
Add Event
3 Open the definition of the Send Information Out for Credit Check event.
4 On the Sim Definition tab, specify the BPMN Event Type as Message, and then click Apply. A new Message tab will appear in the Definition dialog.
Send Credit Message
5 Select the Message tab of the definition.
6 Click the Choices button in the Sent/Received Message property field to open a dialog that lists all Message Flows already created in the repository. Select the one that is already drawn between the Check Customer Credit and Check Credit Details processes, the Message Flow named Customer and Payment Details, and drag it into the Sent/Received Message property.
Customer and Payment Details Message
After adding the Message Flow, click the Define button to open the Message Flow definition. Make sure that the Message Flow has a name specified in its Name property on its Execution tab – in this case, the name could be “Customer and Payment Details”.
Message Name DialogSince this is a ‘Send’ message event, there is no need to fill in the Match Received Messages property field; this is information that is not applicable for this send message.
7 Add an event named Receive Customer Credit and Payment Info to the Credit Agency pool, and draw a Sequence Flow line from it into the process Check Credit Details.
Receive Message
Next, we must specify the message that the event receives.
8 Open the definition of the event Receive Customer Credit and Payment Info, and specify it to be an event of type Message in its Sim Definition tab. Click Apply. A new tab named Message will appear in the dialog.
9 Click the Choices button in the Sent/Received Message property field to open a dialog that lists all Message Flows already created in the repository. Select the one we added to the ‘send’ message – Customer and Payment Details, and drag it into the Sent/Received Message property.
Match received messages
We now need to specify how the Process Flow matches received messages.
By ID – We can choose to continue the Process Flow when an instance of the message “Customer and Payment Details” arrives, and its ID is equal to another “Customer and Payment Details” message instance arriving at the event from another Sequence Flow. This situation is not applicable in our current scenario.
Any Object – the most common selection – we can choose to continue the Process Flow when any instance of the message “Customer and Payment Details” arrives.
By Attribute – We can choose to continue the Process Flow when an instance of the message “Customer and Payment Details” arrives, and one of its attributes is a certain value – for example when ‘Customer Name’ = Mira Sorvino.
In our case we are simply looking for any instance of the message “Customer and Payment Details”.
In the Match Joined Objects field, toggle ‘on’ Any Object.
Note You do not have to fill out Attribute to Match since that is only pertinent to the By Attribute choice.
Next topic
3. Adding output message events
Parent topic
Simulating a SOA Process