RulesEngine/schema/workflow-schema.json

144 lines
2.7 KiB
JSON
Raw Normal View History

2019-08-13 06:06:57 -04:00
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"Rule": {
2020-05-20 04:25:29 -04:00
"title": "Rule",
2019-08-13 06:06:57 -04:00
"properties": {
"RuleName": {
"type": "string"
},
"Operator": {
2020-05-20 04:25:29 -04:00
"enum": [
"And",
"AndAlso",
"Or",
"OrElse"
]
2019-08-13 06:06:57 -04:00
},
"ErrorMessage": {
"type": "string"
},
"ErrorType": {
2020-05-20 04:25:29 -04:00
"enum": [
"Warning",
"Error"
]
2019-08-13 06:06:57 -04:00
},
"SuccessEvent": {
"type": "string"
},
"Rules": {
"type": "array",
"items": {
"anyOf": [
2020-05-20 04:25:29 -04:00
{
"$ref": "#/definitions/LeafRule"
},
{
"$ref": "#/definitions/Rule"
}
2019-08-13 06:06:57 -04:00
]
}
},
"Properties": {
"type": "object"
},
"Actions": {
"$ref": "#/definitions/RuleActions"
2019-08-13 06:06:57 -04:00
}
},
"required": [
"RuleName",
"Operator",
"Rules"
],
"type": "object"
},
"LeafRule": {
2020-05-20 04:25:29 -04:00
"title": "Leaf Rule",
2019-08-13 06:06:57 -04:00
"type": "object",
"required": [
"RuleName",
"Expression"
2019-08-13 06:06:57 -04:00
],
"properties": {
"RuleName": {
"type": "string"
},
"Expression": {
"type": "string"
},
"RuleExpressionType": {
2020-05-20 04:25:29 -04:00
"enum": [
"LambdaExpression"
]
2019-08-13 06:06:57 -04:00
},
"ErrorMessage": {
"type": "string"
},
"ErrorType": {
2020-05-20 04:25:29 -04:00
"enum": [
"Warning",
"Error"
]
2019-08-13 06:06:57 -04:00
},
"SuccessEvent": {
"type": "string"
},
"Properties": {
"type": "object"
},
"Actions": {
"$ref": "#/definitions/RuleActions"
}
}
},
"ActionInfo": {
2021-10-11 02:58:14 -04:00
"properties": {
"Name": {
"type": "string"
},
"Context": {
"type": "object"
}
},
"required": [
"Name"
]
},
"RuleActions": {
"properties": {
"OnSuccess": {
"$ref": "#/definitions/ActionInfo"
},
"OnFailure": {
"$ref": "#/definitions/ActionInfo"
2019-08-13 06:06:57 -04:00
}
}
}
},
"properties": {
"WorkFlowName": {
"type": "string"
},
"Rules": {
"type": "array",
"items": {
"anyOf": [
2020-05-20 04:25:29 -04:00
{
"$ref": "#/definitions/LeafRule"
},
{
"$ref": "#/definitions/Rule"
}
2019-08-13 06:06:57 -04:00
]
}
}
},
"required": [
2020-05-20 04:25:29 -04:00
"WorkFlowName",
2019-08-13 06:06:57 -04:00
"Rules"
],
"type": "object"
}