TransactionAllocationScreen Actions and Events Prototype
The EventsOnAllocationSupport prototype demonstrates how OIPA allows actions and events in the TransactionAllocationScreen BR.
Scenario
In a specific transaction, the TransactionAllocationScreen needs to be displayed with the EqualPercent checkbox disabled in the From section and available in the To section. Further, using specific trigger actions, the EqualPercent in From section needs to be enabled and errors/warnings displayed based on the % values or amount or no. of units entered in the various funds under From and To sections.
Prototype Configuration
- The transaction 'EventsOnAllocationSupport' under the 'Model Prototype Plan' demonstrates the action/events capabilities through the following actions and events configured in the transaction and the attached TransactionAllocationScreen BR.
- Calling an event in the TransactionAllocationScreen BR from ONCHANGEevent in the activity details: A “CallExternalEvent” Check field is configured. When this check box field is 'CHECKED', the EventBasedOnActivityField event is triggered in the TransactionAllocationScreen BRby using the CALLEXTERNALEVENT.
EventBasedOnActivityField CALLEDEVENTin TransactionAllocationScreen BR: The CallTASBREvent is configured in the attached BRthat performs the following:
- Check the AllocationMethod selected in From and To and if they are not the same, throw an error "Allocation Method must be same for both the FROM & TO allocations."
- Further, the EventBasedOnActivityField event is configured under the MultiField BRused in the same transaction. This is done to demonstrate the precedence when the same CALLEDEVENToccurs in more than one associated business rule of a transaction. Currently MultiFields BRand TrasnactionAllocationScreen BR allow using CALLEDEVENTs and the precedence is MultiFieldBRfirst and then the TransactionAllocationScreen BRif the same exists in both.
- In this transaction, when the MultiField event CallTASBREvent is triggered, static text "CALLEDEVENT is executed" is assigned to all the rows of the multifield for the TextField field.
- ONLOADevent in TransactionAllocationScreen: An ONLOADevent is configured in the TransactionAllocationScreen BR to disable the EqualPercent cehckbox in the From Section and set the EqualPercent checkbox to CHECKEDin the To Section.
- ONSUBMITevent in TransactionAllocationScreen: This will get triggered when the transaction is submitted. In terms of precendence - the ONSUBMITin the activity details screen will be triggered first, next would be any ONSUBMITevents from MultiFields, if any and then the ONSUMITevent in the TransactionAllocationScreen BRwill be triggered.
- If the target AllocationMethod is Percent, then check if the TotalAllocationAmount is 100%. If not, throw an error "Under TO Allocation Section the Total Percentage must match to 100."
View Prototype in OIPA
- Log in OIPA using the Prototype Company user ID and password.
- Click Policy | New from the Main menu.
- Add a shell policy to test the prototype.
- Click Add Activity on the Secondary menu.
- Select the EventsOnAllocationSupport activity from the Activity drop down box.
- Make changes to the various fields and process the transaction as explained above to view the functionality.