Siebel Finance Guide > Business Services for Siebel Financial Services >

Defining Procedures for a Business Rule Process


Procedures are collections of steps. When a procedure is executed, each step in the procedure is executed in sequence.

One of the procedures is designated at the process level as the entry procedure. This procedure is executed when the process is executed. Within the entry procedure, other procedures are invoked by additional procedure statements.

Each procedure is uniquely identified by its name. The name must begin with a letter. It can contain alphanumeric, spaces, underscores, and hyphens. It cannot contain other special characters such as an ampersand (@), exclamation mark (!), or percent sign (%). Procedure names are case sensitive.

A procedure can have its own local properties. These properties can only be accessed within the procedure where they are defined. If a local property has the same name as a global property, the local property takes precedence over the global property.

NOTE:  Business rule processes are not permitted to use recursion. If you define a recursion, then you will receive an error message that recursion is not allowed.

This step is part of Process of Defining Business Rule Processes.

To define a procedure for a business rule process procedure

  1. Navigate to the Business Rule Processor screen and select a process.
  2. Click the Procedures view tab, and create a new procedure.
  3. In the Properties list, create new records to define local variables for the procedure.

    The fields for a local variable are equivalent to those of a global variable. The fields are described in The following procedure describes how to define a property for use in a business rule process..

NOTE:  Properties defined for a procedure are local variables accessible only to the parent procedure. You can define global variables in the Business Rule Processor Properties view. See Using BRP Helper Business Services.

Defining a Step for a Business Rule Process Procedure

You must define the steps that make up a business rule process procedure.

To define a step for a business rule process procedure

  1. Navigate to the Business Rule Processor screen, select a process and a procedure.
  2. Navigate to the Steps list and create a new record to define each step for the procedure.

    Some of the fields are described in the following table.

    Field
    Comments

    Sequence

    The numerical order in which the steps are executed.

    Step Type

    There are three types of steps:

    • Statement Step. Contains one or more child statements that are executed if and when the statement step is executed.
    • Business Service Step. Invokes a Siebel business service. Business Service Step provides a way to extend the capabilities of BRP beyond its out-of-box features.

      For instance, you could code custom functionality in an eScript and then wrapped as a Siebel Business Service. You could invoke this Business Service within the Business Service step and exchange arguments between the script and the BRP process.

    • Switch Step. Contains switch criterion and a switch block for each criteria. The switch block is like a statement step and contains one or more child statements.
    TIP:  Use the switch step if a variable is a bounded variable. From a performance and maintenance standpoint, a switch step is better than multiple conditional statement steps.

    Inactive

    A check box to activate or inactivate a given step.

    Comment

    A free text field used to document the step.

    TIP:  Make sure that each step has appropriate comments for ongoing maintenance of BRP process definitions.
  3. Drill down on the Step Type and proceed to one of the following steps, depending on the step type.
Statement Step

