We now need to add events to the output of the process, Check Credit Details, so that output messages can be sent back to our Hotel Reservation System.
1 Add the events as suggested in the diagram below:
▪Credit Approved to the Credit Agency pool, and its matching receive event, Credit Check Approved, to the Hotel Reservation System pool,
and
▪Credit Rejected to the Credit Agency pool, and its matching receive event, Credit Check Rejected, to the Hotel Reservation System pool.
2 Draw Sequence flow lines from/to the events to/from their respective process, as shown below.
Specify the message sent and received for the ‘rejection’ events
1 For the event Credit Rejected:
a Open the event’s definition.
b Select the Sim Definition tab.
c Specify the event to be of type Message, and then click Apply.
d On the Message tab, drag in the Message Flow definition Payment Not OK.
2 Click Define and make sure the Message Flow has a name on its Execution tab – in this case we add the name Payment Not OK.
3 Open the definition of the event Credit Check Rejected, in the pool Hotel Reservation System. Make sure it is of type Message on the Sim Definition tab, and then in its Message tab, drag in the message Payment Not OK.
4 Set the Match Received Messages property to Any Object.
Specify the message sent and received for the ‘approved’ events
1 For the Credit Approved event, follow the same procedure to specify a message of Payment OK – that is:
a Open the event’s definition.
b Select the Sim Definition tab.
c Specify the event to be of type Message, and then click Apply.
d On the Message tab, drag in the Message Flow definition Payment OK.
2 Make sure the Message Flow has a name on its Execution tab – in this case Payment OK.
3 Open the definition of the event Credit Check Approved, in the pool Hotel Reservation System. Make sure it is of type Message on the Sim Definition tab, and then in its Message tab, drag in the message Payment OK.
Delay setting the Match Received Messages property – we will do that later.