pub.flow:getLastFailureCaught - Release 10.3

Hi PD Team,

I checked the documentation for 10.3 release -Page last updated: October 16, 2018- and found the service pub.flow:getLastFailureCaught in the IntegrationServer_readme_10-3.pdf when I check 10-3_Integration_Server_Built_In_Services_Reference.pdf I do not see any details provided for this service. Can you check this from your end?

I did see some differences between getLastError and getLastFailureCaught services. Any scenario to use “getLastFailureCaught” will be very helpful.



Hi Mahesh,

We’re working on a doc update that did quite make it into the initial 10.3 release.

getLastFailureCaught is meant to be used primarily inside a catch block. It returns information about the last failure that was caught. It remains set until another failure is caught somewhere else in the Flow. It provides capability similar to the variable specified in the catch clause in Java.

getLastFailureCaught only returns information about failures that have been caught. getLastError returns information about the last invoked service that failed but doesn’t return information when an exit with failure from $parent is executed. getLastFailureCaught returns information about any failure that is caught and it includes a reference to the failure (getLastError does not).

getLastFailureCaught was introduced so that the existing behavior of getLastError could be preserved so that existing usages would not break.


Thanks Bernie for the details. Please let me know once the document is released.

Cool feature – I’ll have to break a looonnnnggg standing practice of never using Exit with Failure except as the last step of a catch block (so that audit logging would record the failed status). As noted, using that in a try block results in the getLastError in the catch block not providing any info. Thus, we long ago started using a custom Java service to throwException.

This new service will match what I think everyone new to FLOW expects at first from getLastError and learns the hard way that it doesn’t. :slight_smile: