Skip to content

Commit f0a02ff

Browse files
update
1 parent 52515b3 commit f0a02ff

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

docs/build/triggers.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ webhook request**, once the Work Order and Run have been created.
4747

4848
**When the response is sent:**
4949

50-
Immediately, during the same HTTP request that triggered the workflow.
50+
Immediately, as soon as the workorder is created and the run is enqueued.
5151

5252
**What this response represents:**
5353

@@ -65,23 +65,25 @@ run. It does **not** include the workflow’s output.
6565
}
6666
```
6767

68-
### **Synchronous response (after completion)**
68+
### **Synchronous mode**
6969

70-
Workflows triggered by webhooks can also be configured to respond
71-
**synchronously**, after the workflow has finished running.
70+
Optionally, workflows can be executed **asynchronously**.
7271

73-
In this mode, OpenFn sends a response **after the run finishes**, returning its
74-
final status (e.g., success, failed, killed) and state.
72+
This means OpenFn sends an HTTP response to the original webhook request **after
73+
the run finishes**, returning its final status (e.g., success, failed, killed)
74+
and state.
7575

7676
**Use this mode when:**
7777

78-
- The calling system needs the result of the workflow
78+
- The calling system needs the result of the workflow and there isn't another
79+
API to receive it
7980
- You need to know whether the run succeeded or failed
80-
- You want access to the workflow’s final output
81+
- You want access to the workflow’s final output to do something _else_ in the
82+
calling system
8183

8284
**When the response is sent:**
8385

84-
After the workflow completes, not during the original webhook request.
86+
After the workflow completes, sometimes seconds (or minutes) later.
8587

8688
**What this response includes:**
8789

@@ -92,9 +94,9 @@ After the workflow completes, not during the original webhook request.
9294

9395
- Status code: `201`
9496
- Body:
95-
```json
9697

97-
{
98+
```json
99+
{
98100
"data": {
99101
"...final": "run state goes here..."
100102
},

0 commit comments

Comments
 (0)