Rule Order Execution
TradeDesign's 'Order' functionality determines the sequence in which rules associated to a certain field are executed. To enable that the use of order numbers is consistent and clear, the ranges of orders described below should be used for the different rule types.
Default Rules
As usual, customization defaults override standard defaults. The system internal defaulting should normally be defined at an order level < 1000 (normal order level 950).
Check Rules
Check rules created as part of product customization, should normally be run before internal check rules. These internal check rules should be associated with an order number > 1000 (normally order level 1050).
The more specific the check rule message is, the lower the order number that a check rule should have. Checks implemented in a module are usually less specific than the checks implemented in a transaction. Therefore, checks implemented in a module should have a relatively high order number.
Event Rules
The range of possible order numbers is divided into the following areas:
Up to and including order number 500 is used to check and prepare the execution of an event.
From 501 up to order number 1000 is intended for the execution of an event.
The range of 1001 to 1500 is intended for post processing and return, if required.
The button is used to store a transaction. The logic to store the transaction is implemented in the event rules. The following order numbers are used:
1-199: Asserts and checks of modules not needing TRN Info
200 (MTABUT): Common asserts, checks and initialization of TRN
201-299: Asserts and checks setting fields in TRN. Up to order 299 the save process may be interrupted by using ExitEvent. This is no longer allowed in rules with higher order numbers.
204 (MTABUT) Deals with warning (at Security Level 5), can be adapted for the specific customer.
300 (MTABUT): Final setting of 'Completion' panel fields. Order number 300 must not be used somewhere else. Such logic in transactions should usually be moved to rule order 500 (the main transaction event rule). The rules setting up \TRNMOD\TRNISM\RELLIAAMT in xxTP are usually no longer necessary, as the relevant amount is now set in 'set_wfs_Release' in the transaction.
301-400: Procedures preparing to store contracts in modules or transactions (Examples: (a) Amendment transactions are setting history information in contracts. (b) Panel modules are setting basics for relevant amounts, etc). In this order range changes of contracts are allowed.
499 (TRNMOD): The transaction INR is created and locked.
500 (transaction): Storing contracts and amounts of a transaction. Event MTABUT\SAV order number 500 describes the transaction result. Changes of contract data in event rules with an order number higher than 500 will not be stored in the database.
1200-1299: Final actions of modules like saving additional data (e.g. pool entries in settlement) or making subpanels visible in display files.
3000 (MTABUT): Final storage of a transaction and return to the calling transaction. Event rules to MTABUT\SAV with an order number exceeding 3000 will never be executed.