LibraryEASYProcess Reference ManualProcessesServicesGeneralUtilityWorkshopSleep


Sleep is used to pause a program/process. This can come handy when the program/process is waiting for a response from another application or task. It can also be used to diagnose a problem.

It needs an input value indicating the number of milliseconds to wait. After the designated time the service removes the pause on the program/process and continues with the next following steps.

Sleep Use Examples
DurationThis is the value you would like to assign as the amount of duration you want the process to pause. The value should be entered in milliseconds.

DurationThis is the same as the input duration value. It outputs the amount of time the service slept for (in milliseconds)

Sleep Use Examples

Basic Example of Sleep

In this example, we are using a button process to get a random number from the GetRandomNumber service. But we are using sleep service to display the pop-up box after a certain amount of pause.

When we click the button the process first generates a random number then goes in a pause state for the specified amount of time. And then when the pause time is over it will display the random number in the pop-up box.

Here are the inputs for the sleep service and the logs running for it:


Using Sleep to Pause BSFN Service

In this example, “Two Way Matching” Process is called and the output should return details like document number and batch number of the particular invoice.

In this part of process, we are calling three Business Functions (BSFNs) to the desired output.

When the three BSFNs return, the process checks if any of those were timed out. This can happen sometimes when the server is busy/down or it takes more time then expected to return the results.

We are using sleep in this scenario to make sure we are waiting/pausing before we resend the request to BSFN. Resending it immediately would cause more trouble if the server is already busy/down.

Be aware that in this use example and when looping back on the process it is possible to create an infinite loop. For instance, if the BSFN continuously timed out, the process would keep trying until it received a different error.

Powered by EASYProcess (© 2022 K-Rise Systems, Inc).