Using Parameters as a Business Rule (Financial Management Users Only)

The Parameters tab in the Rule Designer enables you to specify parameters you want to use for the business rule. The system checks first to determine whether any execution variables are used within the rule. (The execution variables can have the scope of ruleset or rule. See Working with Variables.) Any execution variables used in the business rule are listed on the grid of the Parameters tab.

In the grid, under the Parameters column, the system selects the check box for any execution variables with a Ruleset scope by default. These execution variables are passed as parameters. The check box for execution variables with a Rule scope is clear by default, because these variables apply only to the business rule in which they are used. These execution variables are not passed as parameters. You can change the default setting for any variables listed in the grid.

In the Passing Method column, the default setting is By Reference, but you can select to pass parameters By Value, too.

Note:

The Variables displayed on the Parameters tab are generated automatically. If you make changes to any of these variables in the Variable Designer by adding, deleting, or changing the scope of the variable, any changes that affect the business rule only display when you select the Parameters tab of the rule again.

  To use parameters as a business rule:

  1. Complete steps step 1 to step 5.

    Note:

    On the Properties tab of the business rule, ensure that Is Function is selected so the rule is treated as a function by Calculation Manager.

    Parameter passing is available for any business rule, regardless of whether the Is Function option is selected or not. If it is not selected, then it is a normal business rule with parameter passing capability. If it is selected, then the business rule is treated as a function.

  2. Save the business rule.

  3. Open a second business rule.

  4. From Existing Objects, drag and drop a copy of the first business rule into the second business rule's flow chart.

    A business rule with parameter passing is inserted into another business rule.

  5. On Properties, enter or edit properties for the business rule.

    • Optional: Enter or edit the name by entering a new one of up to 50 characters. (The name defaults from the New Rule dialog.)

    • Optional: Enter or edit the description of up to 255 characters for the rule.

    • Optional: Enter or edit the caption for the rule. The caption displays below the rule's icon in the flow chart.

    • Optional: Enter or edit the comments for the rule. For example, you may want to tell users what the rule should be used for.

    • Select Enable Logging so, if the rule has log text, it is included in the log file when the rule is launched. You can enable logging for rules, rulesets, and components. However, you specify what log text to include, if any, with a business rule's formula statements.

      Note:

      If logging is not enabled for a ruleset, but is enabled for a rule and component that belong to the ruleset, no log file is created, because the log setting for the ruleset overrides the settings for the rule and component.

    • Select Enable Timer so the time taken to process the rule is recorded in the log file when the rule is launched. You can enable the timer for rules, rulesets, and components. The process time is included in the log file for every object whose timer is enabled. For example, if you have a ruleset whose timer is enabled and the ruleset contains three rules whose timers are enabled, the time taken to process the ruleset, and each rule in the ruleset, is recorded.

    • Select Disabled to temporarily disable the business rule while the script is generated.

    • Select Is Function so the rule is used as a function that can include execution variables that you specify as parameters on the Parameters tab.

      Note:

      Any business rules with Is Function selected are displayed as functions in the Function Selector.

  6. On Parameters, any execution variables for which the Is Parameter option was selected are listed in the grid. Enter a value for a parameter by clicking its row in the Value column and entering a value, or click Actions, and select one of these options to enter a value:

    Note:

    The values you enter for the variables apply only to this business rule. You can change the values when you use the business rule within another business rule. The values you enter are validated against the variable type when the script of the business rule is generated.

    Note:

    You cannot delete or add variables displayed in the grid. If you want to make changes to the variables that are passed, you must makes these changes in the original business rule.

  7. Select File, Save.