bpmnlint-plugin-camunda-compat 2.51.0 → 2.52.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
|
@@ -113,7 +113,8 @@ const camundaCloud88Rules = withConfig({
|
|
|
113
113
|
}, { version: '8.8' });
|
|
114
114
|
|
|
115
115
|
const camundaCloud89Rules = withConfig({
|
|
116
|
-
...camundaCloud88Rules
|
|
116
|
+
...camundaCloud88Rules,
|
|
117
|
+
'start-event-form-embedded': 'warn'
|
|
117
118
|
}, { version: '8.9' });
|
|
118
119
|
|
|
119
120
|
const camundaCloud810Rules = withConfig({
|
|
@@ -213,6 +214,7 @@ const rules = {
|
|
|
213
214
|
'sequence-flow-condition': './rules/camunda-cloud/sequence-flow-condition',
|
|
214
215
|
'signal-reference': './rules/camunda-cloud/signal-reference',
|
|
215
216
|
'start-event-form': './rules/camunda-cloud/start-event-form',
|
|
217
|
+
'start-event-form-embedded': './rules/camunda-cloud/start-event-form-embedded',
|
|
216
218
|
'subscription': './rules/camunda-cloud/subscription',
|
|
217
219
|
'task-listener': './rules/camunda-cloud/task-listener',
|
|
218
220
|
'task-schedule': './rules/camunda-cloud/task-schedule',
|
package/package.json
CHANGED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const { is } = require('bpmnlint-utils');
|
|
2
|
+
|
|
3
|
+
const { findExtensionElement } = require('../utils/element');
|
|
4
|
+
|
|
5
|
+
const { getPath } = require('@bpmn-io/moddle-utils');
|
|
6
|
+
|
|
7
|
+
const { reportErrors } = require('../utils/reporter');
|
|
8
|
+
|
|
9
|
+
const { skipInNonExecutableProcess } = require('../utils/rule');
|
|
10
|
+
|
|
11
|
+
const { ERROR_TYPES } = require('../utils/error-types');
|
|
12
|
+
|
|
13
|
+
module.exports = skipInNonExecutableProcess(function() {
|
|
14
|
+
function check(node, reporter) {
|
|
15
|
+
if (!node || !is(node, 'bpmn:StartEvent')) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const formDefinition = findExtensionElement(node, 'zeebe:FormDefinition');
|
|
20
|
+
|
|
21
|
+
if (!formDefinition) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const formKey = formDefinition.get('formKey');
|
|
26
|
+
|
|
27
|
+
if (!formKey || !formKey.startsWith('camunda-forms:bpmn:')) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const errors = [
|
|
32
|
+
{
|
|
33
|
+
message: 'Embedded forms on start events are deprecated; use a linked form instead',
|
|
34
|
+
path: getPath(formDefinition, node),
|
|
35
|
+
data: {
|
|
36
|
+
type: ERROR_TYPES.PROPERTY_DEPRECATED,
|
|
37
|
+
node: formDefinition,
|
|
38
|
+
parentNode: node,
|
|
39
|
+
property: 'formKey'
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
reportErrors(node, reporter, errors);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return {
|
|
48
|
+
check
|
|
49
|
+
};
|
|
50
|
+
});
|
|
@@ -17,6 +17,7 @@ module.exports.ERROR_TYPES = Object.freeze({
|
|
|
17
17
|
ATTACHED_TO_REF_ELEMENT_TYPE_NOT_ALLOWED: 'camunda.attachedToRefElementTypeNotAllowed',
|
|
18
18
|
PROPERTY_DEPENDENT_REQUIRED: 'camunda.propertyDependentRequired',
|
|
19
19
|
PROPERTY_NOT_ALLOWED: 'camunda.propertyNotAllowed',
|
|
20
|
+
PROPERTY_DEPRECATED: 'camunda.propertyDeprecated',
|
|
20
21
|
PROPERTY_REQUIRED: 'camunda.propertyRequired',
|
|
21
22
|
PROPERTY_TYPE_NOT_ALLOWED: 'camunda.propertyTypeNotAllowed',
|
|
22
23
|
PROPERTY_VALUE_DUPLICATED: 'camunda.propertyValueDuplicated',
|