bpmnlint-plugin-camunda-compat 2.53.0 → 2.55.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
|
@@ -18,6 +18,7 @@ const camundaCloud10Rules = withConfig({
|
|
|
18
18
|
'no-execution-listener-headers': 'error',
|
|
19
19
|
'no-execution-listeners': 'error',
|
|
20
20
|
'no-expression': 'error',
|
|
21
|
+
'no-job-priority-definition': 'error',
|
|
21
22
|
'no-loop': 'error',
|
|
22
23
|
'no-multiple-none-start-events': 'error',
|
|
23
24
|
'no-priority-definition': 'error',
|
|
@@ -122,7 +123,8 @@ const camundaCloud810Rules = withConfig({
|
|
|
122
123
|
...omit(camundaCloud89Rules, [
|
|
123
124
|
'no-execution-listener-headers',
|
|
124
125
|
'no-before-all-execution-listener',
|
|
125
|
-
'no-cancel-execution-listener'
|
|
126
|
+
'no-cancel-execution-listener',
|
|
127
|
+
'no-job-priority-definition'
|
|
126
128
|
]),
|
|
127
129
|
'before-all-execution-listener': 'error',
|
|
128
130
|
'cancel-execution-listener': 'error',
|
|
@@ -199,6 +201,7 @@ const rules = {
|
|
|
199
201
|
'no-execution-listeners': './rules/camunda-cloud/no-execution-listeners',
|
|
200
202
|
'no-expression': './rules/camunda-cloud/no-expression',
|
|
201
203
|
'no-interrupting-event-subprocess': './rules/camunda-cloud/no-interrupting-event-subprocess',
|
|
204
|
+
'no-job-priority-definition': './rules/camunda-cloud/no-job-priority-definition',
|
|
202
205
|
'no-loop': './rules/camunda-cloud/no-loop',
|
|
203
206
|
'no-multiple-none-start-events': './rules/camunda-cloud/no-multiple-none-start-events',
|
|
204
207
|
'no-priority-definition': './rules/camunda-cloud/no-priority-definition',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpmnlint-plugin-camunda-compat",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.55.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": "^21.0.1",
|
|
36
36
|
"sinon-chai": "^4.0.1",
|
|
37
|
-
"zeebe-bpmn-moddle": "^1.
|
|
37
|
+
"zeebe-bpmn-moddle": "^1.15.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@bpmn-io/feel-analyzer": "^0.3.0",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const { hasNoExtensionElement } = require('../utils/element');
|
|
2
|
+
|
|
3
|
+
const { reportErrors } = require('../utils/reporter');
|
|
4
|
+
|
|
5
|
+
const { skipInNonExecutableProcess } = require('../utils/rule');
|
|
6
|
+
|
|
7
|
+
module.exports = skipInNonExecutableProcess(function() {
|
|
8
|
+
function check(node, reporter) {
|
|
9
|
+
const errors = hasNoExtensionElement(node, 'zeebe:JobPriorityDefinition', node, '8.10');
|
|
10
|
+
|
|
11
|
+
if (errors && errors.length) {
|
|
12
|
+
reportErrors(node, reporter, errors);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
check
|
|
18
|
+
};
|
|
19
|
+
});
|
|
@@ -9,7 +9,13 @@ const { reportErrors } = require('../utils/reporter');
|
|
|
9
9
|
|
|
10
10
|
const { skipInNonExecutableProcess } = require('../utils/rule');
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
const { greaterOrEqual } = require('../utils/version');
|
|
13
|
+
|
|
14
|
+
const DMN_VERSION_TAG_EXPRESSION = '8.10';
|
|
15
|
+
|
|
16
|
+
module.exports = skipInNonExecutableProcess(function(config = {}) {
|
|
17
|
+
const { version } = config;
|
|
18
|
+
|
|
13
19
|
function check(node, reporter) {
|
|
14
20
|
if (is(node, 'bpmn:Process')) {
|
|
15
21
|
const versionTag = findExtensionElement(node, 'zeebe:VersionTag');
|
|
@@ -46,6 +52,15 @@ module.exports = skipInNonExecutableProcess(function() {
|
|
|
46
52
|
}
|
|
47
53
|
}, node);
|
|
48
54
|
|
|
55
|
+
if (is(node, 'bpmn:BusinessRuleTask') && !greaterOrEqual(version, DMN_VERSION_TAG_EXPRESSION)) {
|
|
56
|
+
errors.push(...hasProperties(extensionElement, {
|
|
57
|
+
versionTag: {
|
|
58
|
+
allowed: (value) => !value || !value.startsWith('='),
|
|
59
|
+
allowedVersion: DMN_VERSION_TAG_EXPRESSION
|
|
60
|
+
}
|
|
61
|
+
}, node));
|
|
62
|
+
}
|
|
63
|
+
|
|
49
64
|
if (errors && errors.length) {
|
|
50
65
|
reportErrors(node, reporter, errors);
|
|
51
66
|
}
|
|
@@ -55,4 +70,4 @@ module.exports = skipInNonExecutableProcess(function() {
|
|
|
55
70
|
return {
|
|
56
71
|
check
|
|
57
72
|
};
|
|
58
|
-
});
|
|
73
|
+
});
|