After the keyword transactions, the transactions a user invokes are specified with their calling frequency (TransCount). TransCount contains the name of the transaction (ident), the actual parameters of the transaction (ActParList), and how often the transaction should be invoked in the simulation time (number). Random variables returning type number, string, boolean or float and constants of these types are valid parameters of a transaction. Number, type and sequence of the actual parameters of a transaction must correspond to number, type and sequence of the formal parameters of the transaction specified in the transactions section of the Silk Performer program. You can use the parameters of a transaction to transfer to a transaction information that is specific to the user of the transaction. Each transaction specified in the workload section must be defined in the transactions section of the Silk Performer program.
dclrand rArtNo1 : RndUniN(1..5000); rArtNo2 : RndUniN(5001..10000); dcluser user User1 transactions Selling(rArtNo1, "user 1") : 100; Order : 10; user User2 transactions Selling(rArtNo2, "users 2") : 50; StockQuery : 20; dcltrans transaction Selling(pArtNo: number; pUser: string) begin ... end Selling; transaction StockQuery begin ... end StockQuery; transaction Order begin ... end Order;
The example shows a portion of a Silk Performer program. Users belonging to the user group User1 call the transaction Selling 100 times and the transaction Order 10 times. The actual parameters rArtNo1, a random variable, and "user 1", a constant string, are assigned to the transaction Selling.
Users belonging to the user group User2 call the transaction StockQuery 20 times and the transaction Selling 50 times. The actual parameters rArtNo2, a random variable, and "users 2", a constant string, are assigned to the transaction Selling.