WM Service needs to wait 5 minutes

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?

Hi Jack,

what about pub.misc:sleep?

See IS Build-In-Services Guide fro details.

Regards,
Holger

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.

Hi,

Mahesh is right (at least for wM 9.5).

Might have changed recently with the newer releases.

Regards,
Holger

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

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

Thanks,

Why? Do you have a valid reason?

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

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:

Jack,

How are you sending the file to your client?

Percio