Tutorial 4 Creating and Defining Rules Events and Actions
You can create rules that execute when a pre-defined set of event occurs, and that invoke actions associated with them.
In this tutorial, you write a number of action scripts that enhance the functionality of the Capture Claim and Interview Witness forms. You learn how to create rules to compute age, update options, round amounts, display hints, hide hints, and so on.
Finally, you learn how to create custom submit buttons that work in conjunction with gateways to control the flow of the business process.
- Creating a Rule to Compute Age (Capture Claim Form)
It is best practice to listen on parameter update events and modify the parameter values as part of rules that propagate changes through bindings rather than directly updating the control values. This avoids the need to write the form open scripts when parameter change events occur as part of form initialization. - Creating a Rule to Update Required Option for Guardian
If the customer’s age is below 21, the name of the guardian becomes a required field. You can create a rule that updates the required option on the control Guardian Name based on Customer Age parameter value. - Creating Rule to Round Amount to Nearest Integer
Similar to Task B, you can define a rule on event Exit (exit) of the controls Claim Amount (ClaimAmount) and Third Party Amount (ThirdPAmount) that invokes a shared action round_value, which rounds to the nearest integer the amount specified as part of the control. - Creating Rules that Display Hint on Specifying Claim Amount Controls
You can create a rule that displays a hint to the user when specifying the Claim Amount or Third Party Amount controls. - Creating Rules that Hide Hints on Exiting Amount Controls
You can create a rule that hides the hint created in the previous rule as part of the previous task when exiting the Claim Amount or Third Party Amount controls. - Creating Rules to Display Context-Specific Hints on Specifying Customer Description Control
You can create a rule that displays the hint to user when specifying the description for the field Description in the Accident Information pane. - Creating Rules to Hide Hints on Exiting Customer Description Control
You can create a rule that hides the hint that is created as part of the previous task. - Defining Custom Actions for Buttons
In most cases, buttons on a form are configured with one of the pre-defined actions provided in TIBCO Forms. The left-most button on the Interview Witness form, for example, was created automatically when the form was generated. This button is configured with the standard rule Cancel that invokes the system action Cancel when the Cancel button is selected.
Copyright © Cloud Software Group, Inc. All rights reserved.