Transactions

Trigger Messages

The Trigger component includes an entry labeled "Transaction" in the Components list. Figure 4.2 shows a Trigger control panel with this entry selected.

cptranst.gif (6868 bytes)

Figure 4.2: Transaction Trigger Messages

Notice the entries in the Trigger list box. These entries are possible behaviors to trigger when a transaction arrives at the Trigger component. In this example, because Transaction is selected, the target of the trigger is the transaction itself. The removeFromServers action causes the transaction to send that message to all servers in the simulation which in turn causes removal of that transaction from any servers in which it is receiving service. The other actions are described in the following list.

removeFromServers removes the transaction from any server by sending the removeIt message to all servers.
removeFromQueues removes the transaction from any queue by sending the balk message to all queues.
routeToId routes the transaction to the component that has id equal to the value of the routeToId attribute attached to the transaction.

Note that when using the routeToId trigger, you need to assign an attribute to the transaction with the name "routeToId" and the value the id of a component. You could assign that id as a numeric attribute when the transaction is in a modifier. This approach may not work if you save the model and then subsequently reload it because the id number of the component may change between the save and the load. You can avoid this problem by assigning the routeToId attribute as the "id" of a model component.

These options provide you additional modeling flexibility. Two examples, "Servers as Resources II" and "Special Routing" in Chapter 10, "Selected Examples," illustrate two uses of the routeToId trigger.

Previous Page | Next Page | Top of Page