cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt on User default

Former Member
0 Kudos

Hi All,

I have tried to understand and replicate the screenshots at , but could not understand Loop and Ruleset.

- Function USER_DEFAULT_FUNCTION is calling Ruleset,and Ruleset has the operation " Change USER_DEFAULT_ID after processing expression LOOP_CONNECTOR_ITEMS.

So, could you say to which value will USER_DEFAULT_ID be changed to, and what is meant by "after processing expression LOOP_CONNECTOR_ITEMS. "

- I could not understand the logic of the loop.

- Also George's screenshots are not in sequence. He first adds condition 'then'. why not 'if'

Could you please suggest, as i have to review a User default setting.

regards

Plaban

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Plaban,

No it's not working for me

Former Member
0 Kudos

Hi Plaban,

Here they are

Former Member
0 Kudos

Thanks Plaban.

Kindly see below and advise

Former Member
0 Kudos

are you using System or any Line item entry as a input column in your decision table.  so, only then loop is required.

So, if you are using LOOP, you need to first create(provide screenshot of decision table) a decision table. Then, after creating a loop, call it from  a rule, from your ruleset.


So, could you provide screenshot of your Ruleset and Rule


Former Member
0 Kudos

HI Somik,

I am also getting the same screen, as of yours. However, Loop works, when Request Attributes and USER_DEFAULT_ID overwrites the return value of 1st line item

But Loop is not working for Role Attributes. Could you share if it works for you

Regards

plaban

Former Member
0 Kudos

Hi All,

I get the below error while creating rule under loop connectors

Former Member
0 Kudos

if your Loop has Processing Mode "Return Value" so set Result Data Object as "User Default ID". Then recreate your rule

madhusap
Active Contributor
0 Kudos

Hi Plaban,

Since SYSTEM is not available under Request Header attributes, rather it is available as Role Attributes which are called as line-item fields while calling the BRF Rule. So, in such cases LOOP is a suggested solution, rather than using the Decision Table directly. Though within the LOOP, you can still call the Decision Table or implement IF/ELSE conditions.

So, basically we have created a BRF+ rule for user defaults which will return User Default ID after looping through decision table entries based on SYSTEM as usually each SYSTEM will have different User Default ID.

Regards,

Madhu.

Former Member
0 Kudos

Hi Madhu,

As mentioned in my post, i have been through the document, and i understand the purpose of LOOP(i.e through loop through Decision table, until condition) and SYSTEM being Role Attribute. I also clearly understand Default-id as Output Column/Rule result in Decision table.

With all due respect, i do not see the above, clarify, the logic of a LOOP/Ruleset. Let me give an example, of a new user id request having 2 System and 2 Role Line item, when User default is used

eg. 1st line item is for system. So,  as per Logic(USER_DEFAULT_ID is initial), So, loop is not exited. So, then logic goes to statement ' Change USER_DEFAULT_ID , after processing expression <Decision table'.

So, i cannot understand here how and to what is the value of USER_DEFAULT_ID changed to?  So, could you kindly let me know, atleast for 2 line items, how the logic traverses

 

Regards

Plaban

madhusap
Active Contributor
0 Kudos

Hi Plaban,

As per User Defaults functionality Loop condition is to run through each Line Item in the request.

Exit condition mentioned in the screenshot is not required as Loop will automatically exit after processing all the LineItems in the request. I had exit condition as depending on rule 2 I had rule 3 to process which was removed later.

Loop takes first SYSTEM LineItem and checks if there is an entry in the decision table and if matches then returns USER DEFAULT ID.

Then Loop picks up the next Line Item in the request and then performs similar action as above and once done, then picks up the next Line Item.

So for each LineItem loop returns a User Default ID which ideally means for each system there will be a default ID. Though you have mutliple LineItesm for same system it returns same Default Id based on SYSTEM.

This is a test case which you can do testing yourself and if you face any issue let me know

Regards,

Madhu.

Former Member
0 Kudos

Hi Madhu,

I understand all the theory, but i am not able to get it done. let me tell you my steps

1. set function to event mode

2.In signature tab, change Result data object from ACTIONS to USER_DEFAULT_ID

3. create a ruleset and open it.

4. in Then condition-> Process Expression->Select -> give the decision table name. the value besides Change is USER_DEFAULT_ID,which is pulled from step 2

5. then i go and create loop. but i do not know, whether i need to create or select a rule. Suppose, i create a rule, then shall i click Then or IF. suppose i click 'Then', which option i choose?

could you please help here

Also, could you say, if user default is possible, without loop. ?

Regards

madhusap
Active Contributor
0 Kudos

Hi Plaban,

If you are using SYSTEM as your decision table entry then User Defaults will work only when you use LOOP and the reason I have explained you in my first reply.

Now coming to the issue you are facing in creating Loop.

Your Loop has Processing Mode "Return Value" so set Result Data Object as "User Default ID"

Loop Mode is what you want to loop through i.e., basically you want your loop to run through table Role Attributes which contain Request Line Items as your decision table entries are based on SYSTEM field so set the loop mode as "For Each Entry in"

Once you complete this then in the Loop add a rule i.e., in your last screen select PROCESS EXPRESSION and the expression which it should process is decision table and after processing should change User Default ID.

Are you facing difficulty in setting the loop correctly? You just need to set the fields as shown below

Regards,

Madhu.

patrick_weyers
Participant
0 Kudos

Hi Madhu,

Can you explain the logic of User Defaults for multiple line items with different systems?

If I set up the User Defaults as per the above and I have a request with two line items:

001    Role X   / System SYS1

002    Role Y   / System SYS2

and I have a decision table like:

System     User Default ID

SYS1          001

SYS2          002

the system will call the User Defaults BRF+ function. It will run through the loop for 2 iterations (as there are two line items). During the first iteration, it will set USER_DEFAULT_ID to 001. In the second iteration, it will overwrite USER_DEFAULT_ID from 001 to 002. Hence, the result from the first iteration will be lost.

The BRF+ function will report back to GRC only User Default ID = 002.

How do you deal with requests than contain multiple line items with different systems and make sure all the user defaults get assigned - rather than only one (the one valid for the last line item, incidentally)?

Thanks a lot and regards

Patrick

Former Member
0 Kudos

Hi Patrcik,

Could you share your screenshot of Ruleset, Loop and decision table.

Regards

Plaban