IBM Support

Person with inline extension can not be deleted by deleteParty or deletePartyWithHistory.

Troubleshooting


Problem

Person with inline extension can not be deleted by deleteParty or deletePartyWithHistory. This can be reproduced by taking the following steps:   1. Create xPerson inline extension with "Add Fields to Base Table" option to extend Person.       Do not select the "Override base query" option.   2. Run addPerson with or without extension.   3. Run deleteParty or deletePartyWithHistory with partyId created by addPerson.

Symptom

InfoSphere MDM will return the following message (this is the result of deleting the contact):
"
2012-11-13 01:55:31,817 [ORB.thread.pool : 0] ERROR com.dwl.base.util.DWLExceptionUtils - com.ibm.pdq.runtime.exception.DataRuntimeException: [pdq][10103][2.25.76] An error prevented the update operation from completing successfully.;- Caused by: com.ibm.db2.jcc.am.SqlIntegrityConstraintViolationException: DB2 SQL Error: SQLCODE=-532, SQLSTATE=23504, SQLERRMC=DB2ADMIN.PERSON.F1_PERSO, DRIVER=3.62.56
at com.ibm.pdq.runtime.internal.db.JdbcData.update_(JdbcData.java:391)
at com.ibm.pdq.runtime.internal.db.DataImpl.update(DataImpl.java:695)
at com.ibm.pdq.runtime.generator.BaseData.update(BaseData.java:906)
at com.dwl.tcrm.coreParty.entityObject.EObjContactDataImpl.deleteEObjContact(EObjContactDataImpl.java:335)
at com.dwl.tcrm.coreParty.bobj.query.PartyBObjQuery.deleteContact(PartyBObjQuery.java:328)
at com.dwl.tcrm.coreParty.bobj.query.PartyBObjQuery.persist(PartyBObjQuery.java:284)
at com.dwl.bobj.query.AbstractBObjQuery.persistDelete(AbstractBObjQuery.java:603)
at com.dwl.tcrm.coreParty.component.TCRMPersonComponent.deletePerson(TCRMPersonComponent.java:2758)
at com.dwl.tcrm.coreParty.component.TCRMPartyComponent.deletePerson(TCRMPartyComponent.java:11034)
at com.dwl.tcrm.coreParty.component.TCRMPartyComponent.deleteOperationalDataParty(TCRMPartyComponent.java:10431)
at com.dwl.tcrm.coreParty.component.TCRMPartyComponent.deleteParty(TCRMPartyComponent.java:10144)
at com.dwl.tcrm.coreParty.controller.TCRMCorePartyTxnBean.deleteParty(TCRMCorePartyTxnBean.java:6954)
at com.dwl.tcrm.coreParty.controller.EJSLocalCSLTCRMCorePartyTxn_aeb50529.deleteParty(EJSLocalCSLTCRMCorePartyTxn_aeb50529.java)
"

Cause

The reason is that the deleteXPerson() in the generated 'XPersonExtBObjQuery.java' is empty by default and the user needs to add delete logic as MDM_TODO.
"// MDM_TODO: Write customized business logic for the extension here."

Environment

MDM V10 Workbench environment

Diagnosing The Problem

The inline extension design has been changed since MDM V10 and it works well without modification in previous version.

Resolving The Problem

To fix this, you must add the required logic manually to delete Person record as follows:
//*****************************************************************************************************************
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->

*
* Custom implementation should be provided when required.
*
* @throws Exception
*
* @generated
*/
protected void deleteXPerson() throws Exception{
logger.finest("ENTER deleteXPerson()");
// MDM_TODO: Write customized business logic for the extension here.
try{
del_connection = DataManager.getInstance().getQueryConnection();
EObjXPersonExtData theEObjXPersonExtData = (EObjXPersonExtData) DataAccessFactory.getQuery(EObjXPersonExtData.class, del_connection);
theEObjXPersonExtData.deleteEObjXPersonExt(((XPersonBObjExt) objectToPersist).getEObjPerson().getContIdPK());
} finally {
try {
del_connection.close();
} catch (Exception e) {
DWLExceptionUtils.log(e);
if (logger.isFinestEnabled()) {
String infoForLogging="Error: Error closing the connection " + e.getMessage();
logger.finest("deleteXPerson() " + infoForLogging);
}
}
}
logger.finest("RETURN deleteXPerson()");
}

[{"Product":{"code":"SSPVUA","label":"IBM InfoSphere Master Data Management Server"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Workbench","Platform":[{"code":"PF033","label":"Windows"}],"Version":"10.0;10.1;11.0","Edition":"All Editions","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Product Synonym

InfoSphere MDM Server;InfoSphere Master Data Management Server

Document Information

Modified date:
16 June 2018

UID

swg21626743