Skip to content

Commit 28742a5

Browse files
Revert "refactor: make for.do an array as well"
This reverts commit 119b7b8. Signed-off-by: Matthias Pichler <[email protected]>
1 parent d7220a2 commit 28742a5

File tree

3 files changed

+21
-25
lines changed

3 files changed

+21
-25
lines changed

dsl-reference.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -560,14 +560,13 @@ do:
560560
at: index
561561
while: .vet != null
562562
do:
563-
- checkFleas:
564-
listen:
565-
to:
566-
one:
567-
with:
568-
type: com.fake.petclinic.pets.checkup.completed.v2
569-
output:
570-
to: '.pets + [{ "id": $pet.id }]'
563+
listen:
564+
to:
565+
one:
566+
with:
567+
type: com.fake.petclinic.pets.checkup.completed.v2
568+
output:
569+
to: '.pets + [{ "id": $pet.id }]'
571570
```
572571

573572
#### Listen

examples/accumulate-room-readings.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@ do:
3030
each: reading
3131
in: .readings
3232
do:
33-
- callLogReading:
34-
call: openapi
35-
with:
36-
document:
37-
uri: http://myorg.io/ordersservices.json
38-
operationId: logreading
33+
call: openapi
34+
with:
35+
document:
36+
uri: http://myorg.io/ordersservices.json
37+
operationId: logreading
3938
- generateReport:
4039
call: openapi
4140
with:

schema/workflow.yaml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,14 @@ properties:
7676
description: The workflow's secrets.
7777
description: Defines the workflow's reusable components.
7878
do:
79-
$ref: '#/$defs/do'
79+
type: array
80+
minItems: 1
81+
items:
82+
type: object
83+
minProperties: 1
84+
maxProperties: 1
85+
additionalProperties:
86+
$ref: '#/$defs/task'
8087
description: Defines the tasks the workflow must perform
8188
timeout:
8289
$ref: '#/$defs/timeout'
@@ -101,15 +108,6 @@ properties:
101108
description: Specifies the events that trigger the workflow execution.
102109
description: Schedules the workflow
103110
$defs:
104-
do:
105-
type: array
106-
minItems: 1
107-
items:
108-
type: object
109-
minProperties: 1
110-
maxProperties: 1
111-
additionalProperties:
112-
$ref: '#/$defs/task'
113111
task:
114112
type: object
115113
properties:
@@ -382,7 +380,7 @@ $defs:
382380
type: string
383381
description: A runtime expression that represents the condition, if any, that must be met for the iteration to continue.
384382
do:
385-
$ref: '#/$defs/do'
383+
$ref: '#/$defs/task'
386384
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.
387385
required: [ for, do ]
388386
listenTask:

0 commit comments

Comments
 (0)