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

Parallel execution of async command actions

  • 1.  Parallel execution of async command actions

    Posted Mon March 05, 2012 01:51 PM

    Hi,

    Is it possible to run async commands actions in parallel?
    Suppose we have a portlet with 2 panels, where will be showing data from two different web services.
    Each of these web services takes 60 secs to return the data. On click of a button we’ll raise two async commands each one for one web service.
    What I see in mws console is that it serializes the requests as they they reach it. First In, first out.
    How can I build the portlet so that the web services execute in parallel?

    Thanks
    Bruno


    #webMethods
    #webMethods-BPMS
    #MWS-CAF-Task-Engine


  • 2.  RE: Parallel execution of async command actions

    Posted Tue March 06, 2012 04:35 PM

    No, not really. Since both of your async command actions would be operating on the same managed bean objects, there would be a risk of data update collisions if both were allowed to execute concurrently.

    There are a couple of options:

    1. Do both the webservice calls with a single async command request.

    2. Have the async command handlers spawn worker threads to do the the webservice calls in the background on the server side. When the worker threads complete their activity, you could raise an OpenAjax event to notify the client that the data is ready. The client-side OpenAjax event subscription would respond to the event by refreshing the controls from your portlet to render the webservice results.


    #webMethods
    #webMethods-BPMS
    #MWS-CAF-Task-Engine


  • 3.  RE: Parallel execution of async command actions

    Posted Tue March 13, 2012 07:03 AM

    Hi,

    is there a sample showing how to do option 2?

    thanks
    Bruno


    #webMethods-BPMS
    #webMethods
    #MWS-CAF-Task-Engine