bpmnlint-plugin-camunda-compat 2.17.0 → 2.18.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
@@ -66,11 +66,13 @@ const camundaCloud83Rules = withConfig({
|
|
66
66
|
const camundaCloud84Rules = withConfig(
|
67
67
|
omit(camundaCloud83Rules, 'collapsed-subprocess'), { version: '8.4' });
|
68
68
|
|
69
|
-
const camundaCloud85Rules = withConfig(
|
70
|
-
omit(camundaCloud83Rules, [
|
69
|
+
const camundaCloud85Rules = withConfig({
|
70
|
+
...omit(camundaCloud83Rules, [
|
71
71
|
'collapsed-subprocess',
|
72
72
|
'no-zeebe-user-task'
|
73
|
-
]),
|
73
|
+
]),
|
74
|
+
'wait-for-completion': 'error'
|
75
|
+
}, { version: '8.5' });
|
74
76
|
|
75
77
|
const camundaPlatform719Rules = withConfig({
|
76
78
|
'history-time-to-live': 'info'
|
@@ -124,7 +126,8 @@ const rules = {
|
|
124
126
|
'task-schedule': './rules/camunda-cloud/task-schedule',
|
125
127
|
'timer': './rules/camunda-cloud/timer',
|
126
128
|
'user-task-definition': './rules/camunda-cloud/user-task-definition',
|
127
|
-
'user-task-form': './rules/camunda-cloud/user-task-form'
|
129
|
+
'user-task-form': './rules/camunda-cloud/user-task-form',
|
130
|
+
'wait-for-completion': './rules/camunda-cloud/wait-for-completion'
|
128
131
|
};
|
129
132
|
|
130
133
|
const configs = {
|
package/package.json
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module.exports = {
|
2
2
|
'bpmn:Association': '1.0',
|
3
3
|
'bpmn:BoundaryEvent': {
|
4
|
+
'bpmn:CompensateEventDefinition': '8.5',
|
4
5
|
'bpmn:ErrorEventDefinition': '1.0',
|
5
6
|
'bpmn:EscalationEventDefinition': '8.2',
|
6
7
|
'bpmn:MessageEventDefinition': '1.0',
|
@@ -16,6 +17,7 @@ module.exports = {
|
|
16
17
|
'bpmn:Definitions': '1.0',
|
17
18
|
'bpmn:EndEvent': {
|
18
19
|
'_': '1.0',
|
20
|
+
'bpmn:CompensateEventDefinition': '8.5',
|
19
21
|
'bpmn:ErrorEventDefinition': '1.0',
|
20
22
|
'bpmn:EscalationEventDefinition': '8.2',
|
21
23
|
'bpmn:MessageEventDefinition': '1.2',
|
@@ -34,6 +36,7 @@ module.exports = {
|
|
34
36
|
},
|
35
37
|
'bpmn:IntermediateThrowEvent': {
|
36
38
|
'_': '1.1',
|
39
|
+
'bpmn:CompensateEventDefinition': '8.5',
|
37
40
|
'bpmn:EscalationEventDefinition': '8.2',
|
38
41
|
'bpmn:LinkEventDefinition': '8.2',
|
39
42
|
'bpmn:MessageEventDefinition': '1.2',
|
@@ -0,0 +1,46 @@
|
|
1
|
+
const {
|
2
|
+
is
|
3
|
+
} = require('bpmnlint-utils');
|
4
|
+
|
5
|
+
const {
|
6
|
+
getEventDefinition,
|
7
|
+
hasProperties
|
8
|
+
} = require('../utils/element');
|
9
|
+
|
10
|
+
const { reportErrors } = require('../utils/reporter');
|
11
|
+
|
12
|
+
const { skipInNonExecutableProcess } = require('../utils/rule');
|
13
|
+
|
14
|
+
module.exports = skipInNonExecutableProcess(waitForCompletion);
|
15
|
+
|
16
|
+
/**
|
17
|
+
* Make sure that wait for completion is NOT set to false.
|
18
|
+
*/
|
19
|
+
function waitForCompletion() {
|
20
|
+
function check(node, reporter) {
|
21
|
+
if (!is(node, 'bpmn:ThrowEvent')) {
|
22
|
+
return;
|
23
|
+
}
|
24
|
+
|
25
|
+
const eventDefinition = getEventDefinition(node);
|
26
|
+
|
27
|
+
if (!eventDefinition || !is(eventDefinition, 'bpmn:CompensateEventDefinition')) {
|
28
|
+
return;
|
29
|
+
}
|
30
|
+
|
31
|
+
const errors = hasProperties(eventDefinition, {
|
32
|
+
waitForCompletion: {
|
33
|
+
value: true
|
34
|
+
}
|
35
|
+
}, node);
|
36
|
+
|
37
|
+
if (errors && errors.length) {
|
38
|
+
reportErrors(node, reporter, errors);
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
|
43
|
+
return {
|
44
|
+
check
|
45
|
+
};
|
46
|
+
}
|