[Index]

wait


This Job will either wait a given number of milliseconds or will wait for a property or job to become available.

If the for property is provided, then the delay is used as the number of milliseconds between checking if the property is available.


Property Summary

for The property to wait for.
name A name, can be any text.
pause The wait delay in milliseconds.
state A state condition to wait for.
stop This flag is set by the stop method and should be examined by any Stoppable jobs in their processing loops.

Example Summary

Example 1 The throttle has a simple example.
Example 2 This example waits for a variable 'text' to be set.

Property Detail

for

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

The property to wait for.

name

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

A name, can be any text.

pause

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo if for property is set, otherwise yes.

The wait delay in milliseconds.

state

Configured ByATTRIBUTE
AccessREAD_WRITE
RequiredNo.

A state condition to wait for. When this is set this job will wait for the job referenced with the for property match the given state condition. See the Oddjob User guide for a full list of state conditions.

stop

AccessREAD_ONLY
RequiredRead Only.

This flag is set by the stop method and should be examined by any Stoppable jobs in their processing loops.


Examples

Example 1

The throttle has a simple example.

Example 2

This example waits for a variable 'text' to be set. The value could be set across the network or by a another job running in parallel.

<sequential name="Waiting For a Property">
    <jobs>
        <variables id="waitvars"/>
        <wait name="Wait for Variable" for="${waitvars.text}" pause="2000"/>
        <echo name="Echo Text">${waitvars.text}</echo>
    </jobs>
</sequential>


(c) R Gordon Ltd 2005 - Present