The Wait service allows a business process to wait for a period before it moves on to the next step in the process. This service help synchronize polling events without consuming resources.
The following table provides an overview of the Wait service:
|Graphical Process Modeler (GPM) categories||All Services, Process Controls|
|Description||The Wait service allows a business process to wait for a period of time before moving on to the next step in the process. The Wait service does not hold its active thread during this wait time, which can reduce resource consumption.|
|Business usage||The Wait service allows synchronization of polling events without consuming resources. Use this service to specify a certain wait time after a step in a business process. During the wait time, this service does not use an active thread.|
|Usage example||A business process with a B2B transmit requires a block of time after a failure before a retry is attempted.|
|Requires third-party files?||No|
|Platform availability||All supported Sterling B2B Integrator platforms|
|Initiates business processes?||This service does not initiate a business process. It cannot be used without a business process.|
|Invocation||Runs as part of a business process.|
|Business process context considerations||While in its waiting state, this service does not hold an active thread, which frees up system resources.|
|Returned status values||Returned status values:
|Restrictions||For short wait intervals (less than 30 minutes), Sterling B2B Integrator places the business process in a special "0" queue. From the “0” queue, it regains an active thread when it reaches its expiration, within a range of plus or minus 30 seconds (because the “0” queue checks every 30 seconds for wait times that have completed). For longer wait times, the business process is returned to active by the scheduled system process BPExpirator. The frequency the BPExpirator process is scheduled to run (defaults to every 15 minutes) must be inline with intended wait times. The WaitService could potentially wait up to a full BPExpirator cycle, not being restarted until the next scheduled BPExpirator execution. For example, if a 45 minute wait expired just after an execution of the BPExpirator on a 15-minute cycle, that wait will continue until the next BPExpirator executes, making it a 60 minute, rather than 45 minute wait. By coordinating the wait time and the BPExpirator schedule, you can configure a window of time that is appropriate for your needs.|
How the Wait Service Works
The Wait service performs a function similar to the Sleep service: it allows you to pause a business process for a set length of time. However, unlike the Sleep service, the Wait service does not retain an active processing thread, which frees the thread for other processing jobs. Use the Wait service when you need to put a business process in a Wait state for at least one minute. If you need to put a business process in a wait state for less than a minute, use the Sleep service.
Implementing the Wait Service
Because a configuration of the Wait service is installed with Sterling B2B Integrator, no configuration is necessary.
Output from Business Process to Service
The following table describes the output from the business process to the Wait service:
|WAIT_INTERVAL||Duration of wait time in minutes.|
|UNITS||Minutes, Seconds, Timestamp|