Which IIQ version are you inquiring about?
Version 8.3
Share all details related to your problem, including any error messages you may have received.
We are setting up a workflow with the operation of revoke for all connected applications in sailpoint choosing entitlement option and we have a condition of shared entitlement for multiple roles so need suggestions of setting up a provisioning plan for the operation logics.
import sailpoint.api.SailPointContext;
import sailpoint.object.sailpoint.object.NativeChangeDetection;
import sailpoint.tools.Util;import sailpoint.object.ProvisioningPlan;
import sailpoint.object.AccountRequest;
List ops = new ArrayList();
Identity managerIdentity = context.getObjectByName(Identity.class, identityName).getManager();
String managerName = managerIdentity.getName();
EmailOptions emailOptions = new EmailOptions();
if ( event != null ) {
List ncs = event.getNativeChanges();
if ( ncs != null ) {
for ( NativeChangeDetection nc : ncs ) {
AccountRequest.Operation op = nc.getOperation();
String opString;
if ( op == null )
opString = "Modify";
else
opString = op.toString();
if ( !ops.contains(opString) ) {
ops.add(opString);
}
// If a native change is detected, add a Revoke operation
// It checks if a native change (nc) has been detected. If nc is not null, it means a native change has been detected.
if (nc != null) {
opString = "Remove";
//If a native change is detected, it sets opString to "Remove". This could be indicating that the operation to be performed in response to the native change is a revocation.
if (!ops.contains(opString)) {
ops.add(opString);
}
//It then checks if "Remove" is already in the ops list. If it's not, it adds "Remove" to the ops list.
//This list might be used later in the workflow to perform the operations it contains.
// Send a notification email to the line manager
Identity LineManager = identityManager.getManager();
if (lineManager != null) {
emailOptions.setTo(Manager.getEmail());
emailOptions.setTemplate("NotificationEmailTemplate");
emailOptions.setNotificationVariables(Util.mapOf("identity", identity, "operation", opString));
context.sendEmailNotification(emailOptions);
}
}
}
}
}
}
}
return Util.listToCsv(ops);