Correlation rule for multi link creation

Which IIQ version are you inquiring about?

8.4p1

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

We have to run aggregation for a web service application where for a give user lets say User123 can have 4 entries . User123, [email protected], ADM123, [email protected]. expectation is to create 4 application links for this user. I am trying to run the below correlation rule, but it seems to only create 2 links only .

import java.util.HashMap;
  import java.util.Map;
  import org.apache.log4j.Logger;
  import sailpoint.object.Identity;


  Logger seiamLog = Logger.getLogger("test.rule.SEIAMCorrelation");
  seiamLog.debug("==========Correlation Rule Execution Begins========");
  Map returnMap = new HashMap();
  String userName=account.getStringAttribute("username");

  if(userName!=null)
  {
    userName = userName.toUpperCase();	
    
  }

  String name = null;
  String str_remove = "ADM";
  String str_add = "SESA";

  if(userName.contains("@"))
  {
    seiamLog.debug("username containing @ is "+userName);
    name= userName.split("@")[0];

    if(userName.startsWith("ADM"))
    {
      seiamLog.debug("username containing @ with ADM is "+userName);
      name=str_add+userName.replace(str_remove, "");
      if(name!=null && name.startsWith("SESA") && name.length()<=10)
      {
        Identity iden=context.getObjectByName(Identity.class, name);
        if(iden!=null)
          return returnMap.put("identityName", name);
      }
    }
    else if(userName.startsWith("SESA"))
    {
      seiamLog.debug("username containing @ with SESA is "+userName);
      name = userName;
      Identity iden=context.getObjectByName(Identity.class, name);
      if(iden!=null)
        return returnMap.put("identityName", name);
    }

  }
  else if(userName.startsWith("ADM"))
{
seiamLog.debug("username with just ADM is "+userName);
name=str_add+userName.replace(str_remove, "");
if(name!=null && name.startsWith("SESA") && name.length()<=10)
{
  Identity iden=context.getObjectByName(Identity.class, name);
  if(iden!=null)
	return returnMap.put("identityName", name);
}
}
else if(userName.startsWith("SESA"))
{
seiamLog.debug("username with just SESA is "+userName);
name = userName;
Identity iden=context.getObjectByName(Identity.class, name);
if(iden!=null)
  return returnMap.put("identityName", name);
}
  

  return null;

i dont see any issue in rule. Any idea what am i missing ?

@rohit_jaiswal1 Could you tell which links are created on this example?

Hi @rohit_jaiswal1 ,
If we have the feasibility you can try create a attribute like an id which will be common between the 4 accounts and use that to correlate the accounts to iiq. This attribute can have the same value as identity name or any primary value like emp id.

Thanks

1 Like

One for SESA and ADM are created, SESA i am assuming gets done via connector correlation… SESA/[email protected] is not getting correlated. i can see if being there in the correlation rule from the loggers

if you mean to say to create identity attribute for it ? i am afraid not a possibility

I am sorry guys, i found the issue… while replacing ADM with SESA using replace, i used the wrong attribute to update

1 Like

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