Pre Delegation Rule - Don't assign to user list instead a workgroup

Which IIQ version are you inquiring about?

Version 8.0

Share all details related to your problem, including any error messages you may have received.

I’m needing guidance on creating a delegation rule for assigning a certifier.

We want it to assign to a user’s manager, but if the user’s manager is a user in a specific workgroup (list) then assign it to a workgroup that would contain authorized user list of certifiers for said application.

For example: we don’t user(s) to be assigned to the CEO for certifying. Instead, the user(s) should be assigned to a specified workgroup

I did review the post below, but it talks more about if the certifier is inactive.

@JTBNRx31
Do you mean if the certifier is part of multiple workgroups, it should be assigned any of the workgroup?

If that’s the case please try below code, this should help you

List wrkGrps = certifierObj.getWorkgroups();

if (wrkGrps==null || wrkGrps.size()==0) {
 results.put("recipientName", certifierObj.getName() );
} else if (wrkGrps.size()>0)  {
 results.put("recipientName", wrkGrps.get(0) );
}

@JTBNRx31

The pre-delegation thread was very clear. here is sample you can use.

In below, It will check if certifier is part of any special WG then the certification will assign to another workgroup.

Map results = new HashMap();
String workGroupname = "Approver WG Name";

String certifierName = certification.getCertifiers().get(0);
boolea ismember = false;
Identity certifierObj = context.getObjectByName(Identity.class, certifierName);

// call method to get WG members of special WG, method should be like below,
Identity splWGObj = context.getObjectByName(Identity.class, "Special WG Name");
Iterator members = ObjectUtil.getWorkgroupMembers(context, splWGObj, null);
while(members.hasNext()) {
  Object[] obj = (Object[]) members.next();
 Identity single = (Identity) object[0];
 if(certifierName.equals(single.getName()) {
  ismember = true;
}
}

if (!ismember) {
 results.put("recipientName", certifierName );
} else {
 results.put("recipientName", workGroupname );
}

results.put("description", "Please certify as certifier is special user");
results.put("comments", "This is the access currently granted to you: ");

results.put("reassign", true);

return results;

Please let us know if this is same requirement you have. below is the doc.

Thank you for the assistance. I will review the pre-delegation thread again and the examples provided.

1 Like

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