Discussion Locked

Unable to detect the roles assigned to a user using simple if-else loop in

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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()".

2 replies

by kees_b edited

That means that something is wrong with your code. Without the coding and without the Sailpoint IIQ manuals, it's impossible to say what the error is.
Better try there own developer forums.

by raufkhan89321 edited

It seems like there might be an issue with the condition checking the assigned roles. Double-check the syntax and ensure that the comparison is accurate. Here's a suggestion for your SailPoint IIQ workflow:

java
Copy code
if (empType.equals("Employee") && assignedRoles.contains("Role 1")) {
return true;
} else if (empType.equals("Contingent Worker") && assignedRoles.contains("Role 2")) {
return true;
} else {
return "Role not provisioned";
}
Ensure that empType and assignedRoles are correctly fetched, and the comparison conditions are precise. If the problem persists, consider debugging the workflow to pinpoint the exact point of failure.

Note: spam link removed by moderator.

This discussion is closed to new replies.