webMethods

webMethods

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

Service to wait for period of time

  • 1.  Service to wait for period of time

    Posted Mon September 10, 2012 08:26 AM

    Hi Team,

    We are trying to send a fax through webMethods using the fax server. They are exposing two webservices. One is to send a fax and another is to get the fax result (Pass/Fail) back.

    The problem is after specified period of time only they can able to send the result back (after 10 mins). If you are accesing the web service to get the result before 10 min, it will return some unexpected result.

    for eg they are having some 21 status like, preparing fax, preparing cover sheet, trying to send, retrying, etc… So if you try to get the result back before 10 min, you wont get the proper result as Pass/Fail.

    I dont want to put a step like Sleep or Stall to hold the thread for long time. Because if there are more request at the same time it will end up in a thread pool empty condition.

    Is there any way to create a task or scheduler as out of box feature to achieve this.

    Thanks in advance.
    Vijayakumar B


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


  • 2.  RE: Service to wait for period of time

    Posted Mon September 10, 2012 05:41 PM

    You can use the scheduler services.
    adding a run-once scheduled job (WmPublic/pub.scheduler:addOneTimeTask) to run 10min later, with the parameter you want.
    HTH,


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


  • 3.  RE: Service to wait for period of time

    Posted Mon September 10, 2012 07:36 PM

    Based on this, it isn’t an “unexpected result” but rather a status which you can reasonably check in your code to distinguish in-progress vs. failed.

    You can use the scheduler services to create one-time tasks within your code.

    There are also other approaches but those would require other components that it sounds like you may not have/want to use. E.g. Modeler/BPM, TN.


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


  • 4.  RE: Service to wait for period of time

    Posted Mon September 17, 2012 05:48 AM

    Hi V1254788 ,

    You can use Java service .
    and in code use. Thread.sleep(Timeto wait);

    it will wait for that time priode you menation.


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