I’m trying it another way, both ways of doing this I found here - Creating a way for a manager to only request specific entitlements and roles - #9 by Remold
This route was posted by @Jarin_James in that thread - maybe you can take a quick peak?
Here is my new Rule -
import sailpoint.object.Filter;
import sailpoint.object.Identity;
import sailpoint.object.QueryOptions;
import sailpoint.object.QueryInfo;
import sailpoint.object.Custom;
Custom customObject = context.getObjectByName(Custom.class, "Access Manager Entitlement List");
List filterList = new ArrayList();
for(String key : customObject.getAttributes().getKeys()) {
for(String displayName: (List<String>)customObject.get(key)) {
Filter f = Filter.eq("displayName", displayName);
filterList.add(f);
}
}
Filter filter = Filter.or(filterList);
Should there be something added to bottom of the above code that returns the list?
Here is my Custom Object -
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Custom PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Custom name="Access Manager Entitlement List">
<Attributes>
<Map>
<entry key="CORP2 AD">
<value>
<List>
<String>Entitlement 1</String>
<String>Entitlement 2</String>
</List>
</value>
</entry>
</Map>
</Attributes>
</Custom>
I now get this error in SYSLOG -
sailpoint.tools.GeneralException: BeanShell script error: bsh.ParseException: Parse error at line 10, column 44. Encountered: ) BSF info: Rule_Yardi_AccessManager_EntitlementSelector at line: 0 column: columnNo
I’d like to get either of these methods to work, hope someone is able to assist.
Thank you!