Skip to content

Commit c3788e2

Browse files
committed
Illustrate do proposal.
1 parent e4cd93f commit c3788e2

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

schema/workflow.yaml

+11-7
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,7 @@ properties:
7272
description: The workflow's secrets.
7373
description: Defines the workflow's reusable components.
7474
do:
75-
type: object
76-
minProperties: 1
77-
additionalProperties:
78-
$ref: '#/$defs/task'
79-
description: Defines the tasks the workflow must perform
75+
$ref: '#/$defs/do'
8076
timeout:
8177
$ref: '#/$defs/timeout'
8278
description: The workflow's timeout configuration, if any.
@@ -100,6 +96,14 @@ properties:
10096
description: Specifies the events that trigger the workflow execution.
10197
description: Schedules the workflow
10298
$defs:
99+
do:
100+
description: A single unnamed task or a set of named tasks
101+
anyOf:
102+
- $ref: '#/defs/task'
103+
- type: object
104+
minProperties: 1
105+
additionalProperties:
106+
$ref: '#/$defs/task'
103107
task:
104108
type: object
105109
properties:
@@ -352,7 +356,7 @@ $defs:
352356
type: string
353357
description: A runtime expression that represents the condition, if any, that must be met for the iteration to continue.
354358
do:
355-
$ref: '#/$defs/task'
359+
$ref: '#/$defs/do'
356360
description: Allows workflows to iterate over a collection of items, executing a defined set of subtasks for each item in the collection. This task type is instrumental in handling scenarios such as batch processing, data transformation, and repetitive operations across datasets.
357361
required: [ for, do ]
358362
listenTask:
@@ -524,7 +528,7 @@ $defs:
524528
$ref: '#/$defs/retryPolicy'
525529
description: The retry policy to use, if any, when catching errors.
526530
do:
527-
$ref: '#/$defs/task'
531+
$ref: '#/$defs/do'
528532
description: The definition of the task to run when catching an error.
529533
required: [ try, catch ]
530534
description: Serves as a mechanism within workflows to handle errors gracefully, potentially retrying failed tasks before proceeding with alternate ones.

0 commit comments

Comments
 (0)