You will add a rule function, which is written in the TIBCO BusinessEvents rule language.
Procedure
Right-click the
RuleFunctions folder, and select
New
> Rule Function.
You will see the New Rule Function Wizard.
In the
Rule Function name field, type
InitializeScorecard.
In the
Description field, type
Sets values in the FraudCriteria scorecard.
Click
Finish.
You can work in the Source view or the Form view, according to your preference. The tutorial uses the Form view. In the lower area, click the Form tab to switch to the Form view.
Tip:
Rule Function Editor Preference
To set the default mode, go to
Window > Preferences > TIBCO BusinessEvents > Rules and check or uncheck the following checkbox as desired:
Initially show "Form" tab in Rule Function Editor.
Ctrl-click the name of a rule function in a rule or rule function editor to open the editor for that rule function.
Leave the
Scope area empty, because this function is used at startup. In the
Body area, add the following lines to provide values to the
FraudCriteria scorecard (and to comment your code):