Skip to content

Commit c5a217a

Browse files
committed
Initial commit (WIP)
Signed-off-by: Charles d'Avernas <[email protected]>
1 parent 2c991d5 commit c5a217a

File tree

2 files changed

+299
-512
lines changed

2 files changed

+299
-512
lines changed

schema/outcome.json

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"type": "object",
3+
"properties":{
4+
"transition": {
5+
"oneOf": [
6+
{
7+
"type": "string",
8+
"description": "Name of state to transition to",
9+
"minLength": 1
10+
},
11+
{
12+
"type": "object",
13+
"description": "Function Reference",
14+
"properties": {
15+
"nextState": {
16+
"type": "string",
17+
"description": "Name of state to transition to",
18+
"minLength": 1
19+
},
20+
"produceEvents": {
21+
"type": "array",
22+
"description": "Array of events to be produced before the transition happens",
23+
"items": {
24+
"type": "object",
25+
"$ref": "#/definitions/produceeventdef"
26+
},
27+
"additionalItems": false
28+
},
29+
"compensate": {
30+
"type": "boolean",
31+
"default": false,
32+
"description": "If set to true, triggers workflow compensation when before this transition is taken. Default is false"
33+
}
34+
},
35+
"additionalProperties": false,
36+
"required": [
37+
"nextState"
38+
]
39+
}
40+
]
41+
},
42+
"end": {
43+
"oneOf": [
44+
{
45+
"type": "boolean",
46+
"description": "State end definition",
47+
"default": true
48+
},
49+
{
50+
"type": "object",
51+
"description": "State end definition",
52+
"properties": {
53+
"terminate": {
54+
"type": "boolean",
55+
"default": false,
56+
"description": "If true, completes all execution flows in the given workflow instance"
57+
},
58+
"produceEvents": {
59+
"type": "array",
60+
"description": "Defines events that should be produced",
61+
"items": {
62+
"type": "object",
63+
"$ref": "#/definitions/produceeventdef"
64+
},
65+
"additionalItems": false
66+
},
67+
"compensate": {
68+
"type": "boolean",
69+
"default": false,
70+
"description": "If set to true, triggers workflow compensation. Default is false"
71+
},
72+
"continueAs": {
73+
"$ref": "#/definitions/continueasdef"
74+
}
75+
},
76+
"additionalProperties": false,
77+
"required": []
78+
}
79+
]
80+
}
81+
}
82+
}

0 commit comments

Comments
 (0)