Skip to content

Commit c91754a

Browse files
refactor: split schema of fork and do
Signed-off-by: Matthias Pichler <[email protected]>
1 parent 89d1432 commit c91754a

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

schema/workflow.yaml

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ $defs:
128128
unevaluatedProperties: false
129129
oneOf:
130130
- $ref: '#/$defs/callTask'
131-
- $ref: '#/$defs/compositeTask'
131+
- $ref: '#/$defs/doTask'
132+
- $ref: '#/$defs/forkTask'
132133
- $ref: '#/$defs/emitTask'
133134
- $ref: '#/$defs/forTask'
134135
- $ref: '#/$defs/listenTask'
@@ -306,31 +307,32 @@ $defs:
306307
type: object
307308
additionalProperties: true
308309
description: A name/value mapping of the parameters, if any, to call the function with.
309-
compositeTask:
310-
description: Serves as a pivotal orchestrator within workflow systems, enabling the seamless integration and execution of multiple subtasks to accomplish complex operations
311-
oneOf:
312-
- $ref: '#/$defs/taskBase'
310+
forkTask:
311+
description: Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output.
312+
$ref: '#/$defs/taskBase'
313+
type: object
314+
unevaluatedProperties: false
315+
required: [ fork ]
316+
properties:
317+
fork:
313318
type: object
314-
unevaluatedProperties: false
315-
required: [ fork ]
319+
required: [ branches ]
316320
properties:
317-
fork:
318-
type: object
319-
required: [ branches ]
320-
properties:
321-
branches:
322-
$ref: '#/$defs/taskList'
323-
compete:
324-
description: Indicates whether or not the concurrent tasks are racing against each other, with a single possible winner, which sets the composite task's output.
325-
type: boolean
326-
default: false
327-
- $ref: '#/$defs/taskBase'
328-
type: object
329-
unevaluatedProperties: false
330-
required: [ do ]
331-
properties:
332-
do:
333-
$ref: '#/$defs/taskList'
321+
branches:
322+
$ref: '#/$defs/taskList'
323+
compete:
324+
description: Indicates whether or not the concurrent tasks are racing against each other, with a single possible winner, which sets the composite task's output.
325+
type: boolean
326+
default: false
327+
doTask:
328+
description: Allows to execute a list of tasks in sequence
329+
$ref: '#/$defs/taskBase'
330+
type: object
331+
unevaluatedProperties: false
332+
required: [ do ]
333+
properties:
334+
do:
335+
$ref: '#/$defs/taskList'
334336
emitTask:
335337
description: Allows workflows to publish events to event brokers or messaging systems, facilitating communication and coordination between different components and services.
336338
$ref: '#/$defs/taskBase'

0 commit comments

Comments
 (0)