Skip to content

Commit 43aa820

Browse files
matteonardellimatnar
authored andcommitted
Add workflow with choice task in examples
1 parent d26035f commit 43aa820

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"Comment": "A simple state machine",
3+
"StartAt": "FirstState",
4+
"States": {
5+
"FirstState": {
6+
"Comment": "The first task",
7+
"Type": "Task",
8+
"Resource": "inc",
9+
"Next": "ChoiceState"
10+
},
11+
"ChoiceState": {
12+
"Type": "Choice",
13+
"Choices": [
14+
{
15+
"Variable": "$.result",
16+
"NumericLessThan": 10,
17+
"Next": "BranchOneSecondState"
18+
},
19+
{
20+
"Variable": "$.result",
21+
"NumericGreaterThanEquals": 10,
22+
"Next": "BranchTwoSecondState"
23+
}
24+
],
25+
"Default": "FinalBranchOne"
26+
},
27+
"BranchOneSecondState": {
28+
"Comment": "The second task of the first branch",
29+
"Type": "Task",
30+
"Resource": "inc",
31+
"Next": "FinalBranchOne"
32+
},
33+
"BranchTwoSecondState": {
34+
"Comment": "The second task of the second branch",
35+
"Type": "Task",
36+
"Resource": "inc",
37+
"Next": "BranchTwoThirdState"
38+
},
39+
"BranchTwoThirdState": {
40+
"Comment": "The third task of the second branch",
41+
"Type": "Task",
42+
"Resource": "inc",
43+
"Next": "FinalBranchTwo"
44+
},
45+
"FinalBranchOne": {
46+
"Comment": "The end task",
47+
"Type": "Task",
48+
"Resource": "inc",
49+
"End": true
50+
},
51+
"FinalBranchTwo": {
52+
"Comment": "The end task",
53+
"Type": "Task",
54+
"Resource": "inc",
55+
"End": true
56+
}
57+
}
58+
}

0 commit comments

Comments
 (0)