Enabling security on value sets helps us to restrict values on concurrent program parameters.
Business Scenario:
Let’s say that we would like define Apple products with their codes in a independent value set which will be attached to a concurrent program as a parameter.
100: iPod Product Family (Note: This is not a product but a product family)
101: iPod Classic
102: iPod Nano
200: iPhone Product Family (Note: This is not a product but a product family)
201: iPhone 5S
202: iPhone 5C
203: iPhone 4S
Business Requirements:
1. Hide Single product from Concurrent Program parameter list of values (Note: we will use Non-Hierarchical Security here)
2. Hide complete Product Family from Concurrent Program parameter list of values (Note: we will use Hierarchical Security here)
Let’s start..
Define Value Set:
Navigation: Application Developer > Application > Validation > Sets
Enter information as shown below. First we will see how Non-Hierarchical Security feature will work.
Enter values for the above value set.
Navigation: Application Developer > Application > Validation > Values
Enter Value set name and click Find button
Enter Products information as shown below
Save it. click on “Values, Hierarchy, Qualifiers” tab
Select 100 (iPod Family) and 200 (iPhone Family) as Parents.
Enter Level information as shown below. Here we are defining two levels of data. Level 1 is Product Family and Level 2 is Products.
Save it.
Ensure 100 (iPod Family) record is selected and then Click on “Define Child Ranges” button
Enter iPod products range here.
Save it. Close Child Ranges Window.
Select 200 (iPhone Family) and Go to Child Ranges again as shown below
Enter iPhone products range here and Save it.
Hmm. We are done with defining Value set and it’s values.
Define Security Rules:
Here, we will define security rules for the value set we have created.
Navigation: System Administrator > Security > Responsibility > Value Set > Define
Enter our value set name and click Find button to move on to next screen
Create a Security Rule as “iPhone 5S sold out” as shown below.
In “Security Rule Elements” Add a record of type “Include” and leave it blank. When we leave the From and To values blank it will include ALL values available in value set.
Add section row with type “Exclude” and enter iPhone 5S product code.
Save it. Click Assign button to link this rule with certain responsibility.
Link this rule to “System Administrator” responsibility as shown below.
Save it. Close it.
We will come back to this screen again later and define another rule to demonstrate Hierarchical security.
Currently we would like to test Non-Hierarchical security requirement.
Define Concurrent Program
Note: If you need detailed explanation about defining concurrent program and adding it to request group follow the below link
http://erpschools.com/articles/concurrent-program-registration-and-add-it-to-request-group
Navigation: Application Developer > Concurrent > Executable
Navigation: Application Developer > Concurrent > Program
Click Parameters button and enter information as below
Make sure to check “Enable Security” option. Otherwise our security rules will not applied.
Add concurrent program to a request group.
Navigation: System Administrator > Security > Responsibility > Request
Go to Submit Request screen and pull up our concurrent program
You can observe that iPhone 52 (202) is missing in the list of values. That is because of our security rule.
It’s working. :)
Let’s add one more security rule to test “Hierarchical Security” type.
Navigation: System Administrator > Security > Responsibility > Value Set > Define
Add new Rule “All iPods”. Now we would like to exlude all iPod products from the list.
Add one “Include” record with blanks and one “Exclude” record with 100 (iPod Family) in Security Rule Elements
Click Assign button and add this rule to a Responsibility as shown below.
We are not done yet but let’s go and check how our concurrent program parameter will behave.
In the above screen shot you can observe that only one record 100 (iPod Family) is missing but it still includes 102 and 103 which are iPod products.
Remember, initially we set security type on our value set to “Non-Hierarchical Security” ?
Now change it to “Hierarchical Security”
Navigation: Application Developer > Application > Validation > Sets
Query our value set and change security type as shown below.
That’s it.
Go to Submit Request screen and see how List of values will appear.
All iPods products are gone.
Here, We didn’t exclude each iPod product separately but instead we enable Hierarchical security and excluded parent itself there by removing child values also.
Done.
Thank you. Prudhvi