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
An approval step will suspend the execution of a flow until it has been approved
21
-
through the resume endpoints or the approval page by and solely by the recipients of
22
-
the secret urls.
12
+
An approval step is a normal script with the **Suspend** option enabled in the step's advanced settings. This will suspend the execution of a flow until it has been approved through the resume endpoints or the approval page by and solely by the recipients of the secret URLs.
23
13
24
14
:::info Suspending a flow in Windmill
25
15
@@ -37,7 +27,7 @@ An event can be:
37
27
- a cancel
38
28
- a pre-set number of approval that is met.
39
29
40
-
The approval steps are received in the form of an HTTP request. For each event, a single URL is generated. It is not unique to each user to whom it is sent.
30
+
The approval step generates a unique URL for each required approval using `wmill.getResumeUrls()` (or `wmill.get_resume_urls()` in [Python](../getting_started/0_scripts_quickstart/2_python_quickstart/index.mdx)). The approval step works like a webhook mechanism - the flow remains suspended until the required number of approval events are received via HTTP requests to these generated URLs. Each approval event is an HTTP request to one of these URLs, which then resumes or cancels the flow execution.
41
31
42
32
<divclassName="grid grid-cols-2 gap-6 mb-4">
43
33
<DocCard
@@ -48,6 +38,16 @@ The approval steps are received in the form of an HTTP request. For each event,
You can think of a scenario where only specific people can resume or cancel a
@@ -67,6 +67,8 @@ Use `wmill.getResumeUrls()` in [TypeScript](../getting_started/0_scripts_quickst
67
67
The number of required approvals can be customized.
68
68
This allows flexibility and security for cases where you either require approvals from all authorized people or only from one.
69
69
70
+
**Important**: The flow will remain suspended and will not proceed to the next step until the exact number of required approval events is received. If fewer approvals than required are received, the flow stays suspended indefinitely (unless a timeout is configured).
Note that approval steps can be applied the same configurations as regular steps ([Retries](./14_retries.md), [Early stop/Break](./2_early_stop.md) or [Suspend](./15_sleep.md)).
0 commit comments