Called Event and Call External Event Prototype
OIPA now allows Events in a transaction to generate an Action that results in triggering an event configured in a BRassociated with the transaction. This feature is provided to cater to a situation where the action to be performed in the target BRis to be triggered on an event defined in the transaction but the action to be performed is also dependent on the values in one or more fields in the target BR.
This functionality will be supported by defining an Action in the target BR (MultiField BRis used to demonstrate the capability in this case) as a CALLEDEVENT with an IDattribute. Such a called event defined in the target BRcan be triggered from the transaction through an Action of type CALLEXTERNALEVENT which is defined in the transaction with the same value in the IDattribute.
Currently this feature is supported in MultiFields BRand TransactionAllocationScreen BR. This may be extended to other associated BRs in future.
Scenario
In a specific transaction, a specific event to assign value or validate values in a Multifield in one or more instances of the multifield is required to be triggered on the basis of a specific event inside the transaction. The event is dependent on the values in both the transaction field and the multifield values.
Prototype Configuration
-
The enhancement is added to an existing transaction ‘MultifieldEvents’ in the Functional Prototype Plan under Prototype Company. The events of type ‘CALLEXTERNALEVENT’ are configured in the transaction which in turn invokes the events of type ‘CALLEDEVENT’ present in the ‘ Multifield-MultifieldEvents’.
-
Transaction Field: "TestField" is created as a Transaction field to demonstrate this functionality. Based on the value of TestField and the event type, the corresponding events are triggered in the Multifield.
- Transaction Events: The following events are configured to demonstrate the functionality.
OnLoad: In the transaction, on load event, the Action of type ‘CALLEXTERNALEVENT’ is configured which invokes the event ‘MFEventOnLoad’ present in the MultiField –MultiFieldEvents business rule.
OnChange: In the transaction, the Action of type ‘CALLEXTERNALEVENT’ is configured which invokes the event ‘MFTestTextEventOnChange’ and ‘MFTestComboEventOnChange’ present in the MultiField –MultiFieldEvents business rule.
OnSubmit: In the transaction, the Action of type ‘CALLEXTERNALEVENT’ is configured which invokes the event ‘MFEventOnSubmit’ present in the MultiField –MultiFieldEvents business rule.
- Multifield Events:This is an existing multifield business rule, where four multifields- TextTestMF, ComboTestMF, RadioTestMF and CheckTestMF are configured.The events invoked by transaction are configured in the Multifield-MultiFieldEvents multifield. The following events are configured in the same:
MFEventOnLoad: This event is associated with the multifield CheckTestMF. It invokes actionset MFActionOnLoad which displays a warning message and marks the field CheckBoxTest1 as ‘CHECKED’ on load.
MFTestTextEventOnChange: This event is associated with multifield TextTestMF. Based on the following values provided to the field TestText2 of index 0, the corresponding action is configured for the field TestText1 of index 0:
- Hide
- Show
- Disable
- Enable
- Assign
- ReadOnly
- Test - Display and error message.
MFTestComboEventOnChange: This event is associated with multifield ComboTestMF. It invokes queryset “TestComboOptionsActionOnChange” for field “ComboTest5”.
MFEventOnSubmit: This event is configured for multifield RadioTestMF. It invokes actionset MFActionOnSubmit which displays a warning message.
-
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 MultifieldEvents activity from the Activity drop down box.
- Make changes to the various fields view the action event triggered as explained above to view this functionality in action.