Skip to content

Commit 666150b

Browse files
authored
Remove waitForCompletion for subflows (#432)
Signed-off-by: Tihomir Surdilovic <[email protected]>
1 parent b52e681 commit 666150b

File tree

5 files changed

+9
-27
lines changed

5 files changed

+9
-27
lines changed

comparisons/comparison-cadence.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,7 @@ states:
303303
- name: GreetingSubFlow
304304
type: operation
305305
actions:
306-
- subFlowRef:
307-
workflowId: subflowgreet
308-
waitForCompletion: false
306+
- subFlowRef: "subflowgreet"
309307
end: true
310308
functions:
311309
- name: greetingfunction

examples/README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3406,10 +3406,7 @@ We fist define our top-level workflow for this example:
34063406
"type": "operation",
34073407
"actions": [
34083408
{
3409-
"subFlowRef": {
3410-
"workflowId": "vitalscheck",
3411-
"waitForCompletion": false
3412-
}
3409+
"subFlowRef": "vitalscheck"
34133410
}
34143411
],
34153412
"transition": "WaitForCarStopped"
@@ -3477,9 +3474,7 @@ states:
34773474
- name: DoCarVitalsChecks
34783475
type: operation
34793476
actions:
3480-
- subFlowRef:
3481-
workflowId: vitalscheck
3482-
waitForCompletion: false
3477+
- subFlowRef: vitalscheck
34833478
transition: WaitForCarStopped
34843479
- name: WaitForCarStopped
34853480
type: event

roadmap/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ _Status description:_
3737
| ✔️| Updated workflow timeouts | [spec doc](../specification.md) |
3838
| ✔️| Added Workflow Auth definitions | [spec doc](../specification.md) |
3939
| ✔️| Added State execution timeouts | [spec doc](../specification.md) |
40+
| ✔️| Temporarily removed `waitForCompletion` for subflows | [spec doc](../specification.md) |
4041
| ✏️ | AsyncAPI operation support | |
4142
| ✏️ | OData function definition support | |
4243
| ✏️ | Update to retries - state specific rather than error specific | |

schema/workflow.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -450,11 +450,6 @@
450450
"type": "object",
451451
"description": "Specifies a sub-workflow to be invoked",
452452
"properties": {
453-
"waitForCompletion": {
454-
"type": "boolean",
455-
"default": true,
456-
"description": "Workflow execution must wait for sub-workflow to finish before continuing"
457-
},
458453
"workflowId": {
459454
"type": "string",
460455
"description": "Unique id of the sub-workflow to be invoked"

specification.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2259,7 +2259,7 @@ The `timeouts` property can be used to define state specific timeout settings. S
22592259

22602260
```json
22612261
{
2262-
"name": "WaitForCompletion",
2262+
"name": "DelayState",
22632263
"type": "delay",
22642264
"timeDelay": "PT5S",
22652265
"transition": "GetJobStatus"
@@ -2270,7 +2270,7 @@ The `timeouts` property can be used to define state specific timeout settings. S
22702270
<td valign="top">
22712271

22722272
```yaml
2273-
name: WaitForCompletion
2273+
name: DelayState
22742274
type: delay
22752275
timeDelay: PT5S
22762276
transition: GetJobStatus
@@ -3687,19 +3687,17 @@ to the trigger/produced event.
36873687

36883688
If `string` type, it defines the unique id of the sub-workflow to be invoked.
36893689
This short-hand definition can be used if sub-workflow lookup is done only by its `id`
3690-
property and not its `version` property and if the default value of `waitForCompletion` is assumed.
3690+
property and not its `version` property.
36913691

36923692
```json
36933693
"subFlowRef": "mySubFlowId"
36943694
```
36953695

3696-
If you need to define the `waitForCompletion` or the `version` properties, you can use its
3697-
`object` type:
3696+
If you need to define the `version` properties, you can use its `object` type:
36983697

36993698
| Parameter | Description | Type | Required |
37003699
| --- | --- | --- | --- |
37013700
| workflowId | Sub-workflow unique id | string | yes |
3702-
| waitForCompletion | If workflow execution must wait for sub-workflow to finish before continuing (default is true) | boolean | no |
37033701
| version | Sub-workflow version | string | no |
37043702

37053703
<details><summary><strong>Click to view example definition</strong></summary>
@@ -3740,12 +3738,7 @@ The `version` property defined the unique version of the sub-workflow to be invo
37403738
If this property is defined, runtimes should match both the `id` and the `version` properties
37413739
defined in the sub-workflow definition.
37423740

3743-
The `waitForCompletion` property defines if the SubFlow action should wait until the referenced reusable workflow
3744-
has completed its execution. If it's set to "true" (default value), SubFlow action execution must wait until the referenced workflow has completed its execution.
3745-
In this case the workflow data output of the referenced workflow will be used as the result data of the action.
3746-
If it is set to "false" the parent workflow can continue its execution as soon as the referenced sub-workflow
3747-
has been invoked (fire-and-forget). For this case, the referenced (child) workflow data output will be ignored and the result data
3748-
of the action will be an empty json object (`{}`).
3741+
Subflow execution is currently performed synchronously. We are planning to add async subflow execution in the next spec releases.
37493742

37503743
##### Error Definition
37513744

0 commit comments

Comments
 (0)