bpmnlint-plugin-camunda-compat 2.24.0 → 2.26.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
@@ -21,6 +21,7 @@ const camundaCloud10Rules = withConfig({
|
|
21
21
|
'no-propagate-all-parent-variables': 'error',
|
22
22
|
'no-task-schedule': 'error',
|
23
23
|
'no-template': 'error',
|
24
|
+
'no-version-tag': 'error',
|
24
25
|
'no-zeebe-properties': 'error',
|
25
26
|
'no-zeebe-user-task': 'error',
|
26
27
|
'sequence-flow-condition': 'error',
|
@@ -83,11 +84,13 @@ const camundaCloud86Rules = withConfig({
|
|
83
84
|
'inclusive-gateway',
|
84
85
|
'no-binding-type',
|
85
86
|
'no-execution-listeners',
|
86
|
-
'no-priority-definition'
|
87
|
+
'no-priority-definition',
|
88
|
+
'no-version-tag'
|
87
89
|
]),
|
88
90
|
'duplicate-execution-listeners': 'error',
|
89
91
|
'execution-listener': 'error',
|
90
|
-
'priority-definition': 'error'
|
92
|
+
'priority-definition': 'error',
|
93
|
+
'version-tag': 'error'
|
91
94
|
}, { version: '8.6' });
|
92
95
|
|
93
96
|
const camundaPlatform719Rules = withConfig({
|
@@ -143,6 +146,7 @@ const rules = {
|
|
143
146
|
'no-signal-event-sub-process': './rules/camunda-cloud/no-signal-event-sub-process',
|
144
147
|
'no-task-schedule': './rules/camunda-cloud/no-task-schedule',
|
145
148
|
'no-template': './rules/camunda-cloud/no-template',
|
149
|
+
'no-version-tag': './rules/camunda-cloud/no-version-tag',
|
146
150
|
'no-zeebe-properties': './rules/camunda-cloud/no-zeebe-properties',
|
147
151
|
'no-zeebe-user-task': './rules/camunda-cloud/no-zeebe-user-task',
|
148
152
|
'priority-definition': './rules/camunda-cloud/priority-definition',
|
@@ -155,6 +159,7 @@ const rules = {
|
|
155
159
|
'timer': './rules/camunda-cloud/timer',
|
156
160
|
'user-task-definition': './rules/camunda-cloud/user-task-definition',
|
157
161
|
'user-task-form': './rules/camunda-cloud/user-task-form',
|
162
|
+
'version-tag': './rules/camunda-cloud/version-tag',
|
158
163
|
'wait-for-completion': './rules/camunda-cloud/wait-for-completion'
|
159
164
|
};
|
160
165
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "bpmnlint-plugin-camunda-compat",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.26.0",
|
4
4
|
"description": "A bpmnlint plug-in for Camunda compatibility",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -34,7 +34,7 @@
|
|
34
34
|
"modeler-moddle": "^0.2.0",
|
35
35
|
"sinon": "^17.0.1",
|
36
36
|
"sinon-chai": "^3.7.0",
|
37
|
-
"zeebe-bpmn-moddle": "^1.
|
37
|
+
"zeebe-bpmn-moddle": "^1.6.0"
|
38
38
|
},
|
39
39
|
"dependencies": {
|
40
40
|
"@bpmn-io/feel-lint": "^1.2.0",
|
@@ -0,0 +1,25 @@
|
|
1
|
+
const { is } = require('bpmnlint-utils');
|
2
|
+
|
3
|
+
const { hasNoExtensionElement } = require('../utils/element');
|
4
|
+
|
5
|
+
const { reportErrors } = require('../utils/reporter');
|
6
|
+
|
7
|
+
const { skipInNonExecutableProcess } = require('../utils/rule');
|
8
|
+
|
9
|
+
const allowedVersion = '8.6';
|
10
|
+
|
11
|
+
module.exports = skipInNonExecutableProcess(function() {
|
12
|
+
function check(node, reporter) {
|
13
|
+
if (is(node, 'bpmn:Process')) {
|
14
|
+
const errors = hasNoExtensionElement(node, 'zeebe:VersionTag', node, allowedVersion);
|
15
|
+
|
16
|
+
if (errors && errors.length) {
|
17
|
+
reportErrors(node, reporter, errors);
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
return {
|
23
|
+
check
|
24
|
+
};
|
25
|
+
});
|
@@ -0,0 +1,58 @@
|
|
1
|
+
const { is } = 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 (is(node, 'bpmn:Process')) {
|
15
|
+
const versionTag = findExtensionElement(node, 'zeebe:VersionTag');
|
16
|
+
|
17
|
+
if (!versionTag) {
|
18
|
+
return;
|
19
|
+
}
|
20
|
+
|
21
|
+
const errors = hasProperties(versionTag, {
|
22
|
+
value: {
|
23
|
+
required: true
|
24
|
+
}
|
25
|
+
}, node);
|
26
|
+
|
27
|
+
if (errors && errors.length) {
|
28
|
+
reportErrors(node, reporter, errors);
|
29
|
+
}
|
30
|
+
}
|
31
|
+
|
32
|
+
let extensionElement;
|
33
|
+
|
34
|
+
if (is(node, 'bpmn:BusinessRuleTask')) {
|
35
|
+
extensionElement = findExtensionElement(node, 'zeebe:CalledDecision');
|
36
|
+
} else if (is(node, 'bpmn:CallActivity')) {
|
37
|
+
extensionElement = findExtensionElement(node, 'zeebe:CalledElement');
|
38
|
+
} else if (is(node, 'bpmn:UserTask')) {
|
39
|
+
extensionElement = findExtensionElement(node, 'zeebe:FormDefinition');
|
40
|
+
}
|
41
|
+
|
42
|
+
if (extensionElement && extensionElement.get('bindingType') === 'versionTag') {
|
43
|
+
const errors = hasProperties(extensionElement, {
|
44
|
+
versionTag: {
|
45
|
+
required: true
|
46
|
+
}
|
47
|
+
}, node);
|
48
|
+
|
49
|
+
if (errors && errors.length) {
|
50
|
+
reportErrors(node, reporter, errors);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
return {
|
56
|
+
check
|
57
|
+
};
|
58
|
+
});
|