# Timer

The **Timer Event** is used to define the **maximum allowable time** for processing a task or waiting for an event.\
Timer events help control execution timing and enable flows to react when tasks exceed a predefined duration.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2Fv8mBOCqpvCzAFqQz3UQv%2F0?alt=media" alt=""><figcaption></figcaption></figure>

***

### Purpose

**Timer Events** are used to:

* Specify time constraints for tasks or activities
* Detect delays or timeouts during integration or workflow execution
* Trigger alternate actions when a task exceeds its allowed duration

A Timer can be used as:

* **Start Event** – to begin a flow at a scheduled time
* **Intermediate Event** – to pause or wait for a duration
* **Boundary Event** – to monitor and control task execution time

***

### Example Use Case

Consider a flow that calls an **external web service**:

* A Timer is attached to the Web Service Task
* If the external service does not respond within the configured time
* The Timer event is triggered

As a result, the flow can:

* Send an email or notification to an administrator
* Log the timeout event
* Terminate or redirect the execution flow

This makes Timer events especially valuable for **external system integration** and **error‑resilient workflows**.

***

### Timer Configuration

The **Timer Configuration Panel** contains a single tab used to define timing behavior.

***

#### Timer Tab

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FdBovSSXSIY6Y4Gzj8V2h%2F1?alt=media" alt=""><figcaption></figcaption></figure>

| Property          | Mandatory | Default   | Description                                               |
| ----------------- | --------- | --------- | --------------------------------------------------------- |
| **Time Duration** | Yes       | 0         | Maximum time allowed for the task                         |
| **Time Unit**     | Yes       | —         | Unit of time (e.g. seconds, minutes)                      |
| **Terminate**     | No        | Unchecked | If checked, the task is terminated when the timer expires |

***

### Timer as a Boundary Event

When used as a **Boundary Event**, the Timer is attached to an Activity Node and acts as a **listener**.

Behavior:

* The activity starts execution
* The Timer monitors the time elapsed
* If the duration exceeds the configured limit:
  * The Timer triggers an alternate path
  * Optional termination of the original task occurs

This pattern is commonly used for:

* Timeout handling
* SLA enforcement
* Fallback or recovery logic

***

### Best Practices

* Always define realistic timeout values
* Use Timer boundary events for external system calls
* Avoid overly aggressive time limits that cause false timeouts
* Combine Timer with **Error Boundary Events** for robust handling
* Clearly document timeout behavior in long‑running flows

***

### Summary

The **Timer Event** provides time‑based control in ONEWEB integration and process flows.

Using Timer events, developers can:

* Enforce execution time limits
* Detect slow or unresponsive external systems
* Apply fallback or escalation logic
* Improve reliability of integration workflows

Timer is a critical component for building **resilient, time‑aware, and production‑ready integrations** in ONEWEB.


---

# 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.onewebstack.com/designer-reference/microflow-designer/activity-nodes/timer.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.
