Capturing Error message in process flow

Question: I have a question about capturing the error message when a transformation map fails.

In the process flow log it reports “Error in execution : Element type ""ConfirmDeliveryDate"" must be followed by either attribute specifications, "">"" or ""/>""”

Can this error log message be set in a variable that I can then make use of from the process flow?

 

Answer:

Yes, capturing of error messages is supported in the process designer for any flow.

Transformation error message can be captured using Service Exception script option in PD. Following are the steps to capture the error message and set the error message in context variable:

1. Go to OnException Scripts tab and open the service exception script editor window.

2. Enter the following line of code in the service exception editor window and save the process flow.

String exceptionMessage=exception.getMessage();
context.put("ExceptionMessage",exceptionMessage);

The above lines of code will capture the exception message and set that message in the context variable ExceptionMessage .

Note: In case you want to change the name of the context variable which will hold the exception message , simply change the name from the above lines of code.

err_f1_7702.jpg

Have more questions? Submit a request

0 Comments

Article is closed for comments.