You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/workflows/build/events-and-parameters.mdx
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,21 @@ The above example:
105
105
- Uses a TypeScript [type parameter](https://www.typescriptlang.org/docs/handbook/2/generics.html) to type the return value of `step.waitForEvent` as our `IncomingStripeWebhook`.
106
106
- Continues on with the rest of the Workflow.
107
107
108
+
The default timeout for a `waitForEvent` call is 24 hours, which can be changed by passing `{ timeout: WorkflowTimeoutDuration }` as the second argument to your `waitForEvent` call.
109
+
110
+
<TypeScriptExample>
111
+
112
+
```ts
113
+
let event =awaitstep.waitForEvent(
114
+
"wait for human approval",
115
+
{ type: "approval-flow", timeout: "15 minutes" },
116
+
);
117
+
```
118
+
119
+
</TypeScriptExample>
120
+
121
+
You can specify a timeout between 1 second and up to 365 days.
122
+
108
123
### Send events to running workflows
109
124
110
125
Workflow instances that are waiting on events using the `waitForEvent` API can be sent events using the `instance.sendEvent` API:
0 commit comments