Sunday, February 12, 2012

Pre-Process Event Handler to generate the Display Name in OIM 11G

public EventResult execute(long processId, long eventId, Orchestration orchestration) {

HashMap<String, Serializable> parameters = orchestration.getParameters();
HashMap<String, Object> mapAttrs = new HashMap<String, Object>();

String firstName = (String)parameters.get(UserManagerConstants.AttributeName.FIRSTNAME.getId());
String lastName = (String)parameters.get(UserManagerConstants.AttributeName.LASTNAME.getId());
mapAttrs.put("base", lastName" "firstName);

orchestration.addParameter("Display Name", mapAttrs);

return new EventResult();
}

1 comment:

  1. This is a bit different when compared to generating any ohter OOTB OIM fields. We will have to create a Map with "base" as the key and then the value. Pass this as an input to the orchestration.addParameter().

    ReplyDelete