# WaitAny

### WaitAny <a href="#waitany" id="waitany"></a>

When **WaitAny** is reached in your application's process flow, it waits a specified period of time (or indefinitely) for the first task from a specified list of *Tasks* to complete.

***

### Properties <a href="#properties" id="properties"></a>

#### Tasks <a href="#tasks" id="tasks"></a>

The tasks to wait for.

The wait will be for the first task from this list to complete.

Click the editor icon to add a list of tasks.

#### Use timeout <a href="#use-timeout" id="use-timeout"></a>

If selected, wait until a specified timeout has elapsed.

If not selected, the wait will be indefinite.

#### Timeout <a href="#timeout" id="timeout"></a>

Timeout in milliseconds.

Only displayed when *Use timeout* is selected.

***

### Definition <a href="#definition" id="definition"></a>

**WaitAny** returns values in the following variables for the first [Task ](#tasks)that completes:

* WaitAny
  * Task
    * Id *(Int32)*
    * IsCompleted *(Boolean)*
    * IsCompletedSuccessfully *(Boolean)*
    * IsFaulted *(Boolean)*
    * Error *(String)*

When *Use timeout* is selected, the *HasTimedOut* boolean variable also becomes available.

{% hint style="info" %}
No errors are returned with *Use timeout*.
{% endhint %}
