Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

Using Messaging Excpetion to throw custom error

$
0
0

We are currently on an old version of PI and now moving to 7.4.

 

While we used the ABAP mappings to control the error handling part in old system, on new system this approach is not usable.

 

however, to avoid the monitoring getting impacted , which was based on the Error category and error ID, i am required to throw an error on the single stack system using Java, which will match with the attributes i.e. Error Category = MAPPING and Error ID = APPLICATION_FAULT.

 

there is a class in the PI API which is called MessagingException (FQ class name is  com.sap.engine.interfaces.messaging.api.exception.MessagingException)

 

this has methods like setErrorCategory and setErrorCode and basis the minimum description of these classes available on the javadocs link, i'd assume it should be possible to throw a MessagingException where the ErrorCategory and ErrorCode are set to MAPPING and APPLICATION_FAULT respectively.

 

however, having tried this in the cleanup section after confirming an erroneous situation, the behaviour is not as expected. Inspite of setting the error code and category programatically, the mapping always gives a BaseRuntimeException and the error category is seen as MAPPING(as expected) but the error code is always shown as EXCEPTION_DURING_EXECUTE (which is not as expected).

 

 

Any pointers?

 

Thanks,

Amol


Viewing all articles
Browse latest Browse all 7030

Trending Articles