Skip to content

Commit 81716c4

Browse files
author
Tihomir Surdilovic
authored
Move start definition to top-level workflow properties (#266)
Signed-off-by: Tihomir Surdilovic <[email protected]>
1 parent 5e66657 commit 81716c4

File tree

11 files changed

+190
-423
lines changed

11 files changed

+190
-423
lines changed

comparisons/comparison-argo.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ spec:
7777
id: hello-world-parameters
7878
name: Hello World with parameters
7979
version: '1.0'
80+
start: whalesay
8081
functions:
8182
- name: whalesayimage
8283
metadata:
@@ -85,7 +86,6 @@ functions:
8586
states:
8687
- name: whalesay
8788
type: operation
88-
start: true
8989
actions:
9090
- functionRef:
9191
refName: whalesayimage
@@ -155,6 +155,7 @@ spec:
155155
id: hello-hello-hello
156156
name: Multi Step Hello
157157
version: '1.0'
158+
start: hello1
158159
functions:
159160
- name: whalesayimage
160161
metadata:
@@ -163,7 +164,6 @@ functions:
163164
states:
164165
- name: hello1
165166
type: operation
166-
start: true
167167
actions:
168168
- functionRef:
169169
refName: whalesayimage
@@ -256,6 +256,7 @@ spec:
256256
id: dag-diamond-
257257
name: DAG Diamond Example
258258
version: '1.0'
259+
start: A
259260
functions:
260261
- name: echo
261262
metadata:
@@ -264,7 +265,6 @@ functions:
264265
states:
265266
- name: A
266267
type: operation
267-
start: true
268268
actions:
269269
- functionRef:
270270
refName: echo
@@ -290,7 +290,6 @@ states:
290290
transition: D
291291
- name: D
292292
type: operation
293-
start: true
294293
actions:
295294
- functionRef:
296295
refName: echo
@@ -375,6 +374,7 @@ spec:
375374
id: scripts-bash-
376375
name: Scripts and Results Example
377376
version: '1.0'
377+
start: generate
378378
functions:
379379
- name: gen-random-int-bash
380380
metadata:
@@ -401,7 +401,6 @@ functions:
401401
states:
402402
- name: generate
403403
type: operation
404-
start: true
405404
actions:
406405
- functionRef: gen-random-int-bash
407406
actionDataFilter:
@@ -470,6 +469,7 @@ spec:
470469
id: loops-
471470
name: Loop over data example
472471
version: '1.0'
472+
start: injectdata
473473
functions:
474474
- name: whalesay
475475
metadata:
@@ -478,7 +478,6 @@ functions:
478478
states:
479479
- name: injectdata
480480
type: inject
481-
start: true
482481
data:
483482
greetings:
484483
- hello world
@@ -564,6 +563,7 @@ spec:
564563
id: coinflip-
565564
name: Conditionals Example
566565
version: '1.0'
566+
start: flip-coin
567567
functions:
568568
- name: flip-coin-function
569569
metadata:
@@ -578,7 +578,6 @@ functions:
578578
states:
579579
- name: flip-coin
580580
type: operation
581-
start: true
582581
actions:
583582
- functionRef: flip-coin-function
584583
actionDataFilter:
@@ -656,6 +655,7 @@ spec:
656655
id: retry-backoff-
657656
name: Retry Example
658657
version: '1.0'
658+
start: retry-backoff
659659
functions:
660660
- name: fail-function
661661
metadata:
@@ -670,7 +670,6 @@ retries:
670670
states:
671671
- name: retry-backoff
672672
type: operation
673-
start: true
674673
actions:
675674
- functionRef:
676675
refName: flip-coin-function
@@ -745,6 +744,7 @@ spec:
745744
id: coinflip-recursive-
746745
name: Recursion Example
747746
version: '1.0'
747+
start: flip-coin-state
748748
functions:
749749
- name: heads-function
750750
metadata:
@@ -758,7 +758,6 @@ functions:
758758
states:
759759
- name: flip-coin-state
760760
type: operation
761-
start: true
762761
actions:
763762
- functionRef: flip-coin-function
764763
actionDataFilter:
@@ -854,6 +853,7 @@ spec:
854853
id: exit-handlers-
855854
name: Exit/Error Handling Example
856855
version: '1.0'
856+
start: intentional-fail-state
857857
functions:
858858
- name: intentional-fail-function
859859
metadata:
@@ -870,7 +870,6 @@ functions:
870870
states:
871871
- name: intentional-fail-state
872872
type: operation
873-
start: true
874873
actions:
875874
- functionRef:
876875
refName: intentional-fail-function

comparisons/comparison-bpmn.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ For this reason, the event, function, retry, and data mapping defined in the ass
5252
id: processfile
5353
name: Process File Workflow
5454
version: '1.0'
55+
start: Process File
5556
states:
5657
- name: Process File
5758
type: operation
58-
start: true
5959
actions:
6060
- functionRef: processFile
6161
end: true
@@ -87,10 +87,10 @@ functions:
8787
id: processapplication
8888
name: Process Application
8989
version: '1.0'
90+
start: ProcessNewApplication
9091
states:
9192
- name: ProcessNewApplication
9293
type: event
93-
start: true
9494
onEvents:
9595
- eventRefs:
9696
- ApplicationReceivedEvent
@@ -140,9 +140,9 @@ events:
140140
id: simplecompensation
141141
name: Simple Compensation
142142
version: '1.0'
143+
start: Step 1
143144
states:
144145
- name: Step 1
145-
start: true
146146
type: operation
147147
actions:
148148
- functionRef: step1function
@@ -200,9 +200,9 @@ functions:
200200
id: errorwithretries
201201
name: Error Handling With Retries Workflow
202202
version: '1.0'
203+
start: Make Coffee
203204
states:
204205
- name: Make Coffee
205-
start: true
206206
type: operation
207207
actions:
208208
- functionRef: makeCoffee
@@ -257,13 +257,13 @@ functions:
257257
id: executiontimeout
258258
name: Execution Timeout Workflow
259259
version: '1.0'
260+
start: Purchase Parts
260261
execTimeout:
261262
interval: PT7D
262263
interrupt: true
263264
runBefore: Handle timeout
264265
states:
265266
- name: Purchase Parts
266-
start: true
267267
type: operation
268268
actions:
269269
- functionRef: purchasePartsFunction
@@ -309,10 +309,10 @@ functions:
309309
id: subflowloop
310310
name: SubFlow Repeat workflow
311311
version: '1.0'
312+
start: SubflowRepeat
312313
states:
313314
- name: SubflowRepeat
314315
type: subflow
315-
start: true
316316
workflowId: dosomethingandwaitformessage
317317
repeat:
318318
max: 10
@@ -345,10 +345,10 @@ a starting "operation" state transitioning to an "event" state that waits for th
345345
id: approvereport
346346
name: Approve Report Workflow
347347
version: '1.0'
348+
start: Approve Report
348349
states:
349350
- name: Approve Report
350351
type: callback
351-
start: true
352352
action:
353353
functionRef: managerDecideOnReport
354354
eventRef: ReportDecisionMadeEvent
@@ -407,10 +407,10 @@ functions:
407407
id: eventdecision
408408
name: Event Decision workflow
409409
version: '1.0'
410+
start: A
410411
states:
411412
- name: A
412413
type: subflow
413-
start: true
414414
workflowId: asubflowid
415415
transition: Event Decision
416416
- name: Event Decision

comparisons/comparison-brigade.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ function exec(e, p) {
6565
id: greeting
6666
name: Greeting Workflow
6767
version: '1.0'
68+
start: GreetingState
6869
events:
6970
- name: execEvent
7071
type: exec
@@ -78,7 +79,6 @@ functions:
7879
states:
7980
- name: GreetingState
8081
type: event
81-
start: true
8282
onEvents:
8383
- eventRefs:
8484
- execEvent
@@ -144,6 +144,7 @@ async function exec(e, p) {
144144
id: greetingwitherrorcheck
145145
name: Greeting Workflow With Error Check
146146
version: '1.0'
147+
start: GreetingState
147148
events:
148149
- name: execEvent
149150
type: exec
@@ -157,7 +158,6 @@ functions:
157158
states:
158159
- name: GreetingState
159160
type: event
160-
start: true
161161
onEvents:
162162
- eventRefs:
163163
- execEvent
@@ -227,6 +227,7 @@ events.on("push", () => {
227227
id: multieventworkflow
228228
name: Multiple Events Workflow
229229
version: '1.0'
230+
start: GreetingState
230231
events:
231232
- name: execEvent
232233
type: exec
@@ -238,7 +239,6 @@ functions:
238239
states:
239240
- name: GreetingState
240241
type: event
241-
start: true
242242
onEvents:
243243
- eventRefs:
244244
- execEvent
@@ -311,6 +311,7 @@ events.on("exec", () => {
311311
id: groupActionsWorkflow
312312
name: Group Actions Workflow
313313
version: '1.0'
314+
start: FirstGreetGroup
314315
events:
315316
- name: execEvent
316317
type: exec
@@ -322,7 +323,6 @@ functions:
322323
states:
323324
- name: FirstGreetGroup
324325
type: event
325-
start: true
326326
onEvents:
327327
- eventRefs:
328328
- execEvent
@@ -389,6 +389,7 @@ events.on("exec", (e, p) => {
389389
id: eventDataWorkflow
390390
name: Event Data Workflow
391391
version: '1.0'
392+
start: LogEventData
392393
events:
393394
- name: execEvent
394395
type: exec
@@ -398,7 +399,6 @@ functions:
398399
states:
399400
- name: LogEventData
400401
type: event
401-
start: true
402402
onEvents:
403403
- eventRefs:
404404
- execEvent
@@ -464,6 +464,7 @@ events.on("exec", (e, p) => {
464464
id: actionResultsWorkflow
465465
name: Action Results Workflow
466466
version: '1.0'
467+
start: ExecActionsAndStoreResults
467468
events:
468469
- name: execEvent
469470
type: exec
@@ -479,7 +480,6 @@ functions:
479480
states:
480481
- name: ExecActionsAndStoreResults
481482
type: event
482-
start: true
483483
onEvents:
484484
- eventRefs:
485485
- execEvent
@@ -554,6 +554,7 @@ events.on("next", (e) => {
554554
id: eventDataWorkflow
555555
name: Event Data Workflow
556556
version: '1.0'
557+
start: ExecEventState
557558
events:
558559
- name: execEvent
559560
type: exec
@@ -566,7 +567,6 @@ functions:
566567
states:
567568
- name: ExecEventState
568569
type: event
569-
start: true
570570
onEvents:
571571
- eventRefs:
572572
- execEvent

comparisons/comparison-cadence.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ public class TripBookingWorkflowImpl implements TripBookingWorkflow {
8383
id: tripbookingwithcompensation
8484
name: Trip Booking With Compensation
8585
version: '1.0'
86+
start: BookTrip
8687
states:
8788
- name: BookTrip
8889
type: operation
89-
start: true
9090
compensatedBy: CancelTrip
9191
actions:
9292
- functionRef: reservecarfunction
@@ -191,10 +191,10 @@ public class FileProcessingWorkflowImpl implements FileProcessingWorkflow {
191191
id: fileprocessingwithretries
192192
name: File Processing Workflow With Retries
193193
version: '1.0'
194+
start: ProcessAndUpload
194195
states:
195196
- name: ProcessAndUpload
196197
type: operation
197-
start: true
198198
actions:
199199
- functionRef:
200200
refName: processfilefunction
@@ -295,11 +295,11 @@ public static class GreetingWorkflowImpl implements GreetingWorkflow {
295295
id: subflowgreeting
296296
name: SubFlow Greeting Workflow
297297
version: '1.0'
298+
start: GreetingSubFlow
298299
states:
299300
- name: GreetingSubFlow
300301
type: subflow
301302
workflowId: subflowgreet
302-
start: true
303303
waitForCompletion: false
304304
end: true
305305
functions:

0 commit comments

Comments
 (0)