Siebel Finance Guide > Business Services for Siebel Financial Services > Defining Procedures for a Business Rule Process >

About Business Rule Process Steps


There are three types of BRP process Steps:

  • Statement Step. Contains one or more child statements that are executed if and when the statement step is executed.
  • Business Service Step. Used to invoke a Siebel business service. Business Service Step provides a way to extend the capabilities of BRP beyond its out-of-box features. For instance, custom functionality could be coded in an eScript and this could be wrapped as a Siebel Business Service. This Business Service can now be invoked within the Business Service step and arguments can be exchanged between the script and the BRP process.
  • Switch Step. Has 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.

To define a procedure for a business rule process procedure

  1. Navigate to the Business Rule Processor screen and select a process, then click the Procedures view tab, and create a new procedure.
  2. 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 To define a property for 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.

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. Used to invoke a Siebel business service.
    • Switch Step. Has switch criterion and a switch block for each criteria. The switch block is like a statement step and contains one or more child statements.

    Inactive

    A check box to activate or inactivate a given step.

    Comment

    A free text field used to document the step.

    TIP:   Ensure each step has appropriate comments to ease the 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.
  4. For a statement step,
    • 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 will be executed. If the field is not specified, then the statement step will execute every time it is encountered.

      Example: [SomeIntegerVariable] < 0

      Loop

      If checked, the statement step will be iterated 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.

      To avoid infinite looping, the looping is counted and compared with the maximum allowed Loop Count. By default, this number is set to 1000, however, this can be overwritten 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:   To construct a "For...next" loop, define a local variable and then either increment or decrement that variable in a statement. On the condition, check if the local variable has reached its limit.

    • 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 and 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.

      To retrieve "Annual Fee" property from the Property Set and assign this to a local property named l_Rate, set:

      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 will be created.

      Name of a local or global property.

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

      To set "Annual Fee" property on the Property Set productRate, set:

      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.

      To 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, set:

      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 should 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.

      To 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, set:

      Value = l_savings_bal

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

      PropertySet Childcount. Retrieves the number of child property sets.

      A local, global property.

      Property should 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.

      To 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, set:

      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.

      To lookup the effective tax rate for a person given the Total Income and assign this to a local variable l_tax_rate, set:

      Value: l_tax_rate

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

  5. For a business service step,
    • 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 which 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.

    • 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 - field contains the string value.
      • Expression - field contains the Siebel query expression.
      • Property - field is disabled.

      Property

      Local or global property.

      This field is disabled for Literal or Expression type arguments.

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

      Value

      A string value that is 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 will be executed if no match is found for the switch step criteria.

      At any point, only one Switch Block can be designated as the default block.

    • In the Statements list, enter one or more statements. See Step 4 for details on creating statements.
Siebel Finance Guide