-1

Informatica 10.0(Hotfix-2) - MDM user exit implementation :

Saroj
  • 14
  • 4

1 Answers1

0

CUSTOM JAVA BASED USER EXITS IN INFORMATICA MDM v10.0/10.1

Below is a sample java code for post load user exit, created using eclipse tool for reference Code:

package com.mdm.hub.userexits.impl;

import com.informatica.mdm.api.put.ActionType;
import com.informatica.mdm.userexit.PostLoadUserExit;
import com.informatica.mdm.userexit.UserExitContext;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import java.util.*;

public class PostLoadUserExitImpl implements PostLoadUserExit {

private static final Logger logger = LogManager.getLogger(PostLoadUserExitImpl.class);

public void processUserExit(UserExitContext userExitContext,
                ActionType actionType, Map<String, Object> baseObjectDataMap,
                Map<String, Object> xrefDataMap, 
    List<Map<String, Object>> xrefDataMapList) throws Exception {

    logger.info("Entered Post load User Exit");
    logger.info("Job ID " + userExitContext.getBatchJobRowid());
    logger.info("Table name " + userExitContext.getTableName());
    logger.info("Action type " + actionType);

  try {
       // Add custom logic, invoke oracle PLSQL code/Another Java class
     /*Call user exit for post load/put process*/
        //String postloadQuery = "{call CMXUE_NEW.post_load(?,?,?,?,?,?)}";
    } catch (Exception e) {
    logger.error("Error in POST LOAD USER EXIT, error is "
    + e.getMessage());
    }

    logger.info ("ENDING POST LOAD USER EXIT");
   }
  }

Logger set up: Setup has to be done to display Logger statement which is added in java code on log files.

Open the file {infamdm_install_dir}/hub/server/conf/log4j.xml

 Add below line :
 <category name="com.siperian.mdm.hub.userexits">` 
   <priority value="DEBUG"/> 
 </category>
Log path details : Log file name: ‘cmxserver.log’ Path :{infamdm_install_dir}/hub/server/logs
Saroj
  • 14
  • 4