Friday, 23 March 2018

OIM - Get Value of Given Parameter from Orchestration Map in Event Handler.

public String getParameterFrmOrchestration(HashMap<String, Serializable> userParamsMap, String param){
        final String logp = CN + " :: getParameterFrmOrchestration - ";
        LOGGER.log(Level.FINEST, logp + " START.");
        LOGGER.log(Level.INFO, logp + "Getting value of parameter: " + param);
        String paramValue = null;
        try {
            paramValue = (userParamsMap.get(param) instanceof ContextAware) ? (String)((ContextAware)userParamsMap.get(param)).getObjectValue() :
                    (String)userParamsMap.get(param);
            LOGGER.log(Level.INFO, logp + "Value of parameter '" + param + "' is : " + paramValue);
        } catch (Exception e) {
            LOGGER.log(Level.SEVERE, logp + "Error Occured while fetching parameter value", e);
            e.printStackTrace();
        }
       
        LOGGER.log(Level.FINEST, logp + " END");
        return paramValue;
 }


Happy Learning!!!

No comments:

Post a Comment