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.

 View Only
Expand all | Collapse all

How to get pipeline values in Catch block

  • 1.  How to get pipeline values in Catch block

    Posted Thu June 15, 2017 03:15 AM

    Hi,

    I’m working with an integration where I need to store messageIDs into internal database for both success and failure cases. If try failed, I need to get messageIDs from pipeline value from try and to log the messageIDs into our database.

    SEQUENCE (main)
    — SEQUENCE (try)
    ------ Webservice call (get messageIDs)
    ------ Transformation
    ------ JMS Posting
    — SEQUENCE (catch)
    ------ getLastError
    ------ Log in database with messageID and errormessage
    ------ Exit Flow and signal Failure

    This can be achieved by using pub.storage.put and pub.storage.get. Apart from this, could anyone please suggest the solution to get pipeline values into catch block?

    Thank you.


    #webMethods
    #Integration-Server-and-ESB
    #webMethods-General


  • 2.  RE: How to get pipeline values in Catch block

    Posted Fri June 16, 2017 04:24 PM

    you can use try catch regressively. For each major action, you should put a Try-Catch around it.
    So your message-ID will be available in the pipeline for the next try catch if error happens.
    look like this:

    SEQUENCE (main)
    — SEQUENCE (try)
    ------ Webservice call (get messageIDs)
    SEQUENCE (2)
    — SEQUENCE (try2)
    ------ Transformation
    ------ JMS Posting
    — SEQUENCE (catch2)
    ------ getLastError
    ------ Log in database with messageID and errormessage
    ------ Exit Flow and signal Failure
    — SEQUENCE (catch)
    ------ getLastError
    ------ Log in database without messageID , with errormessage
    ------ Exit Flow and signal Failure


    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB


  • 3.  RE: How to get pipeline values in Catch block

    Posted Wed June 21, 2017 12:47 PM

    Sasikanth,

    The easiest thing for you here may be to use the pipeline object that is available inside of the lastError document. That pipeline object should contain all variables that were present at the time of the error. Do not use pub.storage for this. In fact, I would argue there’s rarely a good reason to use pub.storage.

    Percio


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods