bpmnlint-plugin-camunda-compat 2.50.0 → 2.52.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/index.js
CHANGED
|
@@ -14,6 +14,7 @@ const camundaCloud10Rules = withConfig({
|
|
|
14
14
|
'io-mapping': 'error',
|
|
15
15
|
'no-binding-type': 'error',
|
|
16
16
|
'no-candidate-users': 'error',
|
|
17
|
+
'no-cancel-execution-listener': 'error',
|
|
17
18
|
'no-execution-listener-headers': 'error',
|
|
18
19
|
'no-execution-listeners': 'error',
|
|
19
20
|
'no-expression': 'error',
|
|
@@ -112,15 +113,18 @@ const camundaCloud88Rules = withConfig({
|
|
|
112
113
|
}, { version: '8.8' });
|
|
113
114
|
|
|
114
115
|
const camundaCloud89Rules = withConfig({
|
|
115
|
-
...camundaCloud88Rules
|
|
116
|
+
...camundaCloud88Rules,
|
|
117
|
+
'start-event-form-embedded': 'warn'
|
|
116
118
|
}, { version: '8.9' });
|
|
117
119
|
|
|
118
120
|
const camundaCloud810Rules = withConfig({
|
|
119
121
|
...omit(camundaCloud89Rules, [
|
|
120
122
|
'no-execution-listener-headers',
|
|
121
123
|
'no-before-all-execution-listener',
|
|
124
|
+
'no-cancel-execution-listener'
|
|
122
125
|
]),
|
|
123
126
|
'before-all-execution-listener': 'error',
|
|
127
|
+
'cancel-execution-listener': 'error',
|
|
124
128
|
'duplicate-execution-listener-headers': 'error'
|
|
125
129
|
}, { version: '8.10' });
|
|
126
130
|
|
|
@@ -164,6 +168,7 @@ const rules = {
|
|
|
164
168
|
'ad-hoc-sub-process': './rules/camunda-cloud/ad-hoc-sub-process',
|
|
165
169
|
'before-all-execution-listener': './rules/camunda-cloud/before-all-execution-listener',
|
|
166
170
|
'element-type': './rules/camunda-cloud/element-type',
|
|
171
|
+
'cancel-execution-listener': './rules/camunda-cloud/cancel-execution-listener',
|
|
167
172
|
'called-element': './rules/camunda-cloud/called-element',
|
|
168
173
|
'collapsed-subprocess': './rules/camunda-cloud/collapsed-subprocess',
|
|
169
174
|
'connector-properties': './rules/camunda-cloud/connector-properties',
|
|
@@ -187,6 +192,7 @@ const rules = {
|
|
|
187
192
|
'no-binding-type': './rules/camunda-cloud/no-binding-type',
|
|
188
193
|
'no-before-all-execution-listener': './rules/camunda-cloud/no-before-all-execution-listener',
|
|
189
194
|
'no-candidate-users': './rules/camunda-cloud/no-candidate-users',
|
|
195
|
+
'no-cancel-execution-listener': './rules/camunda-cloud/no-cancel-execution-listener',
|
|
190
196
|
'no-execution-listener-headers': './rules/camunda-cloud/no-execution-listener-headers',
|
|
191
197
|
'no-execution-listeners': './rules/camunda-cloud/no-execution-listeners',
|
|
192
198
|
'no-expression': './rules/camunda-cloud/no-expression',
|
|
@@ -208,6 +214,7 @@ const rules = {
|
|
|
208
214
|
'sequence-flow-condition': './rules/camunda-cloud/sequence-flow-condition',
|
|
209
215
|
'signal-reference': './rules/camunda-cloud/signal-reference',
|
|
210
216
|
'start-event-form': './rules/camunda-cloud/start-event-form',
|
|
217
|
+
'start-event-form-embedded': './rules/camunda-cloud/start-event-form-embedded',
|
|
211
218
|
'subscription': './rules/camunda-cloud/subscription',
|
|
212
219
|
'task-listener': './rules/camunda-cloud/task-listener',
|
|
213
220
|
'task-schedule': './rules/camunda-cloud/task-schedule',
|
package/package.json
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const { isAny } = require('bpmnlint-utils');
|
|
2
|
+
|
|
3
|
+
const {
|
|
4
|
+
findExtensionElement,
|
|
5
|
+
hasProperties
|
|
6
|
+
} = require('../utils/element');
|
|
7
|
+
|
|
8
|
+
const { reportErrors } = require('../utils/reporter');
|
|
9
|
+
|
|
10
|
+
const { skipInNonExecutableProcess } = require('../utils/rule');
|
|
11
|
+
|
|
12
|
+
module.exports = skipInNonExecutableProcess(function() {
|
|
13
|
+
function check(node, reporter) {
|
|
14
|
+
if (isAny(node, [ 'bpmn:Process', 'bpmn:Participant' ])) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const executionListeners = findExtensionElement(node, 'zeebe:ExecutionListeners');
|
|
19
|
+
|
|
20
|
+
if (!executionListeners) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const listeners = executionListeners.get('listeners');
|
|
25
|
+
|
|
26
|
+
const errors = listeners.flatMap(listener => hasProperties(listener, {
|
|
27
|
+
eventType: {
|
|
28
|
+
allowed: (value) => value !== 'cancel'
|
|
29
|
+
}
|
|
30
|
+
}, node));
|
|
31
|
+
|
|
32
|
+
if (errors.length) {
|
|
33
|
+
reportErrors(node, reporter, errors);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
check
|
|
39
|
+
};
|
|
40
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const {
|
|
2
|
+
findExtensionElement,
|
|
3
|
+
hasProperties
|
|
4
|
+
} = require('../utils/element');
|
|
5
|
+
|
|
6
|
+
const { reportErrors } = require('../utils/reporter');
|
|
7
|
+
|
|
8
|
+
const { skipInNonExecutableProcess } = require('../utils/rule');
|
|
9
|
+
|
|
10
|
+
const ALLOWED_VERSION = '8.10';
|
|
11
|
+
|
|
12
|
+
module.exports = skipInNonExecutableProcess(function() {
|
|
13
|
+
function check(node, reporter) {
|
|
14
|
+
const executionListeners = findExtensionElement(node, 'zeebe:ExecutionListeners');
|
|
15
|
+
|
|
16
|
+
if (!executionListeners) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const listeners = executionListeners.get('listeners');
|
|
21
|
+
|
|
22
|
+
const errors = listeners.flatMap(listener => hasProperties(listener, {
|
|
23
|
+
eventType: {
|
|
24
|
+
allowed: (value) => value !== 'cancel',
|
|
25
|
+
allowedVersion: ALLOWED_VERSION
|
|
26
|
+
}
|
|
27
|
+
}, node));
|
|
28
|
+
|
|
29
|
+
if (errors.length) {
|
|
30
|
+
reportErrors(node, reporter, errors);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return {
|
|
35
|
+
check
|
|
36
|
+
};
|
|
37
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const { is } = require('bpmnlint-utils');
|
|
2
|
+
|
|
3
|
+
const { findExtensionElement } = require('../utils/element');
|
|
4
|
+
|
|
5
|
+
const { getPath } = require('@bpmn-io/moddle-utils');
|
|
6
|
+
|
|
7
|
+
const { reportErrors } = require('../utils/reporter');
|
|
8
|
+
|
|
9
|
+
const { skipInNonExecutableProcess } = require('../utils/rule');
|
|
10
|
+
|
|
11
|
+
const { ERROR_TYPES } = require('../utils/error-types');
|
|
12
|
+
|
|
13
|
+
module.exports = skipInNonExecutableProcess(function() {
|
|
14
|
+
function check(node, reporter) {
|
|
15
|
+
if (!node || !is(node, 'bpmn:StartEvent')) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const formDefinition = findExtensionElement(node, 'zeebe:FormDefinition');
|
|
20
|
+
|
|
21
|
+
if (!formDefinition) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const formKey = formDefinition.get('formKey');
|
|
26
|
+
|
|
27
|
+
if (!formKey || !formKey.startsWith('camunda-forms:bpmn:')) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const errors = [
|
|
32
|
+
{
|
|
33
|
+
message: 'Embedded forms on start events are deprecated; use a linked form instead',
|
|
34
|
+
path: getPath(formDefinition, node),
|
|
35
|
+
data: {
|
|
36
|
+
type: ERROR_TYPES.PROPERTY_DEPRECATED,
|
|
37
|
+
node: formDefinition,
|
|
38
|
+
parentNode: node,
|
|
39
|
+
property: 'formKey'
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
reportErrors(node, reporter, errors);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return {
|
|
48
|
+
check
|
|
49
|
+
};
|
|
50
|
+
});
|
|
@@ -17,6 +17,7 @@ module.exports.ERROR_TYPES = Object.freeze({
|
|
|
17
17
|
ATTACHED_TO_REF_ELEMENT_TYPE_NOT_ALLOWED: 'camunda.attachedToRefElementTypeNotAllowed',
|
|
18
18
|
PROPERTY_DEPENDENT_REQUIRED: 'camunda.propertyDependentRequired',
|
|
19
19
|
PROPERTY_NOT_ALLOWED: 'camunda.propertyNotAllowed',
|
|
20
|
+
PROPERTY_DEPRECATED: 'camunda.propertyDeprecated',
|
|
20
21
|
PROPERTY_REQUIRED: 'camunda.propertyRequired',
|
|
21
22
|
PROPERTY_TYPE_NOT_ALLOWED: 'camunda.propertyTypeNotAllowed',
|
|
22
23
|
PROPERTY_VALUE_DUPLICATED: 'camunda.propertyValueDuplicated',
|