Skip to Content

How to create a MSMP BRF+ initiator rule using loop and table operation


In MSMP, Access Controls 10.0 and 10.1 provides extremely flexible and powerful tool to configure workflows. In this document we will see how to create BRF+ (NOT line item by line item) msmp initiator rule by taking example of real business case in context of Access Request.

First we need to understand the difference between MSMP BRF+ rule and  BRF+ flat rule ( lineitem by lineitem ) before we can create MSMP BRF+ rule. Here are key differences between BRF+ rule and BRF flat rule

MSMP BRF+ rule provides great flexibility and almost all the scenarios can be achieved by this which are not possible by using BRF+ flat rule. This document provides step by step guide for creating BRF+ rule to achieve complex business scenario

1.) Business Scenario

If an access request with multiple roles/systems contains any role with “High” critical level, then the complete request should go to a specific path. Since the path of each lineitem in request depends on information from all the roles of request so to achieve this scenario we will use MSMP BRF+ Initiator Rule with Table Operation and Loop

2.) Generate BRF+ Shell for Access Request Initiator

  • Execute Transaction GRFNMW_DEV_RULES
  • Fill generation criteria (Process ID, Rule type, etc.)
  • Specify Generation options
  • Generate rule shell (Execute button)

  • Remember (copy to clipboard) the generated function GUID

3.) Activate Empty BRF+ Rule

  • Open transaction BRF+
  • To  locate the generated function user menu, Workbench -> Open Object and specify object ID from previous step

  • In BRF+ function, change the mode to “Event Mode” and activate the function

  • Since Function mode has been changed to “Event mode,” the result data object has changed automatically, so it has to be reset manually

  • In “Signature” tab of BRF Function, change the result data object to GRFN_MW_T_ROUTING

4.) Create Ruleset in BRF+ Function

  • Click on “Create Ruleset” button
  • Provide any name for your ruleset and click on “Create And Navigate To Object”

4.1. Add Variable to Ruleset

    • Add a Boolean variable that will be used as table operation result

4.2. Create Rule within Ruleset - Create Expression of Type “Table Operation”

    • Click on “Insert Rule” button to create new rule
    • From within rule, click on “Add” -> “Process Expression” -> “Create” to create a new expression
    • Create expression of type “Table Operation” and provide suitable name and description

    • Check for any role in request with critical level of “High”
    • Use table from context that has all the line items present in the request
    • Additional conditions can be added as per requirement

4.3. Create another New Rule in Ruleset - Create Expression of Type “Loop”

    • Go back to your rule set and create a second rule in the rule set
    • From within rule, create a new “Loop” expression that will loop on all line items of the request

    • Select “Processing Mode” and “Loop Mode”
    • Loop at “GRAC_T_REQUEST_RULE_LINE,” which is a table containing all roles/systems of the request

4.3.1.     Create Rule within Loop Expression - Create Expression of Type “Decision Table”

      • Create a new rule within loop
      • Create a new expression from this rule. This expression will be of type decision table.

    • Provide details and add columns
    • Select result data object and result columns
    • Result data object GRFN_MW_S_ROUTING is standard result for routing and initiator rules

    • Add Condition columns from the “Table operation” expression created in earlier steps
    • Along with this, additional columns from the context can be added into decision table

    • Add Condition to decision table; here, it is checking the result of expression “TABLE_OPERATION.” The result will be true if request contains any role with criticality level of “High.”
    • So if any of the roles were of “High” criticality level, then complete request would go to “CRITICAL_PATH”*
    • Activate decision table and go back to “Loop”

    • In “Loop” expression, add a new rule to append the result of decision table to the BRF result
    • Activate “Loop” expression and go back to ruleset

5.) Check Rule Sequence in Ruleset

  • In Ruleset, make sure that the first rule in sequence is Table operation expression
  • Use Up and Down arrows to change the sequence and activate ruleset

6.) Register new initiator rule in msmp configuration

Former Member