bpmnlint-plugin-camunda-compat 0.6.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/index.js +46 -28
- package/package.json +3 -3
- package/rules/has-called-decision-or-task-definition/config.js +36 -0
- package/rules/has-called-decision-or-task-definition/index.js +122 -0
- package/rules/has-called-element.js +41 -0
- package/rules/has-error-reference.js +53 -0
- package/rules/has-loop-characteristics.js +65 -0
- package/rules/has-message-reference.js +59 -0
- package/rules/has-subscription.js +63 -0
- package/rules/is-element/config.js +186 -0
- package/rules/is-element/index.js +86 -0
- package/rules/utils/element.js +80 -517
- package/rules/utils/error-types.js +8 -0
- package/rules/utils/reporter.js +11 -0
- package/rules/camunda-cloud-1-0-checks.js +0 -236
- package/rules/camunda-cloud-1-0.js +0 -5
- package/rules/camunda-cloud-1-1-checks.js +0 -89
- package/rules/camunda-cloud-1-1.js +0 -5
- package/rules/camunda-cloud-1-2-checks.js +0 -60
- package/rules/camunda-cloud-1-2.js +0 -5
- package/rules/camunda-cloud-1-3-checks.js +0 -37
- package/rules/camunda-cloud-1-3.js +0 -5
- package/rules/camunda-cloud-8-0-checks.js +0 -5
- package/rules/camunda-cloud-8-0.js +0 -5
- package/rules/camunda-platform-7-15.js +0 -3
- package/rules/camunda-platform-7-16.js +0 -3
- package/rules/camunda-platform-7-17.js +0 -3
- package/rules/utils/cloud/element.js +0 -105
- package/rules/utils/engine-profile.js +0 -10
- package/rules/utils/rule.js +0 -324
- package/rules/utils/type.js +0 -47
@@ -1,236 +0,0 @@
|
|
1
|
-
const {
|
2
|
-
checkEventDefinition,
|
3
|
-
checkFlowNode,
|
4
|
-
checkIf,
|
5
|
-
hasErrorReference,
|
6
|
-
hasEventDefinitionOfType,
|
7
|
-
hasEventDefinitionOfTypeOrNone,
|
8
|
-
hasMessageReference,
|
9
|
-
isNotBpmn,
|
10
|
-
withTranslations
|
11
|
-
} = require('./utils/element');
|
12
|
-
|
13
|
-
const {
|
14
|
-
hasZeebeCalledElement,
|
15
|
-
hasZeebeLoopCharacteristics,
|
16
|
-
hasZeebeSubscription,
|
17
|
-
hasZeebeTaskDefinition
|
18
|
-
} = require('./utils/cloud/element');
|
19
|
-
|
20
|
-
const { checkEvery } = require('./utils/rule');
|
21
|
-
|
22
|
-
module.exports = [
|
23
|
-
{
|
24
|
-
check: isNotBpmn
|
25
|
-
},
|
26
|
-
'bpmn:Association',
|
27
|
-
'bpmn:Collaboration',
|
28
|
-
'bpmn:DataObject',
|
29
|
-
'bpmn:DataObjectReference',
|
30
|
-
'bpmn:DataStoreReference',
|
31
|
-
'bpmn:Definitions',
|
32
|
-
'bpmn:EventBasedGateway',
|
33
|
-
'bpmn:ExclusiveGateway',
|
34
|
-
'bpmn:Group',
|
35
|
-
'bpmn:MessageFlow',
|
36
|
-
'bpmn:ParallelGateway',
|
37
|
-
'bpmn:Participant',
|
38
|
-
'bpmn:Process',
|
39
|
-
'bpmn:SequenceFlow',
|
40
|
-
'bpmn:TextAnnotation',
|
41
|
-
{
|
42
|
-
type: 'bpmn:BoundaryEvent',
|
43
|
-
check: withTranslations(
|
44
|
-
checkEvery(
|
45
|
-
hasEventDefinitionOfType([
|
46
|
-
'bpmn:ErrorEventDefinition',
|
47
|
-
'bpmn:MessageEventDefinition',
|
48
|
-
'bpmn:TimerEventDefinition'
|
49
|
-
]),
|
50
|
-
checkIf(
|
51
|
-
checkEventDefinition(hasErrorReference),
|
52
|
-
hasEventDefinitionOfType('bpmn:ErrorEventDefinition')
|
53
|
-
),
|
54
|
-
checkIf(
|
55
|
-
checkEvery(
|
56
|
-
checkEventDefinition(hasMessageReference),
|
57
|
-
checkIf(
|
58
|
-
checkEventDefinition(hasZeebeSubscription),
|
59
|
-
checkEventDefinition(hasMessageReference)
|
60
|
-
)
|
61
|
-
),
|
62
|
-
hasEventDefinitionOfType('bpmn:MessageEventDefinition')
|
63
|
-
)
|
64
|
-
),
|
65
|
-
{
|
66
|
-
'Element of type <bpmn:BoundaryEvent> not supported by {{ executionPlatform }}': 'An <Undefined Boundary Event> is not supported by {{ executionPlatform }}',
|
67
|
-
'Element of type <bpmn:ErrorEventDefinition> must have property <errorRef>': 'An <Error Boundary Event> must have a defined <Error Reference>',
|
68
|
-
'Element of type <bpmn:Error> must have property <errorCode>': 'An <Error Boundary Event> with <Error Reference> must have a defined <Error code>',
|
69
|
-
'Element of type <bpmn:MessageEventDefinition> must have property <messageRef>': 'A <Message Boundary Event> must have a defined <Message Reference>',
|
70
|
-
'Element of type <bpmn:Message> must have property <name>': 'A <Message Boundary Event> with <Message Reference> must have a defined <Name>',
|
71
|
-
'Element of type <bpmn:Message> must have extension element of type <zeebe:Subscription>': 'A <Message Boundary Event> with <Message Reference> must have a defined <Subscription correlation key>',
|
72
|
-
'Element of type <zeebe:Subscription> must have property <correlationKey>': 'A <Message Boundary Event> with <Message Reference> must have a defined <Subscription correlation key>'
|
73
|
-
}
|
74
|
-
)
|
75
|
-
},
|
76
|
-
{
|
77
|
-
type: 'bpmn:CallActivity',
|
78
|
-
check: withTranslations(
|
79
|
-
checkEvery(
|
80
|
-
hasZeebeCalledElement,
|
81
|
-
hasZeebeLoopCharacteristics
|
82
|
-
),
|
83
|
-
{
|
84
|
-
'Element of type <bpmn:CallActivity> must have extension element of type <zeebe:CalledElement>': 'A <Call Activity> must have a defined <Called element>',
|
85
|
-
'Element of type <zeebe:CalledElement> must have property <processId>': 'A <Call Activity> must have a defined <Called element>',
|
86
|
-
'Element of type <bpmn:MultiInstanceLoopCharacteristics> must have extension element of type <zeebe:LoopCharacteristics>': 'A <Call Activity> with <Multi-instance marker> must have a defined <Input collection>',
|
87
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <inputCollection>': 'A <Call Activity> with <Multi-instance marker> must have a defined <Input collection>',
|
88
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputElement> if it has property <outputCollection>': 'A <Call Activity> with <Multi-instance marker> and defined <Output collection> must have a defined <Output element>',
|
89
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputCollection> if it has property <outputElement>': 'A <Call Activity> with <Multi-instance marker> and defined <Output element> must have a defined <Output collection>'
|
90
|
-
}
|
91
|
-
)
|
92
|
-
},
|
93
|
-
{
|
94
|
-
type: 'bpmn:EndEvent',
|
95
|
-
check: withTranslations(
|
96
|
-
checkEvery(
|
97
|
-
hasEventDefinitionOfTypeOrNone('bpmn:ErrorEventDefinition'),
|
98
|
-
checkIf(
|
99
|
-
checkEventDefinition(hasErrorReference),
|
100
|
-
hasEventDefinitionOfType('bpmn:ErrorEventDefinition')
|
101
|
-
)
|
102
|
-
),
|
103
|
-
{
|
104
|
-
'Element of type <bpmn:EndEvent> (<bpmn:MessageEventDefinition>) not supported by {{ executionPlatform }}': 'A <Message End Event> is not supported by {{ executionPlatform }}',
|
105
|
-
'Element of type <bpmn:ErrorEventDefinition> must have property <errorRef>': 'An <Error End Event> must have a defined <Error Reference>',
|
106
|
-
'Element of type <bpmn:Error> must have property <errorCode>': 'An <Error End Event> with <Error Reference> must have a defined <Error code>'
|
107
|
-
}
|
108
|
-
)
|
109
|
-
},
|
110
|
-
{
|
111
|
-
type: 'bpmn:IntermediateCatchEvent',
|
112
|
-
check: withTranslations(
|
113
|
-
checkEvery(
|
114
|
-
hasEventDefinitionOfType([
|
115
|
-
'bpmn:TimerEventDefinition',
|
116
|
-
'bpmn:MessageEventDefinition'
|
117
|
-
]),
|
118
|
-
checkIf(
|
119
|
-
checkEvery(
|
120
|
-
checkEventDefinition(hasMessageReference),
|
121
|
-
checkIf(
|
122
|
-
checkEventDefinition(hasZeebeSubscription),
|
123
|
-
checkEventDefinition(hasMessageReference)
|
124
|
-
)
|
125
|
-
),
|
126
|
-
hasEventDefinitionOfType('bpmn:MessageEventDefinition')
|
127
|
-
)
|
128
|
-
),
|
129
|
-
{
|
130
|
-
'Element of type <bpmn:IntermediateCatchEvent> not supported by {{ executionPlatform }}': 'A <Undefined Intermediate Catch Event> is not supported by {{ executionPlatform }}',
|
131
|
-
'Element of type <bpmn:MessageEventDefinition> must have property <messageRef>': 'A <Message Intermediate Catch Event> must have a defined <Message Reference>',
|
132
|
-
'Element of type <bpmn:Message> must have property <name>': 'A <Message Intermediate Catch Event> with <Message Reference> must have a defined <Name>',
|
133
|
-
'Element of type <bpmn:Message> must have extension element of type <zeebe:Subscription>': 'A <Message Intermediate Catch Event> with <Message Reference> must have a defined <Subscription correlation key>',
|
134
|
-
'Element of type <zeebe:Subscription> must have property <correlationKey>': 'A <Message Intermediate Catch Event> with <Message Reference> must have a defined <Subscription correlation key>'
|
135
|
-
}
|
136
|
-
)
|
137
|
-
},
|
138
|
-
{
|
139
|
-
type: 'bpmn:ReceiveTask',
|
140
|
-
check: withTranslations(
|
141
|
-
checkEvery(
|
142
|
-
checkFlowNode(hasMessageReference),
|
143
|
-
checkIf(
|
144
|
-
checkFlowNode(hasZeebeSubscription),
|
145
|
-
checkFlowNode(hasMessageReference)
|
146
|
-
),
|
147
|
-
hasZeebeLoopCharacteristics
|
148
|
-
),
|
149
|
-
{
|
150
|
-
'Element of type <bpmn:MultiInstanceLoopCharacteristics> must have extension element of type <zeebe:LoopCharacteristics>': 'A <Receive Task> with <Multi-instance marker> must have a defined <Input collection>',
|
151
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <inputCollection>': 'A <Receive Task> with <Multi-instance marker> must have a defined <Input collection>',
|
152
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputElement> if it has property <outputCollection>': 'A <Receive Task> with <Multi-instance marker> and defined <Output collection> must have a defined <Output element>',
|
153
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputCollection> if it has property <outputElement>': 'A <Receive Task> with <Multi-instance marker> and defined <Output element> must have a defined <Output collection>',
|
154
|
-
'Element of type <bpmn:ReceiveTask> must have property <messageRef>': 'A <Receive Task> must have a defined <Message Reference>',
|
155
|
-
'Element of type <bpmn:Message> must have property <name>': 'A <Receive Task> with <Message Reference> must have a defined <Name>',
|
156
|
-
'Element of type <bpmn:Message> must have extension element of type <zeebe:Subscription>': 'A <Receive Task> with <Message Reference> must have a defined <Subscription correlation key>',
|
157
|
-
'Element of type <zeebe:Subscription> must have property <correlationKey>': 'A <Receive Task> with <Message Reference> must have a defined <Subscription correlation key>'
|
158
|
-
}
|
159
|
-
)
|
160
|
-
},
|
161
|
-
{
|
162
|
-
type: 'bpmn:ServiceTask',
|
163
|
-
check: withTranslations(
|
164
|
-
checkEvery(
|
165
|
-
hasZeebeLoopCharacteristics,
|
166
|
-
hasZeebeTaskDefinition
|
167
|
-
),
|
168
|
-
{
|
169
|
-
'Element of type <bpmn:ServiceTask> must have extension element of type <zeebe:TaskDefinition>': 'A <Service Task> must have a <Task definition type>',
|
170
|
-
'Element of type <zeebe:TaskDefinition> must have property <type>': 'A <Service Task> must have a <Task definition type>',
|
171
|
-
'Element of type <bpmn:MultiInstanceLoopCharacteristics> must have extension element of type <zeebe:LoopCharacteristics>': 'A <Service Task> with <Multi-instance marker> must have a defined <Input collection>',
|
172
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <inputCollection>': 'A <Service Task> with <Multi-instance marker> must have a defined <Input collection>',
|
173
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputElement> if it has property <outputCollection>': 'A <Service Task> with <Multi-instance marker> and defined <Output collection> must have a defined <Output element>',
|
174
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputCollection> if it has property <outputElement>': 'A <Service Task> with <Multi-instance marker> and defined <Output element> must have a defined <Output collection>'
|
175
|
-
}
|
176
|
-
)
|
177
|
-
},
|
178
|
-
{
|
179
|
-
type: 'bpmn:StartEvent',
|
180
|
-
check: withTranslations(
|
181
|
-
checkEvery(
|
182
|
-
hasEventDefinitionOfTypeOrNone([
|
183
|
-
'bpmn:ErrorEventDefinition',
|
184
|
-
'bpmn:MessageEventDefinition',
|
185
|
-
'bpmn:TimerEventDefinition'
|
186
|
-
]),
|
187
|
-
checkIf(
|
188
|
-
checkEventDefinition(hasErrorReference),
|
189
|
-
hasEventDefinitionOfType('bpmn:ErrorEventDefinition')
|
190
|
-
),
|
191
|
-
checkIf(
|
192
|
-
checkEvery(
|
193
|
-
checkEventDefinition(hasMessageReference),
|
194
|
-
checkIf(
|
195
|
-
checkEventDefinition(hasZeebeSubscription),
|
196
|
-
checkEventDefinition(hasMessageReference)
|
197
|
-
)
|
198
|
-
),
|
199
|
-
hasEventDefinitionOfType('bpmn:MessageEventDefinition')
|
200
|
-
)
|
201
|
-
),
|
202
|
-
{
|
203
|
-
'Element of type <bpmn:ErrorEventDefinition> must have property <errorRef>': 'An <Error Start Event> must have a defined <Error Reference>',
|
204
|
-
'Element of type <bpmn:Error> must have property <errorCode>': 'An <Error Start Event> with <Error Reference> must have a defined <Error code>',
|
205
|
-
'Element of type <bpmn:MessageEventDefinition> must have property <messageRef>': 'A <Message Start Event> must have a defined <Message Reference>',
|
206
|
-
'Element of type <bpmn:Message> must have property <name>': 'A <Message Start Event> with <Message Reference> must have a defined <Name>',
|
207
|
-
'Element of type <bpmn:Message> must have extension element of type <zeebe:Subscription>': 'A <Message Start Event> with <Message Reference> must have a defined <Subscription correlation key>',
|
208
|
-
'Element of type <zeebe:Subscription> must have property <correlationKey>': 'A <Message Start Event> with <Message Reference> must have a defined <Subscription correlation key>'
|
209
|
-
}
|
210
|
-
)
|
211
|
-
},
|
212
|
-
{
|
213
|
-
type: 'bpmn:SubProcess',
|
214
|
-
check: withTranslations(
|
215
|
-
hasZeebeLoopCharacteristics,
|
216
|
-
{
|
217
|
-
'Element of type <bpmn:MultiInstanceLoopCharacteristics> must have extension element of type <zeebe:LoopCharacteristics>': 'A <Sub Process> with <Multi-instance marker> must have a defined <Input collection>',
|
218
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <inputCollection>': 'A <Sub Process> with <Multi-instance marker> must have a defined <Input collection>',
|
219
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputElement> if it has property <outputCollection>': 'A <Sub Process> with <Multi-instance marker> and defined <Output collection> must have a defined <Output element>',
|
220
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputCollection> if it has property <outputElement>': 'A <Sub Process> with <Multi-instance marker> and defined <Output element> must have a defined <Output collection>'
|
221
|
-
}
|
222
|
-
)
|
223
|
-
},
|
224
|
-
{
|
225
|
-
type: 'bpmn:UserTask',
|
226
|
-
check: withTranslations(
|
227
|
-
hasZeebeLoopCharacteristics,
|
228
|
-
{
|
229
|
-
'Element of type <bpmn:MultiInstanceLoopCharacteristics> must have extension element of type <zeebe:LoopCharacteristics>': 'A <User Task> with <Multi-instance marker> must have a defined <Input collection>',
|
230
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <inputCollection>': 'A <User Task> with <Multi-instance marker> must have a defined <Input collection>',
|
231
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputElement> if it has property <outputCollection>': 'A <User Task> with <Multi-instance marker> and defined <Output collection> must have a defined <Output element>',
|
232
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputCollection> if it has property <outputElement>': 'A <User Task> with <Multi-instance marker> and defined <Output element> must have a defined <Output collection>'
|
233
|
-
}
|
234
|
-
)
|
235
|
-
}
|
236
|
-
];
|
@@ -1,89 +0,0 @@
|
|
1
|
-
const camundaCloud10Checks = require('./camunda-cloud-1-0-checks');
|
2
|
-
|
3
|
-
const { checkEvery } = require('./utils/rule');
|
4
|
-
|
5
|
-
const {
|
6
|
-
hasNoEventDefinition,
|
7
|
-
withTranslations
|
8
|
-
} = require('./utils/element');
|
9
|
-
|
10
|
-
const {
|
11
|
-
hasZeebeTaskDefinition,
|
12
|
-
hasZeebeLoopCharacteristics
|
13
|
-
} = require('./utils/cloud/element');
|
14
|
-
|
15
|
-
module.exports = [
|
16
|
-
...camundaCloud10Checks,
|
17
|
-
{
|
18
|
-
type: 'bpmn:BusinessRuleTask',
|
19
|
-
check: withTranslations(
|
20
|
-
checkEvery(
|
21
|
-
hasZeebeLoopCharacteristics,
|
22
|
-
hasZeebeTaskDefinition
|
23
|
-
),
|
24
|
-
{
|
25
|
-
'Element of type <bpmn:BusinessRuleTask> must have extension element of type <zeebe:TaskDefinition>': 'A <Business Rule Task> must have a <Task definition type>',
|
26
|
-
'Element of type <zeebe:TaskDefinition> must have property <type>': 'A <Business Rule Task> must have a <Task definition type>',
|
27
|
-
'Element of type <bpmn:MultiInstanceLoopCharacteristics> must have extension element of type <zeebe:LoopCharacteristics>': 'A <Business Rule Task> with <Multi-instance marker> must have a defined <Input collection>',
|
28
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <inputCollection>': 'A <Business Rule Task> with <Multi-instance marker> must have a defined <Input collection>',
|
29
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputElement> if it has property <outputCollection>': 'A <Business Rule Task> with <Multi-instance marker> and defined <Output collection> must have a defined <Output element>',
|
30
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputCollection> if it has property <outputElement>': 'A <Business Rule Task> with <Multi-instance marker> and defined <Output element> must have a defined <Output collection>'
|
31
|
-
}
|
32
|
-
)
|
33
|
-
},
|
34
|
-
{
|
35
|
-
type: 'bpmn:IntermediateThrowEvent',
|
36
|
-
check: withTranslations(
|
37
|
-
hasNoEventDefinition,
|
38
|
-
{
|
39
|
-
'Element of type <bpmn:IntermediateThrowEvent> (<bpmn:MessageEventDefinition>) not supported by {{ executionPlatform }}': 'A <Message Intermediate Throw Event> is not supported by {{ executionPlatform }}'
|
40
|
-
}
|
41
|
-
)
|
42
|
-
},
|
43
|
-
{
|
44
|
-
type: 'bpmn:ManualTask',
|
45
|
-
check: withTranslations(
|
46
|
-
hasZeebeLoopCharacteristics,
|
47
|
-
{
|
48
|
-
'Element of type <bpmn:MultiInstanceLoopCharacteristics> must have extension element of type <zeebe:LoopCharacteristics>': 'A <Manual Task> with <Multi-instance marker> must have a defined <Input collection>',
|
49
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <inputCollection>': 'A <Manual Task> with <Multi-instance marker> must have a defined <Input collection>',
|
50
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputElement> if it has property <outputCollection>': 'A <Manual Task> with <Multi-instance marker> and defined <Output collection> must have a defined <Output element>',
|
51
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputCollection> if it has property <outputElement>': 'A <Manual Task> with <Multi-instance marker> and defined <Output element> must have a defined <Output collection>'
|
52
|
-
}
|
53
|
-
)
|
54
|
-
},
|
55
|
-
{
|
56
|
-
type: 'bpmn:ScriptTask',
|
57
|
-
check: withTranslations(
|
58
|
-
checkEvery(
|
59
|
-
hasZeebeLoopCharacteristics,
|
60
|
-
hasZeebeTaskDefinition
|
61
|
-
),
|
62
|
-
{
|
63
|
-
'Element of type <bpmn:ScriptTask> must have extension element of type <zeebe:TaskDefinition>': 'A <Script Task> must have a <Task definition type>',
|
64
|
-
'Element of type <zeebe:TaskDefinition> must have property <type>': 'A <Script Task> must have a <Task definition type>',
|
65
|
-
'Element of type <bpmn:MultiInstanceLoopCharacteristics> must have extension element of type <zeebe:LoopCharacteristics>': 'A <Script Task> with <Multi-instance marker> must have a defined <Input collection>',
|
66
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <inputCollection>': 'A <Script Task> with <Multi-instance marker> must have a defined <Input collection>',
|
67
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputElement> if it has property <outputCollection>': 'A <Script Task> with <Multi-instance marker> and defined <Output collection> must have a defined <Output element>',
|
68
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputCollection> if it has property <outputElement>': 'A <Script Task> with <Multi-instance marker> and defined <Output element> must have a defined <Output collection>'
|
69
|
-
}
|
70
|
-
)
|
71
|
-
},
|
72
|
-
{
|
73
|
-
type: 'bpmn:SendTask',
|
74
|
-
check: withTranslations(
|
75
|
-
checkEvery(
|
76
|
-
hasZeebeLoopCharacteristics,
|
77
|
-
hasZeebeTaskDefinition
|
78
|
-
),
|
79
|
-
{
|
80
|
-
'Element of type <bpmn:SendTask> must have extension element of type <zeebe:TaskDefinition>': 'A <Send Task> must have a <Task definition type>',
|
81
|
-
'Element of type <zeebe:TaskDefinition> must have property <type>': 'A <Send Task> must have a <Task definition type>',
|
82
|
-
'Element of type <bpmn:MultiInstanceLoopCharacteristics> must have extension element of type <zeebe:LoopCharacteristics>': 'A <Send Task> with <Multi-instance marker> must have a defined <Input collection>',
|
83
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <inputCollection>': 'A <Send Task> with <Multi-instance marker> must have a defined <Input collection>',
|
84
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputElement> if it has property <outputCollection>': 'A <Send Task> with <Multi-instance marker> and defined <Output collection> must have a defined <Output element>',
|
85
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputCollection> if it has property <outputElement>': 'A <Send Task> with <Multi-instance marker> and defined <Output element> must have a defined <Output collection>'
|
86
|
-
}
|
87
|
-
)
|
88
|
-
}
|
89
|
-
];
|
@@ -1,60 +0,0 @@
|
|
1
|
-
const camundaCloud11Checks = require('./camunda-cloud-1-1-checks');
|
2
|
-
|
3
|
-
const {
|
4
|
-
checkEvery,
|
5
|
-
replaceChecks
|
6
|
-
} = require('./utils/rule');
|
7
|
-
|
8
|
-
const {
|
9
|
-
checkEventDefinition,
|
10
|
-
checkIf,
|
11
|
-
hasErrorReference,
|
12
|
-
hasEventDefinitionOfType,
|
13
|
-
hasEventDefinitionOfTypeOrNone,
|
14
|
-
withTranslations
|
15
|
-
} = require('./utils/element');
|
16
|
-
|
17
|
-
const { hasZeebeTaskDefinition } = require('./utils/cloud/element');
|
18
|
-
|
19
|
-
module.exports = [
|
20
|
-
...replaceChecks(
|
21
|
-
camundaCloud11Checks,
|
22
|
-
[
|
23
|
-
{
|
24
|
-
type: 'bpmn:IntermediateThrowEvent',
|
25
|
-
check: withTranslations(
|
26
|
-
checkEvery(
|
27
|
-
hasEventDefinitionOfTypeOrNone('bpmn:MessageEventDefinition'),
|
28
|
-
checkIf(
|
29
|
-
hasZeebeTaskDefinition,
|
30
|
-
hasEventDefinitionOfType('bpmn:MessageEventDefinition')
|
31
|
-
)
|
32
|
-
),
|
33
|
-
{
|
34
|
-
'Element of type <bpmn:IntermediateThrowEvent> must have extension element of type <zeebe:TaskDefinition>': 'An <Intermediate Throw Event> must have a <Task definition type>',
|
35
|
-
'Element of type <zeebe:TaskDefinition> must have property <type>': 'An <Intermediate Throw Event> must have a <Task definition type>'
|
36
|
-
}
|
37
|
-
)
|
38
|
-
},
|
39
|
-
{
|
40
|
-
type: 'bpmn:EndEvent',
|
41
|
-
check: withTranslations(
|
42
|
-
checkEvery(
|
43
|
-
hasEventDefinitionOfTypeOrNone([
|
44
|
-
'bpmn:ErrorEventDefinition',
|
45
|
-
'bpmn:MessageEventDefinition'
|
46
|
-
]),
|
47
|
-
checkIf(
|
48
|
-
checkEventDefinition(hasErrorReference),
|
49
|
-
hasEventDefinitionOfType('bpmn:ErrorEventDefinition')
|
50
|
-
)
|
51
|
-
),
|
52
|
-
{
|
53
|
-
'Element of type <bpmn:ErrorEventDefinition> must have property <errorRef>': 'An <Error End Event> must have a defined <Error Reference>',
|
54
|
-
'Element of type <bpmn:Error> must have property <errorCode>': 'An <Error End Event> with <Error Reference> must have a defined <Error code>'
|
55
|
-
}
|
56
|
-
)
|
57
|
-
}
|
58
|
-
]
|
59
|
-
)
|
60
|
-
];
|
@@ -1,37 +0,0 @@
|
|
1
|
-
const camundaCloud12Checks = require('./camunda-cloud-1-2-checks');
|
2
|
-
|
3
|
-
const {
|
4
|
-
checkEvery,
|
5
|
-
replaceCheck
|
6
|
-
} = require('./utils/rule');
|
7
|
-
|
8
|
-
const { withTranslations } = require('./utils/element');
|
9
|
-
|
10
|
-
const {
|
11
|
-
hasZeebeCalledDecisionOrTaskDefinition,
|
12
|
-
hasZeebeLoopCharacteristics
|
13
|
-
} = require('./utils/cloud/element');
|
14
|
-
|
15
|
-
module.exports = [
|
16
|
-
...replaceCheck(
|
17
|
-
camundaCloud12Checks,
|
18
|
-
'bpmn:BusinessRuleTask',
|
19
|
-
withTranslations(
|
20
|
-
checkEvery(
|
21
|
-
hasZeebeCalledDecisionOrTaskDefinition,
|
22
|
-
hasZeebeLoopCharacteristics
|
23
|
-
),
|
24
|
-
{
|
25
|
-
'Element of type <bpmn:BusinessRuleTask> must have one extension element of type <zeebe:CalledDecision> or <zeebe:TaskDefinition>': 'A <Business Rule Task> must have a defined <Implementation>',
|
26
|
-
'Element of type <bpmn:BusinessRuleTask> must have one or many extension elements of type <zeebe:CalledDecision> or <zeebe:TaskDefinition>': 'A <Business Rule Task> must have a defined <Implementation>',
|
27
|
-
'Element of type <zeebe:TaskDefinition> must have property <type>': 'A <Business Rule Task> with <Implementation: Job worker> must have a defined <Task definition type>',
|
28
|
-
'Element of type <zeebe:CalledDecision> must have property <decisionId>': 'A <Business Rule Task> with <Implementation: DMN decision> must have a defined <Called decision ID>',
|
29
|
-
'Element of type <zeebe:CalledDecision> must have property <resultVariable>': 'A <Business Rule Task> with <Implementation: DMN decision> must have a defined <Result variable>',
|
30
|
-
'Element of type <bpmn:MultiInstanceLoopCharacteristics> must have extension element of type <zeebe:LoopCharacteristics>': 'A <Business Rule Task> with <Multi-instance marker> must have a defined <Input collection>',
|
31
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <inputCollection>': 'A <Business Rule Task> with <Multi-instance marker> must have a defined <Input collection>',
|
32
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputElement> if it has property <outputCollection>': 'A <Business Rule Task> with <Multi-instance marker> and defined <Output collection> must have a defined <Output element>',
|
33
|
-
'Element of type <zeebe:LoopCharacteristics> must have property <outputCollection> if it has property <outputElement>': 'A <Business Rule Task> with <Multi-instance marker> and defined <Output element> must have a defined <Output collection>'
|
34
|
-
}
|
35
|
-
)
|
36
|
-
)
|
37
|
-
];
|
@@ -1,105 +0,0 @@
|
|
1
|
-
const { checkEvery } = require('../rule');
|
2
|
-
|
3
|
-
const {
|
4
|
-
checkFlowNode,
|
5
|
-
checkLoopCharacteristics,
|
6
|
-
checkMessage,
|
7
|
-
hasExtensionElementOfType,
|
8
|
-
hasExtensionElementsOfTypes,
|
9
|
-
checkIf,
|
10
|
-
hasMultiInstanceLoopCharacteristics,
|
11
|
-
hasLoopCharacteristics
|
12
|
-
} = require('../element');
|
13
|
-
|
14
|
-
module.exports.hasZeebeCalledDecisionOrTaskDefinition = checkFlowNode(
|
15
|
-
hasExtensionElementsOfTypes([
|
16
|
-
{
|
17
|
-
type: 'zeebe:CalledDecision',
|
18
|
-
properties: {
|
19
|
-
decisionId: {
|
20
|
-
required: true
|
21
|
-
},
|
22
|
-
resultVariable: {
|
23
|
-
required: true
|
24
|
-
}
|
25
|
-
}
|
26
|
-
},
|
27
|
-
{
|
28
|
-
type: 'zeebe:TaskDefinition',
|
29
|
-
properties: {
|
30
|
-
type: {
|
31
|
-
required: true
|
32
|
-
}
|
33
|
-
}
|
34
|
-
}
|
35
|
-
], true)
|
36
|
-
);
|
37
|
-
|
38
|
-
module.exports.hasZeebeCalledElement = checkFlowNode(
|
39
|
-
hasExtensionElementOfType({
|
40
|
-
type: 'zeebe:CalledElement',
|
41
|
-
properties: {
|
42
|
-
processId: {
|
43
|
-
required: true
|
44
|
-
}
|
45
|
-
}
|
46
|
-
})
|
47
|
-
);
|
48
|
-
|
49
|
-
/**
|
50
|
-
* Check if one of the following is true:
|
51
|
-
*
|
52
|
-
* 1. no loop characteristics
|
53
|
-
* 2. bpmn:MultiInstanceLoopCharacteristics with zeebe:LoopCharacteristics
|
54
|
-
* extension element with zeebe:inputCollection
|
55
|
-
*/
|
56
|
-
module.exports.hasZeebeLoopCharacteristics = checkEvery(
|
57
|
-
checkIf(
|
58
|
-
hasMultiInstanceLoopCharacteristics,
|
59
|
-
hasLoopCharacteristics
|
60
|
-
),
|
61
|
-
checkIf(
|
62
|
-
checkLoopCharacteristics(
|
63
|
-
hasExtensionElementOfType({
|
64
|
-
type: 'zeebe:LoopCharacteristics',
|
65
|
-
properties: {
|
66
|
-
inputCollection: {
|
67
|
-
required: true
|
68
|
-
},
|
69
|
-
outputCollection: {
|
70
|
-
dependendRequired: 'outputElement'
|
71
|
-
},
|
72
|
-
outputElement: {
|
73
|
-
dependendRequired: 'outputCollection'
|
74
|
-
}
|
75
|
-
}
|
76
|
-
})
|
77
|
-
),
|
78
|
-
checkEvery(
|
79
|
-
hasLoopCharacteristics,
|
80
|
-
hasMultiInstanceLoopCharacteristics
|
81
|
-
)
|
82
|
-
)
|
83
|
-
);
|
84
|
-
|
85
|
-
module.exports.hasZeebeSubscription = checkMessage(
|
86
|
-
hasExtensionElementOfType({
|
87
|
-
type: 'zeebe:Subscription',
|
88
|
-
properties: {
|
89
|
-
correlationKey: {
|
90
|
-
required: true
|
91
|
-
}
|
92
|
-
}
|
93
|
-
})
|
94
|
-
);
|
95
|
-
|
96
|
-
module.exports.hasZeebeTaskDefinition = checkFlowNode(
|
97
|
-
hasExtensionElementOfType({
|
98
|
-
type: 'zeebe:TaskDefinition',
|
99
|
-
properties: {
|
100
|
-
type: {
|
101
|
-
required: true
|
102
|
-
}
|
103
|
-
}
|
104
|
-
})
|
105
|
-
);
|