Which IIQ version are you inquiring about?
Version 7.2
Share all details related to your problem, including any error messages you may have received.
I am working on a POC, where the requirement is to redirect the WorkItem to a Group based on certain condition when the user Sign-Off certificate.
In-order to achieve this, I have created a new Rule (“Type=CertificationSignOffApprover”) and added my piece of code to create a new workItem by reading the WorkItem coming as part of the “certification” argument and assigning it to the required group. Added the Rule as Sign Off Approver Rule.
Although the assignment is working as expected, it only provides the option to the Group member to complete the newly created WorkItem, but doesn’t provide any option to Approve or Reject it.
Any advise, how to achieve this requirement.
Here is my piece of code.
List identities = new ArrayList();
List entities = certification.getEntities();
for ( CertificationEntity entity : entities ) {
List items = entity.getItems();
String remediationWrkItemReceiver ;
Identity i = null;
if(null != entity.getIdentity((XMLReferenceResolver)context)){
i = entity.getIdentity((XMLReferenceResolver)context);
}
for ( CertificationItem item : items ) {
EntitlementSnapshot ent = item.getExceptionEntitlements();
Calendar expiration = Calendar.getInstance();
Identity targetIdentity = context.getObjectByName(Identity.class, i.getName());
Identity requester = context.getObjectByName(Identity.class, "spadmin");
WorkItem item = new WorkItem();
item.setType(WorkItem.Type.ManualAction);
item.setOwner(context.getObjectByName(Identity.class, "Passport Remediation Admin Workgroup"));
item.setRequester(requester);
Sequencer sequencer = new Sequencer();
item.setName(sequencer.generateId(context, item));
item.setRenderer("lcmManualActionsRenderer.xhtml");
item.setLevel(WorkItem.Level.Normal);
item.setTarget(targetIdentity);
item.setTargetClass(Identity.class.getName());
item.setDescription("Manual Changes requested for User: "+targetIdentity.getDisplayableName());
item.setHandler("sailpoint.api.Workflower");
item.setIdentityRequestId("0000000038");
Attributes attributes = new Attributes();
item.setAttributes(attributes);
ApprovalSet approvalSet = new ApprovalSet();
ApprovalItem approvalItem = new ApprovalItem();
approvalItem.setApplication(ent.getApplicationName());
approvalItem.setNativeIdentity(targetIdentity.getName());
approvalItem.setOperation("Create");
approvalItem.setValue("attribuut = \"value\"");
approvalSet.add(approvalItem);
attributes.put("approvalSet", approvalSet);
attributes.put("identityDisplayName", targetIdentity.getDisplayableName());
attributes.put("identityName", targetIdentity.getName());
item.setExpiration(expiration.getTime());
context.startTransaction();
context.saveObject(item);
context.commitTransaction();
}
}