IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  How to use the "EXIT" flow?

    Posted 01/27/20 03:17 PM

    Hello Everyone.

    I have a little doubt that even after a deep research I still not able to use the “EXIT” flow step.

    I have the following situation flow situation:

    Try:
    Another flow service that returns IFRESULT = “E” or IFRESULT = “Z” with an “IFMESSAGE” variable
    Branch on “/IFRESULT”:
    E:
    EXIT from $parent and signal FAILURE
    Z:
    <== Do something else ==>
    Catch:
    pub.flow.getLastErrorFromPipeline
    <== Exception Handling steps here ==>

    These are the values in “Properties” tab:

    Signal: FAILURE
    Failure name:
    Failure instance:
    Exit from: $parent
    Failure message: %IFMESSAGE%

    But when it reaches “EXIT” it goes to “Catch” and then “pub.flow.getLastErrorFromPipeline” but no message is recovered.

    What should I do be able to recover the “%IFMESSAGE%” when throwing the Exception from the “EXIT” flow step?

    Thank you


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 2.  RE: How to use the "EXIT" flow?

    Posted 01/27/20 05:10 PM

    IIRC if you do an EXIT (with a message) from a sequence and then jump into another sequence within the same flow and do “getLastError” there, you won’t get the error mesage as part of the error object. This is a known behaviour (admittedly not very intuitive).

    You have to write the service in such a way (pay attention to sequence “scopes”!) that the message text is still available in the catch block.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 3.  RE: How to use the "EXIT" flow?

    Posted 01/28/20 07:36 AM

    I managed to develop what I wanted by creating a second service and invoking it. Inside of this new created service, I put the following steps:

    Another flow service that returns IFRESULT = “E” or IFRESULT = “Z” with an “IFMESSAGE” variable
    Branch on "/IFRESULT
    E:
    ==> EXIT from $flow and signal FAILURE
    Z:
    <== Do something else ==>

    After doing this I’m now able to get the “IFMESSAGE” value via the “getLastError” in the first service.

    Thanks to your answer fml2


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services