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
Expand all | Collapse all

Solving a special asynchronous scenario

  • 1.  Solving a special asynchronous scenario

    Posted 02/24/11 09:11 AM

    Hello All,

    i have a special asynchronous web service scenario.

    The webservice is converting a file to a pdf which can take some time. So I have two different operations in that service:
    putDocument - sends a file to the converter
    retrieveDocument - try to retrieve the converted file using an id

    The second service returns null if the document is not processed yet. So I might need to poll for the result several times.

    My requirements are that I do not wait synchronously for the result because this might block a thread for a long time. We would rather like to wait asynchronously without blocking a thread.

    1. Put Document
    2. Poll every 5s for the document
    3. if document is not converted after 60s return an error

    Any ideas on how to solve this in Integration server?

    Thanks!

    Mathias


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Solving a special asynchronous scenario

    Posted 02/24/11 10:06 AM

    Hi Mathias,

      One solution would be that when you call "putDocument", you also pass the TaskID as parameter.
    
    When the service finishes you call the WmTaskClient service 
    

    pub.task.taskclient:updateTask.

      The problem is now to update the UI with the new value of the task's business data .
    

    br,
    Vlad


    #webMethods
    #Integration-Server-and-ESB