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.  Multiple Transaction handling optimum solution

    Posted 09/05/12 03:25 PM

    Hi All,

    can anyone suggest how do we implement multiple transactions in one service with same connection.

    1. first call procedure
    2. Insert in to Table
    3. call another Procedure

    can some one tell me the best way to use three transactions, for every operation i need one transaction boudary.
    One failure should not affet other operation…

    How would be the solution…like 3 start transactions and 3 commit transactions and only one rollback…?? please suggest the way to achive it

    Thanks
    prabhakar


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


  • 2.  RE: Multiple Transaction handling optimum solution

    Posted 09/05/12 10:37 PM

    The practice I follow is for each action that needs a transaction boundary, I create separate FLOW service. In this case, I’d create 3. Each would have the form:

    SEQUENCE (exit on success)
    …SEQUENCE (exit on failure)
    …startTransaction

    …commitTransaction
    …SEQUENCE (exit on done)
    …getLastError

    …rollback

    Then in your “main” FLOW service, call each of these services. Wrap this in a try/catch if desired.

    This approach keeps the services from being too cluttered with a bunch of sequences.


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


  • 3.  RE: Multiple Transaction handling optimum solution

    Posted 09/12/12 03:38 PM

    Thank you reamon, will try in this way. It seems to be the best optimum way.


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


  • 4.  RE: Multiple Transaction handling optimum solution

    Posted 09/12/12 09:53 PM

    IF one failure should not affect the other operation then they shouldn’t be in the same flow service at all, don’t make the flow service do more than is necessary to accomplish a given task. If they are related then Rob’s suggestion is the preferred way to handle multiple transactions within the same flow service.


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


  • 5.  RE: Multiple Transaction handling optimum solution

    Posted 09/13/12 08:40 AM

    I’m afraid (from just looking at it) this will not work since if ‘do DB call’ fails, the transaction ID will not be available in the rollback sequence. startTransaction should be called before the first (exit on success) sequence, not from within the ‘exit on failure’ one.


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


  • 6.  RE: Multiple Transaction handling optimum solution

    Posted 09/13/12 09:12 PM

    The transaction ID is available in the pipeline document returned by getLastError. That’s what I meant by "extract transaction ID from pipeline–meaning the var, not the pipeline directly.

    You can move the startTransaction outside of the “try” sequence if desired. In that case, it will be available directly in the pipeline in the “catch” sequence.


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