cancel
Showing results for 
Search instead for 
Did you mean: 

How to find out which validation is failed.

Former Member
0 Kudos

Hi Experts,

Here is another problem I am facing. I am getting an exception during record update.

com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ServerException: One or more records failed a validation

I am not able to print additional info about the exception. How to find out exacty which validaton or assignment failed. Please let me know.

Thanks

-Sai

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sai,

Is your problem solved? If yes, then please mark the thread as answered. If no, then use the following code:

{

int failedValidations = validateRecCmd.getValidationResult().getTotalValidationsFailed();

if (failedValidations > 0) {

for (int cnt = 0; cnt < failedValidations; cnt++) {

messages.addvalidateRecCmd.getValidationResult).getFailedValidations(recrd.getId())[cnt]

.getMessage());

}

}

}

where messages is arrayList which will contain all the error messages where the validations failed.

Hope it helps.

Regards.

Rajat

Former Member
0 Kudos

Hi Sai,

If you have created a Validation in MDM and are trying to create or update the record through EP and the validation fails then the Error or warning message that you have given in the MDM Data manager must pop up in EP.

This error or warning message must talk about the validation that it is checking.

All the validations that fail will show up their validation message on EP based on what you have typed in MDM data manager.

This will let yoiu know exactly which validations has failes.As for assignments i am unsure about using MDM assignments through EP.

Hope it helped

Thanks & Regards

Simona Pinto

Former Member
0 Kudos

Hi Simona Pinto

I have to give some more background, regarding the listener I am running. I am running the listener in plain java code and getting this validation error. So is there any way to figure this out in the exception.

Thanks

-Sai