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.


#TechXchangePresenter
 View Only
Expand all | Collapse all

How to invoke flow service asynchronously from another flow service

  • 1.  How to invoke flow service asynchronously from another flow service

    Posted Thu December 30, 2004 06:01 AM

    Hi

    Could anybody please tell me how to invoke flow service asynchronously from another flow service, where both flow services will run from same IS server.

    thanks
    Srini


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


  • 2.  RE: How to invoke flow service asynchronously from another flow service

    Posted Thu December 30, 2004 03:47 PM

    Hello,
    If you do an async run of a service, then you would not be expected a return value from that service, because you will not no the return time and the rest of the code running would not be should of certain states of the system. Given this, you can use the publish/subscribe approach to invoking a service. There are even two forms, publish (no return) and publishAndWait (optional return), so if you don’t care of the return value you can just publish the information in a simple document type you define and have a trigger call the service you want to run async.
    Good day.

    Yemi Bedu


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


  • 3.  RE: How to invoke flow service asynchronously from another flow service

    Posted Thu December 30, 2004 07:10 PM

    Yemi Bedu,

    Thanks for your help, We found different approach, which invoking Java Service which internally call Service.doThreadInvoke method. If possible please tell me which approach is better in performance.

    Thanks
    Srini


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


  • 4.  RE: How to invoke flow service asynchronously from another flow service

    Posted Thu December 30, 2004 07:26 PM

    Hello,
    I could not really tell for two reasons:

    1. I do not use doThreadInvoke
    2. I do not know the way in which you have programmed your solution and the data structures being worked on.

    I like the Trigger setup only because I like developing as visual as possible. Also, I think the doThreadInvoke may be more flexible for things like kill the thread early. I do know that there are enough features with Triggers so that I don’t have to type that in and can just work on the main business problem.
    Good day.

    Yemi Bedu


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


  • 5.  RE: How to invoke flow service asynchronously from another flow service

    Posted Thu December 30, 2004 10:29 PM

    Srini,

    You can use the Service.doThreadInvoke method to execute multiple tasks in parallel. If the integration problem you are trying to solve lends itself to being split into multiple discrete parts which can be assembled together at a later point using pub.sync:wait and pub.sync:notify, then you can decrease the overall time to complete your integration task significantly.

    However, if the sequence of events in your integration task must be performed sequentially, using doThreadInvoke won’t affect performance significantly one way or another.

    See this post for more discussion on this topic.

    Mark


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