Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Adding the InitializeScorecard Rule Function

You will add a rule function, which is written in the TIBCO BusinessEvents rule language.

Procedure
1. Right-click the RuleFunctions folder, and select New > Rule Function.
   You will see the New Rule Function Wizard.
2. In the Rule Function name field, type InitializeScorecard.
   In the Description field, type Sets values in the FraudCriteria scorecard.
3. 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.
4. 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):

       //Initialize scorecard variables
       FraudCriteria.debits_percent =.8;
       FraudCriteria.interval       = 120*1000; /* 120 seconds */
       FraudCriteria.num_txns = 3;

   Notice that when you type the period after `FraudCriteria`, a list of its properties appears so you can select a property.

5. Save and close the resource.

What to do next

You have set up a startup rule function. Next, you will set up an event preprocessor rule function.

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.