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
  • 1.  Why getLastError must be the first service under catch block?

    Posted Wed March 14, 2018 09:02 AM

    Hi,

    In the try/catch block sequence, we must have getLastError as the first service under catch block. Else it won’t show you th error details that occured.

    But what is the reason behind this? Why doesn’t it show the lastError details if its not the first service under catch block?

    Thanks.


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 2.  RE: Why getLastError must be the first service under catch block?

    Posted Wed March 14, 2018 12:08 PM

    Service getLastError will retrieve error information from InvokeState, and some of flow steps like MAP, INVOKE will overwrite error information after execution, that’s the reason you have to place it as the first service.


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Why getLastError must be the first service under catch block?

    Posted Wed March 14, 2018 03:46 PM

    Yes I second with Wang and that is the default way of handling the catch sequence with getLastError as the first step and map/capture steps follows to it to signal the error failure!

    HTH,
    RMG


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 4.  RE: Why getLastError must be the first service under catch block?

    Posted Tue April 17, 2018 09:22 AM

    Thanks for your reply.

    Small doubt, what exactly does InvokeState mean?


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 5.  RE: Why getLastError must be the first service under catch block?

    Posted Tue April 17, 2018 12:03 PM

    Hi,

    InvokeState contains the status of the execution (invocation) of the previous step.

    See IntegrationServer Java API Reference for details (for the case that this is not flagged “internal use only” like the services in WmRoot).

    Regards,
    Holger


    #Integration-Server-and-ESB
    #webMethods
    #edi