cancel
Showing results for 
Search instead for 
Did you mean: 

Create Rule Based on Provisioning Action in Request, Using BRF+

Former Member
0 Kudos

Dear all.

I am creating a routing rule:

Business scenario:

  1. A requestor creates a request with one , two or more roles and sends to approve to various role owners.
  2. The role owners indicates (in the Provisioning Action field) if they accept or not an scpecific role. Like showed in the screenshot below and then they push on Submit button

I have created a Routing rule that checks the content of of the Provisioning Action

  • If any of them is set as Remove then route the Request to a specific path 1
  • If all of them are set as Assign then route the Request to a specific path 2


If i simulated my function with this input information i get the correct Result

  • One of the provision action to Remove (action = 009)

  • All the provision action to Assign (action = 006)

But when i perform on a real situation i face an error and the log indicates me the following. Seems like my decision table is returning /ROLEREMOVED2

Regards and thank you.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

How many stages have you got in your initial path and secondly where and when is the routing rule being applied? As well as the decision table for your routing rule, maybe you could also provide some insight into how your workflow is set up.

feel free to share some screenshots.

Former Member
0 Kudos

Hi Sammukh, Harinam.

Thanks for your responses. Here you are some more screenshots:

BRF+ - Ruleset (I process the expressión ZCHECK_REJECTED)

BRF+ - Table Operations ZCHECK_REJECTED (Look for if there at least one Provisioning Action reject)

BRF+ - Decision Table (If the boolean coming from the ZCHECK_REJECTED is true then at least one role has been rejected)

The decision table returns always the Line Item + value ROLEREMOVED2 or ROLEASSIGNED. So the problem (as per the log check showed at the beginning of this thread) is i only declare the result ROLEREMOVED2 or ROLEASSIGNED2 (without the line item) so i try to remove the Line item from Decision table but it is not possible.

MSMP - Rule results (i set the two results of the function)

MSMP - Maintains route mapping (depending of the result it goes to path Z_ROLEREMOVED or Z_ROLEASSIGNED)

Regards and thank you.

former_member204479
Active Participant
0 Kudos

Hi Sara,

Is there a certain reason that you are taking this design for the brf plus rule?

As I understand your brf plus routing rule is to send line items based on the prov_action to different paths?

If so, I think it can be done in a bit easier design.

In a BRF plus flat rule (line item by line item) you can have the "line item" structure in the context.

Then in the decision table have the PROV_ACTION field as an input. This field is available in the standard structure of request line item. Then based on the value 006 for assign and 009 for remove you can actually send back a different value.

You might be able to achieve this with a decision table only and not need to perform a table operation, loop and rule set.

Please try it and let us know if it works!

Thanks

Sammukh

Former Member
0 Kudos

Hi Sammukh


The design is as follow:


IF any of the PRO_ACTION is in Remove value

THEN ALL the request should go to a specific path, not only the line item rejected.


And i followed the guide showed below with some changes:



Does it respond toy you design question?


So thats why i create the table operation, just to check if any of the response is set to Remove.


Regards and thank you.


Sara.

Former Member
0 Kudos

Hi Sammukh


I have created the rule with the decision table you mention:


And i have set the MSMP stage in both possible cases:

LineItem (in this scenario i am provifing two roles, one is Assigned and the other one is Removed)

The behavior of this is part of the request goes to Path 1 and the other path of the request goes to Path 2. This isn't the behaviour required.

Stage Level (in this scenario i am provifing two roles, one is Assigned and the other one is Removed)

The behaviour of this is a get an error due the system does not recognized the routing. See screenshot below:

I am wondering if i am able to fetch the error here and rereoute the request. Something similar to a Escape route in case i face this error. Can i create an alternative escape condition (auto provisioning failure or Approver not found)?

Regards and thank you.

former_member204479
Active Participant
0 Kudos

Hi Sara,

Yes, I understand your design now. You want the entire request to move to paths based on the prov_action.

For this scenario your initial BRFplus rule seems to be correct. Also you mention that the simulation in brfplus works however the actual result does not.

Can you share the screen capture of the "Maintain route mapping"? the one you share above is too small to make out. Also from what I was able to see the 3rd (from path ID) and 4th (From stage) columns there were blank? Is it so? This being a routing rule you would need to maintain those two fields too. Apologies if I see it wrong, the screen font is too small in the attachment image.

Thanks

Sammukh

Former Member
0 Kudos

Hi,

Having read through the thread so far, would I be correct in understanding that you basically want a Whole request to go down a certain path if any of the line items have been set to "Remove"?

I have created a "initiator" rule in the past where items marked as "Remove" are sent to another path, with the "Add"/"Retain" items sent to another path. This was via a simple Decision table within a BRF+ Flat line rule. Obviously this is different from the requirement above.

Logically, I guess this would work like the SOD Violation detour rule i.e. If any of the line items cause a risk violation, you have the setting option to send the whole request to a detoured path or only the specific line item with the violation. In our case, we want the whole request to be detoured.

I see that you have also tried to change the stage setting so that a whole request is rerouted.

In regards to the decision table you have shared above, can you add "Itemnum/Line Item Key" into the "Line Item" column for each row of your decision table? Also, try adding the column "Role_connector" and make each row entry "Is not Initial". Let us know if this makes any difference.

Former Member
0 Kudos

Hi Sammukh.

No worries i can attach again the screenshots.

Maintain route mapping (Results: ROLEASSIGNED2, ROLEREMOVED2)

I have assigned the from path and from stage fields with no success. Let me also attach the log i am facing:

I put here my comments of the log:

  1. MSMP_RULE:095:GRFNMW:Rule R/B/53C9AF29BA230520E1008000AC1C7014; checking input parameters ...
  2. MSMP_RULE:101:GRFNMW:Rule R/B/53C9AF29BA230520E1008000AC1C7014 - request header converted to type GRAC_S_REQUEST_RULE_HEADER
  3. MSMP_RULE:102:GRFNMW:Rule R/B/53C9AF29BA230520E1008000AC1C7014 - line items converted to type GRAC_T_REQUEST_RULE_LINE
  4. MSMP_RULE:092:GRFNMW:Rule R/B/53C9AF29BA230520E1008000AC1C7014 is being validated ...
  5. MSMP_RULE:093:GRFNMW:Rule R/B/53C9AF29BA230520E1008000AC1C7014 was validated
  6. MSMP_RULE:094:GRFNMW:Rule R/B/53C9AF29BA230520E1008000AC1C7014 is executing ...
  7. MSMP_RULE:096:GRFNMW:Rule R/B/53C9AF29BA230520E1008000AC1C7014 executed
  8. MSMP_RULE:098:GRFNMW:Rule R/B/53C9AF29BA230520E1008000AC1C7014 returned results
  9. MSMP_RULE:131:GRFNMW:Retrieved rule result: 0002/ROLEASSIGNED2
  10. APPL_DEBUG:167:GRFNMW:Error reported while evaluating detour conditions. IF I AM NOT WRONG THE SYSTEM COULD NOT MATCH THE RESULT 002/ROLEASSIGNED WITH THE VALUES AT MAINTAIN ROUTE MAPPING. THAT'S WHY Y TRY TO REMOVE LINE ITEM FROM DECISION TABLE.
  11. 380:MSMP_ERROR:167:GRFNMW:Error reported while evaluating detour conditions
  12. 380:MSMP_ERROR:167:GRFNMW:Error reported while evaluating detour conditions
  13. MSMP_DEBUG:547:GRFNMW:Rule SAP_GRAC_ACCESS_REQUEST/B/53C9AF29BA230520E1008000AC1C7014: No result retrieved for Line-Item '0001'
  14. MSMP_DEBUG:136:GRFNMW:Error while evaluating routing rule; check MSMP log for more details

Any other need just tell me. Regards and thank you.

former_member204479
Active Participant
0 Kudos

Hi Sara,

Would you confirm if this rule you created is a brfplus flat rule (line item by line item) ? Because it looks like in the log that MSMP is trying to get the result for line 0001 and 0002 separately.

For your design you need only one result not line by line, so your routing rule should be a basic "BRFplus" application not the line by line one.

Please confirm.

Thanks

Sammukh

Former Member
0 Kudos

I think it is a BRFPLus Rule not a Flat rule.

This is the rule mapped with the stage:

Is it correct?

Thank you!

former_member204479
Active Participant
0 Kudos

Did you try "Routing level" to be Request here?

Thanks

Sammukh

Former Member
0 Kudos

I have just tried and i get the same log error.

Please mind i followed also the next guide:

Regards and thank you.

Former Member
0 Kudos

Dear all.

I solved the problem

At loop expression i put a Change values instead of a Insert Values. That was the reason why the result was never matching with the expected value.

Thank you very much for your cooperation.

Best regards.

Sara.

Answers (1)

Answers (1)

former_member204479
Active Participant
0 Kudos

Hi Sara,

Would you mind sharing the screen captures for the decision table and the context section of the function in your BRF plus rule? It would give a clear picture of all the attributes. Thanks!

Thanks

Sammukh