Intentional wait/delay in process step

We need to force a set time delay before executing a step (or transitioning to a step). For example, after Step A completes, we want to wait 5 minutes before executing Step B. I can’t find any built-in way to do this in Developer.

The best I can come up with is:

  1. Create Step Z between A and B
  2. Set up a join situation on Step Z that will never be satisfied (maybe with a dummy step that transitions to it)
  3. Create a timeout transition to Step B and set the timeout to 5 minutes

So when Step A transitions to Z, it will wait for a join condition that will never be satisfied, then timeout after 5 minutes and transition to B.

It seems kind of hacky, which is why I have to think there’s a better way. Any ideas?

The easiest way to create a java service call thread.sleep() method in that provide the parameter from run time for time… and invoke this service in your flow when you want to include some some delays in flow.

Hope it helps!
nD

What is driving the use of a delay? Perhaps another approach is workable–can you provide additional detail?

The problem with this solution is that it would tie up a processor thread for the duration of the delay. No big deal for a few seconds, probably not a good idea for the 5 min example, and certainly not feasible for longer periods like an hour.

Step A calls another system asynchronously, and we want to give that system time to complete its processing before we start Step B.

Is there a way to have the other system notify/call when it’s done? That would seem more reliable than waiting for a period of time, which can be risky when the other system is under load and takes longer than usual/expected.

Possibly. I assume the way to accomplish this would be to create Step Z between A and B, and create an “intermediate receive step” (not sure if that’s the correct term) which would then join with Step Z. I’m hesitant to do this will be necessary at several steps, and I’ve found intermediate receive steps and correlations to be rather tricky.

Am I understanding your suggestion correctly? I was hoping for something as simple as “wait X amount of time before doing this step/transitioning to the next step”, since we had that feature in a much older and feature-poorer BPM product. But if this is the recommended way to do things with webMethods BPM, we might have to just accept it and adjust accordingly.

Yes, that was the gist of my suggestion. If the steps in the process involve async interactions, then async receives and correlations are the way to go.

The “wait X period of time and continue” is a risky approach, IMO, regardless of toolset.

pretty much agreed on above posts, just missed your requirement… in your scenrio look for Async processes in BPM approach it work well with correlations.

Hi, there is way of doing this by using the ps.util.system.sleep service in the PS_Utilities2 package available across. This service would put a service thread to a sleep state for the said timeline. You can choose to use this service in any of your flow services to have the desired effect. Hope this helps.

But i would definitely say its not all that a good idea, in putting threads on the JVM to sleep.

nightfox…