bpmnlint-plugin-camunda-compat 2.40.0 → 2.41.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/package.json
CHANGED
|
@@ -27,13 +27,6 @@ module.exports = skipInNonExecutableProcess(function({ version }) {
|
|
|
27
27
|
const scriptConfig = config.script[ node.$type ];
|
|
28
28
|
const taskDefinitionConfig = config.taskDefinition[ node.$type ];
|
|
29
29
|
|
|
30
|
-
if (
|
|
31
|
-
(!calledDecisionConfig || (isString(calledDecisionConfig) && !greaterOrEqual(version, calledDecisionConfig)))
|
|
32
|
-
&& (!scriptConfig || (isString(scriptConfig) && !greaterOrEqual(version, scriptConfig)))
|
|
33
|
-
&& (!taskDefinitionConfig || (isString(taskDefinitionConfig) && !greaterOrEqual(version, taskDefinitionConfig)))) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
30
|
if (is(node, 'bpmn:ThrowEvent') && !getEventDefinition(node)) {
|
|
38
31
|
return;
|
|
39
32
|
}
|
|
@@ -150,6 +143,8 @@ module.exports = skipInNonExecutableProcess(function({ version }) {
|
|
|
150
143
|
|
|
151
144
|
if (errors && errors.length) {
|
|
152
145
|
reportErrors(node, reporter, errors);
|
|
146
|
+
|
|
147
|
+
return;
|
|
153
148
|
}
|
|
154
149
|
}
|
|
155
150
|
|
|
@@ -161,9 +156,9 @@ module.exports = skipInNonExecutableProcess(function({ version }) {
|
|
|
161
156
|
|
|
162
157
|
if (allowedTypes.length === 0) {
|
|
163
158
|
return;
|
|
164
|
-
} else if (allowedTypes.length === 1) {
|
|
159
|
+
} else if (allowedTypes.length === 1 && !canHaveExtensionlessImplementation(node)) {
|
|
165
160
|
errors = hasExtensionElement(node, allowedTypes[0], node);
|
|
166
|
-
} else {
|
|
161
|
+
} else if (!canHaveExtensionlessImplementation(node)) {
|
|
167
162
|
errors = hasExtensionElement(node, allowedTypes, node);
|
|
168
163
|
}
|
|
169
164
|
|
|
@@ -216,3 +211,11 @@ function getAllowedVersion(config, node) {
|
|
|
216
211
|
|
|
217
212
|
return eventDefinition && config[ eventDefinition.$type ];
|
|
218
213
|
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Check if a BPMN element can have an extension-less implementation
|
|
217
|
+
* (e.g. ad-hoc subprocess with implementation type BPMN).
|
|
218
|
+
*/
|
|
219
|
+
function canHaveExtensionlessImplementation(node) {
|
|
220
|
+
return is(node, 'bpmn:AdHocSubProcess');
|
|
221
|
+
}
|