File tree Expand file tree Collapse file tree 2 files changed +79
-74
lines changed Expand file tree Collapse file tree 2 files changed +79
-74
lines changed Original file line number Diff line number Diff line change @@ -4,44 +4,45 @@ document:
4
4
name : accumulate-room-readings
5
5
version : 1.0.0-alpha1
6
6
do :
7
- sequentially :
8
- - consumeReading :
9
- listen :
10
- to :
11
- all :
12
- - with :
13
- source : https://my.home.com/sensor
14
- type : my.home.sensors.temperature
15
- correlate :
16
- roomId :
17
- from : .roomid
18
- output :
19
- from : .data.reading
20
- - with :
21
- source : https://my.home.com/sensor
22
- type : my.home.sensors.humidity
23
- correlate :
24
- roomId :
25
- from : .roomid
26
- output :
27
- from : .data.reading
28
- as : readings
29
- - logReading :
30
- for :
31
- each : reading
32
- in : .readings
33
- do :
7
+ execute :
8
+ sequentially :
9
+ - consumeReading :
10
+ listen :
11
+ to :
12
+ all :
13
+ - with :
14
+ source : https://my.home.com/sensor
15
+ type : my.home.sensors.temperature
16
+ correlate :
17
+ roomId :
18
+ from : .roomid
19
+ output :
20
+ from : .data.reading
21
+ - with :
22
+ source : https://my.home.com/sensor
23
+ type : my.home.sensors.humidity
24
+ correlate :
25
+ roomId :
26
+ from : .roomid
27
+ output :
28
+ from : .data.reading
29
+ as : readings
30
+ - logReading :
31
+ for :
32
+ each : reading
33
+ in : .readings
34
+ do :
35
+ call : openapi
36
+ with :
37
+ document :
38
+ uri : http://myorg.io/ordersservices.json
39
+ operationId : logreading
40
+ - generateReport :
34
41
call : openapi
35
42
with :
36
43
document :
37
44
uri : http://myorg.io/ordersservices.json
38
- operationId : logreading
39
- - generateReport :
40
- call : openapi
41
- with :
42
- document :
43
- uri : http://myorg.io/ordersservices.json
44
- operationId : produceReport
45
+ operationId : produceReport
45
46
timeout :
46
47
after :
47
48
hours : 1
Original file line number Diff line number Diff line change @@ -4,43 +4,47 @@ document:
4
4
name : sample-workflow
5
5
version : ' 0.1.0'
6
6
do :
7
- sequentially :
8
- - processOrder :
9
- switch :
10
- - case1 :
11
- when : .orderType == "electronic"
12
- then : processElectronicOrder
13
- - case2 :
14
- when : .orderType == "physical"
15
- then : processPhysicalOrder
16
- - default :
17
- then : handleUnknownOrderType
18
- - processElectronicOrder :
19
- sequentially :
20
- - validatePayment :
21
- set :
22
- validate : true
23
- - fulfillOrder :
24
- set :
25
- status : fulfilled
26
- then : exit
27
- - processPhysicalOrder :
28
- sequentially :
29
- - checkInventory :
30
- set :
31
- inventory : clear
32
- - packItems :
33
- set :
34
- items : 1
35
- - scheduleShipping :
36
- set :
37
- address : Elmer St
38
- then : exit
39
- - handleUnknownOrderType :
40
- sequentially :
41
- - logWarning :
42
- set :
43
- log : warn
44
- - notifyAdmin :
45
- set :
46
- message : something's wrong
7
+ execute :
8
+ sequentially :
9
+ - processOrder :
10
+ switch :
11
+ - case1 :
12
+ when : .orderType == "electronic"
13
+ then : processElectronicOrder
14
+ - case2 :
15
+ when : .orderType == "physical"
16
+ then : processPhysicalOrder
17
+ - default :
18
+ then : handleUnknownOrderType
19
+ - processElectronicOrder :
20
+ execute :
21
+ sequentially :
22
+ - validatePayment :
23
+ set :
24
+ validate : true
25
+ - fulfillOrder :
26
+ set :
27
+ status : fulfilled
28
+ then : exit
29
+ - processPhysicalOrder :
30
+ execute :
31
+ sequentially :
32
+ - checkInventory :
33
+ set :
34
+ inventory : clear
35
+ - packItems :
36
+ set :
37
+ items : 1
38
+ - scheduleShipping :
39
+ set :
40
+ address : Elmer St
41
+ then : exit
42
+ - handleUnknownOrderType :
43
+ execute :
44
+ sequentially :
45
+ - logWarning :
46
+ set :
47
+ log : warn
48
+ - notifyAdmin :
49
+ set :
50
+ message : something's wrong
You can’t perform that action at this time.
0 commit comments