Workflow or Rules getting triggered on Signoff certification

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(); 

  }

}

The CertificationSignOffApprover should return a java.util.Map:

Map containing either an Identity or Identity name with the key “identity” or “identityName”, respectively.
e.g.: “identity”, identityObject or
“identityName”, “Adam.Kennedy”

You are not returning anything (at least not in the code you are sharing).

See for an example the Technical White Paper: Rules in IdentityIQ

– Remold

Added the code to return Map containing identity, but it shows the same screen, not provides the option to Approve or Reject.


Can you change this to WorkItem.Type.Approval and try out

Thanks. It’s providing the approve and Deny button after making the below change.
item.setType(WorkItem.Type.Approval);

However, while opening the WorkItem it shows the below error And also please advise how to link Approve / Deny functionalities. My requirement is to create a ServiceNow ticket on approval and Redirect the request back to the Certifier on Deny.

Hi @didudeb2006,

You forgot to include the error :frowning:

Can you make a separate thread for your ServiceNow Ticket requirement, as that would be a new topic.

– Remold

Please find the below error.

Hi @didudeb2006 , can you at the related log entries? The log-file contains more detailed information on the error.

– Remold

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.