IBM Support

Handling No Results Found using the Application Toolkit MDM Search Integration Service

Technical Blog Post


Abstract

Handling No Results Found using the Application Toolkit MDM Search Integration Service

Body

No results found is a common response to a search request, but how do you detect this in your BPM process ?

A “No Results Found” situation causes an exception to be thrown which means you can detect it using an intermediate error event, but you need to be able to handle a real errors as well as a no results found which is a special kind of exception.

Here we have a simple example of a search human service which applies equally to Physical and Virtual MDM Server.

image

 

There is an intermediate error event attached to the do search nested service that calls the MDM Search integration service. The gateway decision determines whether it is a no results found or not.

To determine how to configure the decision gateway we need to have a look at the format of the exception we get when a no results found is generated and this differs slightly between virtual and physical MDM Server.

Handling a Virtual MDM Server response

A sample of part of the xml format of the exception is shown here

<error type="mdm.bpm.exceptions.MDMBPMOperationException" description="MDMBPMOperationException">
  <cause type="java.lang.Throwable" description="cause"></cause>
  <errors type="java.util.ArrayList" description="ArrayList" />
  <localizedMessage type="java.lang.String" description="String">CDKAT0107E IxnMemSearch did not succeed. Reason: no candidates found.</localizedMessage>
  <message type="java.lang.String" description="String">CDKAT0107E IxnMemSearch did not succeed. Reason: no candidates found.</message>
  <reasonCode type="java.lang.String" description="String">ENOREC</reasonCode>

Here is is the reason code we are interested in. So the decision gateway configuration looks like this

image

 

The decision logic being

tw.system.error.xpath("error/reasonCode").item(0).getText() == 'ENOREC'

extracts the reason code and checks for ENOREC.

Handling Physical MDM Response

The implementation remains the same, the test within the decision gateway needs to be altered as the location of the reason code is different to virtual. In this example the reason code that is checked is applicable to a Party or Person Search, however it is possible that the reason code will be different for different types of physical search.

A sample of part of the xml format of the exception is shown here

<error type="mdm.bpm.exceptions.MDMBPMOperationException" description="MDMBPMOperationException">
  <cause type="java.lang.Throwable" description="cause"></cause>
  <errors type="java.util.ArrayList" description="ArrayList">
    <element type="mdm.bpm.exceptions.MDMBPMResponseMessage" description="MDMBPMResponseMessage">
      <errType type="java.lang.String" description="String">READERR</errType>
      <errorMessage type="java.lang.String" description="String">No record is found.</errorMessage>
      <mdmThrowable type="java.lang.String" description="String"></mdmThrowable>
      <reasonCode type="java.lang.String" description="String">794</reasonCode>
    </element>
  </errors>
  <localizedMessage type="java.lang.String" description="String">CDKAT0130E Transaction searchPerson did not complete successfully.</localizedMessage>
  <message type="java.lang.String" description="String">CDKAT0130E Transaction searchPerson did not complete successfully.</message>
  <reasonCode type="java.lang.String" description="reasonCode"></reasonCode>

 

Here we see the reason code we are interested in is nested under the <errors> tag within an < element>. 

image

 

So in this case we need the decision logic to be

tw.system.error.xpath("error/errors/element/reasonCode").item(0).getText() == '794'

 

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSWSR9","label":"IBM InfoSphere Master Data Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

UID

ibm11142356