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

WM Service needs to wait 5 minutes

  • 1.  WM Service needs to wait 5 minutes

    Posted Wed October 26, 2016 12:40 PM

    We have a partner who uses a static file name when receiving files from us. It takes 3 - 4 minutes for them to process before we can send another file. I need to add a process that will wait for 5 minutes before continuing to complete this process. I looked in wm.pub and did not find anything. Anyone encountered this before?


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


  • 2.  RE: WM Service needs to wait 5 minutes

    Posted Wed October 26, 2016 02:38 PM

    Hi Jack,

    what about pub.misc:sleep?

    See IS Build-In-Services Guide fro details.

    Regards,
    Holger


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


  • 3.  RE: WM Service needs to wait 5 minutes

    Posted Wed October 26, 2016 02:45 PM

    Code snippet:

    try
    {
    Thread.sleep(millis);
    }
    catch (InterruptedException e)
    {
    }

    Not sure pub.misc:sleep if this service is available in WmPublic yet. If not refer the PSUtilities that can be found here on TechCommunity.


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


  • 4.  RE: WM Service needs to wait 5 minutes

    Posted Wed October 26, 2016 02:59 PM

    Hi,

    Mahesh is right (at least for wM 9.5).

    Might have changed recently with the newer releases.

    Regards,
    Holger


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


  • 5.  RE: WM Service needs to wait 5 minutes

    Posted Wed October 26, 2016 03:21 PM

    Additionally, you can achieve the same by using a REPEAT flow step by setting the appropriate properties of REPEAT. Have a look at them.


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


  • 6.  RE: WM Service needs to wait 5 minutes

    Posted Sat October 29, 2016 08:54 AM

    I would suggest to make use of Thread.sleep() rather using Repeat property.

    Thanks,


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


  • 7.  RE: WM Service needs to wait 5 minutes

    Posted Sat October 29, 2016 09:01 AM

    Why? Do you have a valid reason?


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


  • 8.  RE: WM Service needs to wait 5 minutes

    Posted Mon October 31, 2016 01:58 PM

    Hi,

    I agree with MR in this case.

    This improves readability of the code and is less performance intensive then interpreting the Repeat-Step. several times

    Difference might be minimal but anyway.

    Currently we are using PSUtilities service for this.

    Regards,
    Holger


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


  • 9.  RE: WM Service needs to wait 5 minutes

    Posted Mon October 31, 2016 02:57 PM

    Thanks for pitching in and providing reasons. I raised this query to MR to understand his concerns/comments using Repeat step and custom java service based upon his suggestion as it does not provide any specific reasons behind it.

    I second you as the difference might be very minimal, I have used both (Repeat step and custom java service) and I really do not see any issues with it. However I personally recommend to use something which is provided OOTB rather writing a custom java service which is very easy to maintain w.r.t to flow language.

    Again its up to the developer to choose the option either 1 or 2. :arrow:


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


  • 10.  RE: WM Service needs to wait 5 minutes

    Posted Mon October 31, 2016 04:09 PM

    Jack,

    How are you sending the file to your client?

    Percio


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