I am trying to write a SailPoint IIQ workflow where if the user is an Employee and has Role 1 assigned, the loop will return true. Also if the User is a Contingent Worker and has the Role 2 assigned, the loop will return true. Else the loop will return "Role not provisioned". The user is an Employee and is assigned the Role 1, but still the loop return "Role not provisioned".
The flow is entering the main ELSE loop, where it is able to read the empType, but not able to read the "assignedRoles.contains()".
Here's the code:
Two things:
The method Identity.getAssignedRoles()
returns a Bundle
, not a string. It's never going to contain()
a string. You will need to extract the names from the list of assigned roles.
I would use getRoleAssignments
instead, because it handles the case of negative role assignments and the case where the user is assigned the role twice with different targets.