For a statement step:

  1. Complete the fields in the Statement Steps form, some of which are described in the following table.
    Field
    Comments

    Condition

    A Siebel Query Language expression evaluated to be TRUE or FALSE.

    If the expression is evaluated to be TRUE, then the statement step is executed. If the field is not specified, then the statement step executes every time it is encountered.

    Example: [SomeIntegerVariable] < 0

    Loop

    If checked, the statement step iterates over and over as long as the Condition is evaluated to TRUE.

    If neither Condition nor Loop is asserted, then the statement step is executed one time, unconditionally.

    The looping is counted and compared with the maximum allowed Loop Count in order to avoid infinite looping. By default, this number is set to 1000, however, you can overwrite this value by defining the system preference FINS CAP Max Iteration. If the iteration number exceeds the maximum, an error is thrown. Refer to Handling Business Rules Processor Errors for more information on handling errors.

    TIP:  Construct a For...next loop, by defining a local variable and then either incrementing or decrementing that variable in a statement. On the condition, check if the local variable has reached its limit.
  2. Add one or more records to the Statements list, defining the statements of the statement step. Some of the field are described in the following table.
    Statement Type
    Value
    Expression
    Example

    Assignment. Evaluates the expression and assigns the resulting value to the property listed in the Value field.

    Name of a local, global, and system properties previously defined for the business rule process.

    A Siebel Query Language expression.

     

    Procedure. Invokes another procedure defined inside the BRP process.

    Name of a defined procedure which is part of the business rule process.

    Null and read-only.

     

    PropertySet Value. Retrieves a property value from a property set or child property set, as defined by Expression. This property value is placed into the variable defined by Value.

    Name of a local, global, and system properties previously defined for the business rule process.

    A property set value retrieve expression. The expression must begin with a variable of type property set, vector set reference, or vector.

    Each index can be either a variable of type integer or number, or numeric literal. No Siebel calculation expressions can be involved.

    EX: PropSet[AnInteger]["SomeName"]

    PropSet(2)["SomeName"]

    No Siebel calculation expressions can be involved.

    Consider a Property Set called productRate that contains banking product information organized by Region and Product Name.

    Retrieve the Annual Fee property from the Property Set and assign this to a local property named l_Rate, by setting:

    Value = l_Rate

    Expression = productRate["West"]
    ["Checking"]["Annual Fee"]

    PropertySet Set Value. Assigns a value to a property set property value.

    A property set value retrieve expression.

    If the stated property name value does not exist, a new name/value pair is created.

    Name of a local or global property.

    If the property is not a string, it is internally converted to a string first by BRP.

    Set the Annual Fee property on the Property Set productRate, by setting:

    Value = productRate["West"]
    ["Checking"]["Annual Fee"]

    Expression = l_Rate

    PropertySet Reference. Creates a reference to a vector or property set. If the referenced object is a vector, the reference acts as a vector. Otherwise, the reference acts as a property set.

    Creates an alias to a subset of a property set.

    A local or global property of type Vector Reference.

    The expression must begin with a variable of type property set, vector set reference, or vector.

    Each index can be either a scalar property or a string or numeric literal. No Siebel calculation expressions can be involved.

    Create a new Property Set Reference to all the products in the "East" region from the productRate Property Set, and assign this to a local variable l_east_prod, by setting:

    Value = l_east_prod

    Expression = productRate["East"]

    PropertySet Sum. Retrieves an aggregation value from a vector or property set.

    A local, global property.

    The property must be of data type number or integer.

    A property set value retrieve expression.

    This expression differs from other property set retrieval expressions in that one of the indexes must be a wild card, indicating summing of all indices of that node. This is done by using an empty set of parenthesis.

    If the child property set, or the property does not exist, the return value is set to null.

    Calculate the sum of balances under the Savings product across all regions from the productRate Property Set, and assign this to a local variable l_savings_bal, by setting:

    Value = l_savings_bal

    Expression = producetrate[]
    ["Savings"]["Balance"]

    PropertySet Childcount. Retrieves the number of child property sets.

    A local, global property.

    Property must be of data type integer or number.

    A property set reference retrieve expression.

    If the property set does not have a child property set, the return value is 0. If the property set does not exist, the return value is -1. The latter is a useful approach to determine if a property set, or a reference is null.

    Calculate the number of products available in the west region from the productRate Property Set, and assign this to a local variable l_west_count, by setting:

    Value = l_west_count

    Expression = producetRate["West"]

    Table Lookup. Look-up a value based on ranges. The look up table is stored as a specialized property set. The property set consists of child property sets, and the child property sets contain three properties corresponding to Lower Bound, Upper Bound, and Value.

    At run time, for any input value, BRP looks up the child property set and locates the leaf whose lower Bound is smaller than the input value, but whose Upper Bound is bigger than the input value, and returns the Value property.

    A local, global scalar property.

    The expression follows property set retrieval syntax, but in the following specialized format:

    PropertySet [Upper Bound Field Name] [Lower Bound Field Name][Return Value Field Name] [InputProperty]

    The Upper Bound Field Name, Lower Bound Field Name, and Return Value Field Name must be a string literal or a BRP string property. The InputPropety must be the name of a BRP numeric property used to do the lookup.

    Consider a TaxRateTable vector, where High, Low, and Rate fields define the Upper Bound, Lower Bound, and Return Value.

    Lookup the effective tax rate for a person given the Total Income and assign this to a local variable l_tax_rate, by setting:

    Value: l_tax_rate

    Expression: TaxRateTable["High"]
    ["Low"]["Rate"]
    [dMyTotalIncome]

Business Service Step

For a business service step:

  1. In the Business Service Step form, complete the fields as described in the following table.
    Field
    Comments

    Business Service

    The name of the business service to invoke. In particular for BRP, there are two helper business services that you are likely to use for data access: FINS CAP Buscomp Data Loader Service and FINS CAP Buscomp Handler.

    For more information on these two business services, see Using BRP Helper Business Services.

    Method

    The business service method to use.

    BusComp

    A reference to a Buscomp Property Type.

    This field is used only in conjunction with the two BRP helper business services, FINS CAP Buscomp Data Loader and FINS CAP Buscomp Handler. See Using BRP Helper Business Services.

  2. In the Arguments list, define required input and output arguments for the business service invoked. Some of the fields required are described in the following table.
    Field
    Comments

    Direction

    Type of argument: Input, Output, or Input/Output.

    Name

    The argument name.

    Use the pick list to select the name for registered business services. Picking the argument name automatically sets the direction.

    Type

    The mechanics of passing values to the Business Service. Select from one of three values:

    • Literal. For Input and Input/Output arguments, the literal string in the value field is passed as an input to the Business Service method. For output arguments, this selection is invalid.
    • Property. For Input and Input/Output arguments, the value of the local or global property is passed as an input to the Business Service method. For output arguments, the return value is populated into the local or global property.
    • Expression. For Input and Input/Output arguments, the expression in the Value field is evaluated and is passed as an input to the Business Service method. For output arguments, this selection is invalid.

    Value

    Contains different values depending on the argument type:

    • Literal. Contains the string value.
    • Expression. Contains the Siebel query expression.
    • Property. Disabled.

    Property

    Local or global property.

    This field is disabled for Literal or Expression type arguments.

Switch Step

For a switch step:

  1. In the Switch Steps form, enter the switch criteria, a Siebel Query Language Expression that evaluates to be a string.
  2. In the Switch Blocks list, create records and complete the fields as described in the following table.
    Field
    Comments

    Value

    A string value used to compare with the switch step criterion value.

    If they are the same, the switch block is executed, which, in turn, executes the child statements belonging to the switch block.

    Default

    If checked, the switch block acts as the default switch block. It is executed if no match is found for the switch step criteria.

    At any point, you can disengage only one Switch Block as the default block.

  3. In the Statements list, enter one or more statements. See Statement Step for details on creating statements.
Siebel Finance Guide Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.