Need Help in error handling in DSP

I’ve created on DSP and invoking one service in that DSP also I am handling error thrown by the invoked service. Now if parent service is throwing the error it is being handled by DSP but if any child service is throwing the error it is not being handled by DSP. But if i am running invoked service directly from developer and child is throwing the error it is coming to the parent service.

Note : Parent service is Flow service and child service is java service and in Java service i am explicitly throwing the error on some condition.

Please provide ur valuable suggestions/solution for this issue.


I’ve tried with the following on my 6.5 IS:

and my “WmUsers.dspError:test” Flow service executes a java service which only throws a ServiceException and the error is catched (“error :(” is displayed)

Have you displayed your condition to check if it’s good in order to have any clue?

I am also trying the same but no idea at all why it is not catching in the DSP when child service is throwing the error.

Do you have the child service in a try catch? If so that may be ‘holding’ the error and not throwing it properly. Typically, I’d put the parent service in a try catch using sequences and call the child service in the ‘try’ section of the service…

basically this:

sequence (main) ‘exit on SUCCESS’
sub-sequence (try) ‘exit on FAILURE’
sub-sequence (catch) ‘exit on DONE’

Above has try and catch directly under the ‘main’.

Hope that helps for you. Also, take a look at the .dsp that are used by the admin pages as they are good resources to refer to.

Not sure how to do it from Java service but this works, give it a try.

Call your Java service in flow service within a Try-Catch block and in the catch block of this service put an “Exit” step with “%lastError/error%” in the ‘Failure message’.
Call this flow service as your child service in the parent service.

This will make sure two things, one is to make the process flow to the catch block of the parent service and two make sure the error message is carried from the inner service to the calling service.

how to check errors in DSP


If any service invoked inside DSP throws error, DSP will go to %onError% tag and code inside tag will be executed