I agree with @Simon_Hanisch1 – it appears to be mixing SEQUENCE behavior with try/catch/finally. What purpose does the parent SEQUENCE provide? Based upon what has been shared, it is unnecessary.
Based upon observations, if you’re familiar with the typical try/catch approach using SEQUENCEs, you may be surprised at the behavior of pipeline handling in the new try/catch blocks.
SEQUENCE (exit on success)
…SEQUENCE (exit on fail; try)
…SEQUENCE (exit on done/fail; catch)
In the catch sequence, the pipeline is in the same state as it was before entering the parent sequence. Any pipeline vars introduced in the try block are not present. If you want them, need to get them via the getLastError and the pipeline var.
For the new:
try:
catch:
finally:
In the catch block, the pipeline is in the state it was when the exception is thrown. Which may or may not be desirable, depending upon what the catch block does.
Because of this change in behavior, we do not use the new try/catch/finally structure, and still use the “traditional” SEQUENCE structure. For us, the new try/catch added no benefit to offset the increased need for pipeline management.
[Edit]: But it is a fair point that @Ido-Eduard.de_Baat makes – even if there is a parent SEQUENCE, seems reasonable to expect the finally block would still be executed. I know the docs have quite a bit of info describing the behaviors. Perhaps it covers this scenario?
#webMethods#Integration-Server-and-ESB#Flow-and-Java-services