# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.linx.software/reference/plugins/async/content/waitany.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
