bpmnlint-plugin-camunda-compat 2.53.0 → 2.54.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmnlint-plugin-camunda-compat",
3
- "version": "2.53.0",
3
+ "version": "2.54.0",
4
4
  "description": "A bpmnlint plug-in for Camunda compatibility",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -9,7 +9,13 @@ const { reportErrors } = require('../utils/reporter');
9
9
 
10
10
  const { skipInNonExecutableProcess } = require('../utils/rule');
11
11
 
12
- module.exports = skipInNonExecutableProcess(function() {
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
+ });