I created a workflow that is triggered by an Access Request Decision when a user is granted access to an entitlement that starts with “eos_”. The workflow needs to check if the user is already a member of any “eos_” groups and revoke the others, with exception to one called “eos_access” (the basic access group that always needs to remain).
With the help of harbor pilot, I got most of this working, but not the Custom Variable Operator that is meant to create the list of groups to revoke. I’ve tried many variations, but it either gives me an error or returns no results, even though I have other groups that begin with “eos_”. Here is the code I have in Editor, I can share the whole workflow if needed. Thanks.
{
“name”: “eosEntitlements”,
“description”: “Filter accessItems starting with eos_ but excluding eos_access”,
“transforms”: ,
“transform”: {
“filter”: {
“comparator”: “Script”,
“script”: “value.startsWith(‘eos_’) && value !== ‘eos_access’”
},
“id”: “sp:transform:filter:array”,
“input”: {
“variableA.$”: “$.getAccess.accessItems”
},
“type”: “filter”
},
“type”: “string”
}