Population / Dynamic Group as Email Recipient

Which IIQ version are you inquiring about?

Version 8.3

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

Hello,

I’m creating a report that needs to be sent monthly to the managers of active identities. From what I’ve seen, only Identities and Workgroups can be defined as Emails Recipients.

Is there a way to send the report to a Population? If this isn’t possible, is there a way to change the users in a Workgroup dynamically?

Hi @bruno-co ,

You can get a list of identities within the population by applying the following logic.

  List emailList = new ArrayList();
  QueryOptions qo = new QueryOptions();
  GroupDefinition def = context.getObject(GroupDefinition.class,"Test-Population");
 Filter filter = def.getFilter();
  qo.addFilter(filter);
 List IdentityList = context.getObjects(Identity.class, qo);
  
 for(Identity identity:IdentityList){
    
    emailList.add(identity.getEmail());
  }

you can set this emailList to To address.

 EmailOptions emailops = new EmailOptions();
  
   emailops.setTo(Util.listToCsv(emailList));
2 Likes

Thanks for the reply @Arun-Kumar.

Is there a way to configure this logic in the report? Or do I have to change the process for sending emails?

HI @bruno-co there is no direct way to update workgroup from population but you can do below:-

  1. If you are using loopback connector then you can define role base provisioning with assignement logic to that workgroup as that workgroup will be created as Entitlement and you can assigned.
  2. if you do not have loopback connector then create role base provisioning with same assignement logic and in role debug you can mention the provisioning plan to add workgroup for that user.
  3. If you do not want that then use run rule task and run everyday to update that workgroup as per condition .
    try to use point 1 or point 2
1 Like

I went with the option 3 and I already have the right Identities I want to add to the Workgroup, but I don’t see a way to change the membership.

Is there a method to set the membership of the workgroup from a list of identities?

@bruno-co use one of below method as per your requirement
identity.setWorkgroups(null); // LIst of workgroup Object
identity.add(null); // Workgroup object

1 Like