Why the pipeline is empty

I write a flow service(ParentService) which calls a child service(ChildService).In the end of ChildService,it exits flow and throws failure exception. ParentService catchs the exception and process it.But I find in the pipeline almost all the data disappear! It makes big trouble.

You lose the pipeline when exception occurs. To get the pipeline values at the time exception, use a try-catch and invoke pub.flow.getLastError as the first service in catch block. (Remember…invoking getLastError should be the first operation after the exception.). The output of this service gives details of exception as well as a record of all the pipeline variables and its values.

Thank you very much for your suggestion,Jesin.I get a solution to the problem.:slight_smile:

Hi Jesin,

I’m facing a trouble with getLastError too … I’m using the try/catch, but there’s no data available about the exception, and the getLastError is the first operation after the exception. BTW, the exception occurs within a transformer in a map.
Any idea?


Hi Vikram,

Thanks for your reply!
I think I wasn’t clear enough in my explanation: The getLastError INVOKE is the first step in the Catch Block, but it doesn’t get the error anyway.
I was reading some other threads regarding TRANSFORMER X INVOKE and I was wondering if there are no errors in the pipeline because the exception is thrown by a TRANSFORMER that is within a map, and not by a INVOKE step itself.

What you think?