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.
Hi team,
I have one requirement which is to add an additional approval in case it comes as a true one role attribute. For this I created an approvalAssignmentRule.
According to the logs the rule is executed without problems and reaches the end, but I get an error “Unable to find the approval assignment [null]”.
Here es mi code
import sailpoint.object.*;
import sailpoint.object.Link;
import sailpoint.object.Bundle;
import sailpoint.object.Identity;
import sailpoint.object.ManagedAttribute;
import sailpoint.object.Workflow.Approval;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
System.out.println("************* ENTERING THE Approval Assignment Rule **************");
List approvals = new ArrayList();
try {
Approval mgr = new Approval();
String description = "Approval - Account Changes for User: " + identityName;
System.out.println("********** Description *********::" + description);
for (ApprovalItem item : approvalSet.getItems())
{
System.out.println("**********approvalSet item object *********::" + item.toXml());
//Get Role Name
Object itemValueObj = item.getValue();
if (itemValueObj instanceof String)
roleName = (String) itemValueObj;
else
roleName = itemValueObj.get(0);
//Get Role attribute using Role Name
System.out.println("********** Nombre del rol *********::" + roleName );
Bundle rol = context.getObjectByName(Bundle.class, roleName);
String owner = "Certificadores de accesos";
Boolean critico = rol.getAttribute("Critico");
System.out.println("********** critico *********::" + critico );
if (critico) {
System.out.println("********** IF dentro del rol classifications *********::" );
mgr.setWorkItemDescription(description);
mgr.setDescription(description);
mgr.setOwner(owner);
mgr.setMode("serial");
mgr.setApprovalSet(approvalSet);
approvals.add(approval);
System.out.println("********** Añadida aprobacion certificadores de accesos *********::");
}
}
}
catch (Exception e)
{
System.out.println("exception in setting approval"+e.printStackTrace());
}
System.out.println("TERMINA");
return approvals;
If anyone knows how I can solve this it would help me a lot.
Thanks in advance