camunda-bpmn-js 0.12.1 → 0.13.0-alpha.2
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/CHANGELOG.md +32 -0
- package/dist/assets/base-modeler.css +2 -1
- package/dist/assets/bpmn-js.css +113 -0
- package/dist/assets/camunda-platform-modeler.css +2 -1
- package/dist/assets/diagram-js.css +82 -78
- package/dist/assets/element-templates.css +75 -0
- package/dist/assets/properties-panel.css +115 -18
- package/dist/base-modeler.development.js +37213 -40850
- package/dist/base-modeler.production.min.js +8 -3
- package/dist/camunda-cloud-modeler.development.js +39107 -40889
- package/dist/camunda-cloud-modeler.production.min.js +8 -3
- package/dist/camunda-platform-modeler.development.js +50489 -54168
- package/dist/camunda-platform-modeler.production.min.js +8 -3
- package/lib/base/Modeler.js +5 -9
- package/lib/camunda-cloud/Modeler.js +16 -3
- package/lib/camunda-cloud/features/drilldown/index.js +3 -0
- package/lib/camunda-cloud/features/modeling/behavior/CleanUpBusinessRuleTaskBehavior.js +60 -57
- package/lib/camunda-cloud/features/modeling/behavior/CreateZeebeCallActivityBehavior.js +3 -3
- package/lib/camunda-cloud/features/modeling/behavior/FormDefinitionBehavior.js +2 -2
- package/lib/camunda-cloud/features/modeling/behavior/RemoveAssignmentDefinitionBehavior.js +51 -0
- package/lib/camunda-cloud/features/modeling/behavior/UpdatePropagateAllChildVariablesBehavior.js +60 -33
- package/lib/camunda-cloud/features/modeling/behavior/index.js +8 -5
- package/lib/camunda-cloud/helper/CalledElementHelper.js +5 -5
- package/lib/camunda-cloud/helper/ElementHelper.js +18 -0
- package/lib/camunda-cloud/helper/FormsHelper.js +8 -8
- package/lib/camunda-cloud/helper/InputOutputHelper.js +2 -6
- package/lib/camunda-cloud/helper/Utils.js +10 -0
- package/lib/camunda-cloud/helper/ZeebeServiceTaskHelper.js +22 -5
- package/lib/camunda-platform/Modeler.js +7 -3
- package/lib/camunda-platform/features/modeling/behavior/DeleteErrorEventDefinitionBehavior.js +23 -36
- package/lib/camunda-platform/features/modeling/behavior/DeleteRetryTimeCycleBehavior.js +33 -21
- package/lib/camunda-platform/features/modeling/behavior/UpdateCamundaExclusiveBehavior.js +14 -11
- package/lib/camunda-platform/features/modeling/behavior/UpdateInputOutputBehavior.js +20 -30
- package/lib/camunda-platform/features/modeling/behavior/UpdateResultVariableBehavior.js +15 -12
- package/lib/camunda-platform/features/modeling/behavior/UserTaskFormsBehavior.js +9 -8
- package/lib/camunda-platform/features/modeling/behavior/UserTaskGeneratedFormsBehavior.js +32 -33
- package/lib/util/ExtensionElementsUtil.js +59 -0
- package/package.json +10 -10
- package/styles/base-modeler.css +2 -1
- package/styles/camunda-platform-modeler.css +2 -1
- package/lib/camunda-cloud/features/properties-provider/ZeebePropertiesProvider.js +0 -201
- package/lib/camunda-cloud/features/properties-provider/index.js +0 -11
- package/lib/camunda-cloud/features/properties-provider/parts/CallActivityProps.js +0 -90
- package/lib/camunda-cloud/features/properties-provider/parts/ErrorProps.js +0 -13
- package/lib/camunda-cloud/features/properties-provider/parts/FormProps.js +0 -14
- package/lib/camunda-cloud/features/properties-provider/parts/HeadersProps.js +0 -52
- package/lib/camunda-cloud/features/properties-provider/parts/InputOutputProps.js +0 -8
- package/lib/camunda-cloud/features/properties-provider/parts/MessageProps.js +0 -51
- package/lib/camunda-cloud/features/properties-provider/parts/MultiInstanceProps.js +0 -25
- package/lib/camunda-cloud/features/properties-provider/parts/SequenceFlowProps.js +0 -149
- package/lib/camunda-cloud/features/properties-provider/parts/TaskDefinitionProps.js +0 -135
- package/lib/camunda-cloud/features/properties-provider/parts/TimerEventProps.js +0 -77
- package/lib/camunda-cloud/features/properties-provider/parts/implementation/ElementReferenceExtensionElementProperty.js +0 -110
- package/lib/camunda-cloud/features/properties-provider/parts/implementation/FormDefinition.js +0 -207
- package/lib/camunda-cloud/features/properties-provider/parts/implementation/Headers.js +0 -208
- package/lib/camunda-cloud/features/properties-provider/parts/implementation/InputOutput.js +0 -274
- package/lib/camunda-cloud/features/properties-provider/parts/implementation/InputOutputParameter.js +0 -147
- package/lib/camunda-cloud/features/properties-provider/parts/implementation/MultiInstanceLoopCharacteristics.js +0 -176
- package/lib/camunda-cloud/features/properties-provider/parts/implementation/OutputParameterToggle.js +0 -97
- package/lib/camunda-cloud/features/properties-provider/parts/implementation/TimerDurationDefinition.js +0 -69
- package/lib/camunda-cloud/features/properties-provider/parts/implementation/TimerEventDefinition.js +0 -132
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getBusinessObject,
|
|
3
|
+
is
|
|
4
|
+
} from 'bpmn-js/lib/util/ModelUtil';
|
|
5
|
+
|
|
6
|
+
import { isArray } from 'min-dash';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Get extension elements of business object. Optionally filter by type.
|
|
10
|
+
*
|
|
11
|
+
* @param {djs.model.Base|ModdleElement} element
|
|
12
|
+
* @param {String} [type=undefined]
|
|
13
|
+
* @returns {Array<ModdleElement>}
|
|
14
|
+
*/
|
|
15
|
+
export function getExtensionElementsList(element, type = undefined) {
|
|
16
|
+
const businessObject = getBusinessObject(element),
|
|
17
|
+
extensionElements = businessObject.get('extensionElements');
|
|
18
|
+
|
|
19
|
+
if (!extensionElements) {
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const values = extensionElements.get('values');
|
|
24
|
+
|
|
25
|
+
if (!values || !values.length) {
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (type) {
|
|
30
|
+
return values.filter(value => is(value, type));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return values;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Remove one or more extension elements. Remove bpmn:ExtensionElements afterwards if it's empty.
|
|
38
|
+
*
|
|
39
|
+
* @param {ModdleElement} element
|
|
40
|
+
* @param {ModdleElement} businessObject
|
|
41
|
+
* @param {ModdleElement|Array<ModdleElement>} extensionElementsToRemove
|
|
42
|
+
* @param {CommandStack} commandStack
|
|
43
|
+
*/
|
|
44
|
+
export function removeExtensionElements(element, businessObject, extensionElementsToRemove, commandStack) {
|
|
45
|
+
if (!isArray(extensionElementsToRemove)) {
|
|
46
|
+
extensionElementsToRemove = [ extensionElementsToRemove ];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const extensionElements = businessObject.get('extensionElements'),
|
|
50
|
+
values = extensionElements.get('values').filter(value => !extensionElementsToRemove.includes(value));
|
|
51
|
+
|
|
52
|
+
commandStack.execute('element.updateModdleProperties', {
|
|
53
|
+
element,
|
|
54
|
+
moddleElement: extensionElements,
|
|
55
|
+
properties: {
|
|
56
|
+
values
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "camunda-bpmn-js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0-alpha.2",
|
|
4
4
|
"description": "Embeddable Camunda modeling distributions based on bpmn-js",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -40,17 +40,17 @@
|
|
|
40
40
|
"license": "MIT",
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@bpmn-io/align-to-origin": "^0.7.0",
|
|
43
|
-
"bpmn-
|
|
43
|
+
"@bpmn-io/properties-panel": "^0.10.2",
|
|
44
|
+
"bpmn-js": "^9.0.0-alpha.2",
|
|
44
45
|
"bpmn-js-disable-collapsed-subprocess": "^0.1.3",
|
|
45
46
|
"bpmn-js-executable-fix": "^0.1.3",
|
|
46
|
-
"bpmn-js-properties-panel": "
|
|
47
|
-
"bpmn-js-signavio-compat": "^1.2.3",
|
|
47
|
+
"bpmn-js-properties-panel": "~1.0.0-alpha.3",
|
|
48
48
|
"camunda-bpmn-moddle": "^6.1.1",
|
|
49
|
-
"diagram-js": "^
|
|
50
|
-
"diagram-js-minimap": "^2.0
|
|
49
|
+
"diagram-js": "^8.1.1",
|
|
50
|
+
"diagram-js-minimap": "^2.1.0",
|
|
51
51
|
"diagram-js-origin": "^1.3.2",
|
|
52
52
|
"inherits": "^2.0.4",
|
|
53
|
-
"min-dash": "^3.
|
|
53
|
+
"min-dash": "^3.8.1",
|
|
54
54
|
"zeebe-bpmn-moddle": "^0.10.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"@rollup/plugin-node-resolve": "^11.1.1",
|
|
60
60
|
"chai": "^4.2.0",
|
|
61
61
|
"cross-env": "^7.0.3",
|
|
62
|
-
"eslint": "^7.
|
|
63
|
-
"eslint-plugin-bpmn-io": "^0.
|
|
62
|
+
"eslint": "^7.32.0",
|
|
63
|
+
"eslint-plugin-bpmn-io": "^0.13.0",
|
|
64
64
|
"execa": "^5.0.0",
|
|
65
65
|
"istanbul-instrumenter-loader": "^3.0.1",
|
|
66
66
|
"karma": "^6.3.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"karma-sinon-chai": "^2.0.2",
|
|
76
76
|
"karma-webpack": "^5.0.0",
|
|
77
77
|
"min-dom": "^3.1.3",
|
|
78
|
-
"mocha": "^9.
|
|
78
|
+
"mocha": "^9.2.0",
|
|
79
79
|
"mocha-test-container-support": "^0.2.0",
|
|
80
80
|
"npm-run-all": "^4.1.5",
|
|
81
81
|
"puppeteer": "^8.0.0",
|
package/styles/base-modeler.css
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
@import './base-modeler.css';
|
|
1
|
+
@import './base-modeler.css';
|
|
2
|
+
@import './element-templates.css';
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import PropertiesActivator from 'bpmn-js-properties-panel/lib/PropertiesActivator';
|
|
2
|
-
|
|
3
|
-
import idProps from 'bpmn-js-properties-panel/lib/provider/bpmn/parts/IdProps';
|
|
4
|
-
|
|
5
|
-
import nameProps from 'bpmn-js-properties-panel/lib/provider/bpmn/parts/NameProps';
|
|
6
|
-
|
|
7
|
-
import processProps from 'bpmn-js-properties-panel/lib/provider/bpmn/parts/ProcessProps';
|
|
8
|
-
|
|
9
|
-
import executableProps from 'bpmn-js-properties-panel/lib/provider/bpmn/parts/ExecutableProps';
|
|
10
|
-
|
|
11
|
-
import inputOutput from './parts/InputOutputProps';
|
|
12
|
-
|
|
13
|
-
import headers from './parts/HeadersProps';
|
|
14
|
-
|
|
15
|
-
import taskDefinition from './parts/TaskDefinitionProps';
|
|
16
|
-
|
|
17
|
-
import sequenceFlowProps from './parts/SequenceFlowProps';
|
|
18
|
-
|
|
19
|
-
import messageProps from './parts/MessageProps';
|
|
20
|
-
|
|
21
|
-
import timerProps from './parts/TimerEventProps';
|
|
22
|
-
|
|
23
|
-
import multiInstanceProps from './parts/MultiInstanceProps';
|
|
24
|
-
|
|
25
|
-
import errorProps from './parts/ErrorProps';
|
|
26
|
-
|
|
27
|
-
import callActivityProps from './parts/CallActivityProps';
|
|
28
|
-
|
|
29
|
-
import formProps from './parts/FormProps';
|
|
30
|
-
|
|
31
|
-
import { is } from 'bpmn-js/lib/util/ModelUtil';
|
|
32
|
-
|
|
33
|
-
function getIdOptions(element) {
|
|
34
|
-
if (is(element, 'bpmn:Participant')) {
|
|
35
|
-
return { id: 'participant-id', label: 'Participant Id' };
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function getNameOptions(element) {
|
|
40
|
-
if (is(element, 'bpmn:Participant')) {
|
|
41
|
-
return { id: 'participant-name', label: 'Participant Name' };
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function createGeneralTabGroups(element, bpmnFactory, canvas, translate) {
|
|
46
|
-
const generalGroup = {
|
|
47
|
-
id: 'general',
|
|
48
|
-
label: translate('General'),
|
|
49
|
-
entries: []
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
idProps(generalGroup, element, translate, getIdOptions(element));
|
|
53
|
-
nameProps(generalGroup, element, bpmnFactory, canvas, translate, getNameOptions(element));
|
|
54
|
-
processProps(generalGroup, element, translate);
|
|
55
|
-
executableProps(generalGroup, element, translate);
|
|
56
|
-
|
|
57
|
-
const detailsGroup = {
|
|
58
|
-
id: 'details',
|
|
59
|
-
label: translate('Details'),
|
|
60
|
-
entries: []
|
|
61
|
-
};
|
|
62
|
-
taskDefinition(detailsGroup, element, bpmnFactory, translate);
|
|
63
|
-
sequenceFlowProps(detailsGroup, element, bpmnFactory, translate);
|
|
64
|
-
messageProps(detailsGroup, element, bpmnFactory, translate);
|
|
65
|
-
timerProps(detailsGroup, element, bpmnFactory, translate);
|
|
66
|
-
errorProps(detailsGroup, element, bpmnFactory, translate);
|
|
67
|
-
callActivityProps(detailsGroup, element, bpmnFactory, translate);
|
|
68
|
-
|
|
69
|
-
const multiInstanceGroup = {
|
|
70
|
-
id: 'multiInstance',
|
|
71
|
-
label: translate('Multi Instance'),
|
|
72
|
-
entries: []
|
|
73
|
-
};
|
|
74
|
-
multiInstanceProps(multiInstanceGroup, element, bpmnFactory, translate);
|
|
75
|
-
|
|
76
|
-
return [
|
|
77
|
-
generalGroup,
|
|
78
|
-
detailsGroup,
|
|
79
|
-
multiInstanceGroup
|
|
80
|
-
];
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function createFormsGroups(element, bpmnFactory, translate) {
|
|
84
|
-
|
|
85
|
-
const formsGroups = {
|
|
86
|
-
id: 'forms-properties',
|
|
87
|
-
label: translate('Forms'),
|
|
88
|
-
entries: []
|
|
89
|
-
};
|
|
90
|
-
formProps(formsGroups, element, bpmnFactory, translate);
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return [
|
|
94
|
-
formsGroups
|
|
95
|
-
];
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function createHeadersGroups(element, bpmnFactory, translate) {
|
|
99
|
-
|
|
100
|
-
const headersGroup = {
|
|
101
|
-
id: 'headers-properties',
|
|
102
|
-
label: translate('Headers'),
|
|
103
|
-
entries: []
|
|
104
|
-
};
|
|
105
|
-
headers(headersGroup, element, bpmnFactory, translate);
|
|
106
|
-
|
|
107
|
-
return [
|
|
108
|
-
headersGroup
|
|
109
|
-
];
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
function createInputOutputTabGroups(element, bpmnFactory, translate) {
|
|
114
|
-
|
|
115
|
-
const inputGroup = {
|
|
116
|
-
id: 'input',
|
|
117
|
-
label: translate('Input Parameters'),
|
|
118
|
-
entries: []
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
inputOutput(inputGroup, element, bpmnFactory, translate, {
|
|
122
|
-
type: 'zeebe:Input',
|
|
123
|
-
prop: 'inputParameters',
|
|
124
|
-
prefix: 'input'
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
const outputGroup = {
|
|
128
|
-
id: 'output',
|
|
129
|
-
label: translate('Output Parameters'),
|
|
130
|
-
entries: []
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
inputOutput(outputGroup, element, bpmnFactory, translate, {
|
|
134
|
-
type: 'zeebe:Output',
|
|
135
|
-
prop: 'outputParameters',
|
|
136
|
-
prefix: 'output'
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
return [
|
|
140
|
-
inputGroup,
|
|
141
|
-
outputGroup
|
|
142
|
-
];
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export default class ZeebePropertiesProvider extends PropertiesActivator {
|
|
146
|
-
constructor(eventBus, bpmnFactory, canvas, translate) {
|
|
147
|
-
|
|
148
|
-
super(eventBus);
|
|
149
|
-
|
|
150
|
-
this._bpmnFactory = bpmnFactory;
|
|
151
|
-
this._canvas = canvas;
|
|
152
|
-
this._translate = translate;
|
|
153
|
-
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
getTabs(element) {
|
|
157
|
-
const generalTab = {
|
|
158
|
-
id: 'general',
|
|
159
|
-
label: this._translate('General'),
|
|
160
|
-
groups: createGeneralTabGroups(
|
|
161
|
-
element, this._bpmnFactory, this._canvas, this._translate)
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
const formsTab = {
|
|
165
|
-
id: 'forms',
|
|
166
|
-
label: this._translate('Forms'),
|
|
167
|
-
groups: createFormsGroups(
|
|
168
|
-
element, this._bpmnFactory, this._translate
|
|
169
|
-
)
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
const inputOutputTab = {
|
|
173
|
-
id: 'input-output',
|
|
174
|
-
label: this._translate('Input/Output'),
|
|
175
|
-
groups: createInputOutputTabGroups(
|
|
176
|
-
element, this._bpmnFactory, this._translate)
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
const headersTab = {
|
|
180
|
-
id: 'headers',
|
|
181
|
-
label: this._translate('Headers'),
|
|
182
|
-
groups: createHeadersGroups(
|
|
183
|
-
element, this._bpmnFactory, this._translate)
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
return [
|
|
187
|
-
generalTab,
|
|
188
|
-
formsTab,
|
|
189
|
-
inputOutputTab,
|
|
190
|
-
headersTab
|
|
191
|
-
];
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
ZeebePropertiesProvider.$inject = [
|
|
197
|
-
'eventBus',
|
|
198
|
-
'bpmnFactory',
|
|
199
|
-
'canvas',
|
|
200
|
-
'translate'
|
|
201
|
-
];
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import translate from 'diagram-js/lib/i18n/translate';
|
|
2
|
-
|
|
3
|
-
import ZeebePropertiesProvider from './ZeebePropertiesProvider';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
__depends__: [
|
|
7
|
-
translate
|
|
8
|
-
],
|
|
9
|
-
__init__: [ 'propertiesProvider' ],
|
|
10
|
-
propertiesProvider: [ 'type', ZeebePropertiesProvider ]
|
|
11
|
-
};
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import elementHelper from 'bpmn-js-properties-panel/lib/helper/ElementHelper';
|
|
2
|
-
|
|
3
|
-
import cmdHelper from 'bpmn-js-properties-panel/lib/helper/CmdHelper';
|
|
4
|
-
|
|
5
|
-
import { isIdValid } from 'bpmn-js-properties-panel/lib/Utils';
|
|
6
|
-
|
|
7
|
-
import { getCalledElement } from '../../../helper/CalledElementHelper';
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
is,
|
|
11
|
-
getBusinessObject
|
|
12
|
-
} from 'bpmn-js/lib/util/ModelUtil';
|
|
13
|
-
|
|
14
|
-
import entryFactory from 'bpmn-js-properties-panel/lib/factory/EntryFactory';
|
|
15
|
-
|
|
16
|
-
export default function(group, element, bpmnFactory, translate) {
|
|
17
|
-
|
|
18
|
-
if (!is(element, 'bpmn:CallActivity')) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function getProperty(element, propertyName) {
|
|
23
|
-
const businessObject = getBusinessObject(element),
|
|
24
|
-
calledElement = getCalledElement(businessObject);
|
|
25
|
-
|
|
26
|
-
return calledElement ? calledElement.get(propertyName) : '';
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function setProperties(element, values) {
|
|
30
|
-
|
|
31
|
-
const businessObject = getBusinessObject(element),
|
|
32
|
-
commands = [];
|
|
33
|
-
|
|
34
|
-
// ensure extensionElements
|
|
35
|
-
let extensionElements = businessObject.get('extensionElements');
|
|
36
|
-
if (!extensionElements) {
|
|
37
|
-
extensionElements = elementHelper.createElement('bpmn:ExtensionElements', { values: [] }, businessObject, bpmnFactory);
|
|
38
|
-
commands.push(cmdHelper.updateBusinessObject(element, businessObject, { extensionElements: extensionElements }));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// ensure zeebe:calledElement
|
|
42
|
-
let calledElement = getCalledElement(businessObject);
|
|
43
|
-
if (!calledElement) {
|
|
44
|
-
calledElement = elementHelper.createElement('zeebe:CalledElement', { }, extensionElements, bpmnFactory);
|
|
45
|
-
commands.push(cmdHelper.addAndRemoveElementsFromList(
|
|
46
|
-
element,
|
|
47
|
-
extensionElements,
|
|
48
|
-
'values',
|
|
49
|
-
'extensionElements',
|
|
50
|
-
[ calledElement ],
|
|
51
|
-
[]
|
|
52
|
-
));
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// update properties
|
|
56
|
-
commands.push(cmdHelper.updateBusinessObject(element, calledElement, values));
|
|
57
|
-
return commands;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// properties /////////////////////////////////////////////////////////////////
|
|
61
|
-
|
|
62
|
-
group.entries.push(entryFactory.validationAwareTextField(translate, {
|
|
63
|
-
id: 'process-id',
|
|
64
|
-
label: translate('Process Id'),
|
|
65
|
-
modelProperty: 'processId',
|
|
66
|
-
|
|
67
|
-
getProperty: function(element) {
|
|
68
|
-
return getProperty(element, 'processId');
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
setProperty: function(element, values) {
|
|
72
|
-
return setProperties(element, {
|
|
73
|
-
processId: values.processId || undefined
|
|
74
|
-
});
|
|
75
|
-
},
|
|
76
|
-
validate: function(element, values) {
|
|
77
|
-
var idValue = values.processId;
|
|
78
|
-
var bo = getBusinessObject(element);
|
|
79
|
-
|
|
80
|
-
// pass on expression statements
|
|
81
|
-
if (/^=/.test(idValue || '')) {
|
|
82
|
-
return {};
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
var idError = isIdValid(bo, idValue, translate);
|
|
86
|
-
|
|
87
|
-
return idError ? { processId: idError } : {};
|
|
88
|
-
}
|
|
89
|
-
}));
|
|
90
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import eventDefinitionHelper from 'bpmn-js-properties-panel/lib/helper/EventDefinitionHelper';
|
|
2
|
-
|
|
3
|
-
import error from 'bpmn-js-properties-panel/lib/provider/bpmn/parts/implementation/ErrorEventDefinition';
|
|
4
|
-
|
|
5
|
-
export default function(group, element, bpmnFactory, translate) {
|
|
6
|
-
|
|
7
|
-
const errorEventDefinition = eventDefinitionHelper.getErrorEventDefinition(element);
|
|
8
|
-
|
|
9
|
-
if (errorEventDefinition) {
|
|
10
|
-
error(group, element, bpmnFactory, errorEventDefinition, translate);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isAny
|
|
3
|
-
} from 'bpmn-js/lib/features/modeling/util/ModelingUtil';
|
|
4
|
-
|
|
5
|
-
import formDefinition from './implementation/FormDefinition';
|
|
6
|
-
|
|
7
|
-
export default function(group, element, bpmnFactory, translate) {
|
|
8
|
-
|
|
9
|
-
if (!isAny(element, [ 'bpmn:UserTask' ])) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
group.entries = group.entries.concat(formDefinition(element, bpmnFactory, translate));
|
|
14
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import properties from './implementation/Headers';
|
|
2
|
-
|
|
3
|
-
import elementHelper from 'bpmn-js-properties-panel/lib/helper/ElementHelper';
|
|
4
|
-
|
|
5
|
-
import cmdHelper from 'bpmn-js-properties-panel/lib/helper/CmdHelper';
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
is
|
|
9
|
-
} from 'bpmn-js/lib/util/ModelUtil';
|
|
10
|
-
|
|
11
|
-
import {
|
|
12
|
-
isZeebeServiceTask
|
|
13
|
-
} from '../../../helper/ZeebeServiceTaskHelper.js';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export default function(group, element, bpmnFactory, translate) {
|
|
17
|
-
|
|
18
|
-
if (!canHaveHeaders(element)) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const propertiesEntry = properties(element, bpmnFactory, translate, {
|
|
23
|
-
id: 'headers',
|
|
24
|
-
modelProperties: [ 'key', 'value' ],
|
|
25
|
-
labels: [ translate('Key'), translate('Value') ],
|
|
26
|
-
|
|
27
|
-
getParent: function(element, node, bo) {
|
|
28
|
-
return bo.extensionElements;
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
createParent: function(element, bo) {
|
|
32
|
-
const parent = elementHelper.createElement('bpmn:ExtensionElements', { values: [] }, bo, bpmnFactory);
|
|
33
|
-
const cmd = cmdHelper.updateBusinessObject(element, bo, { extensionElements: parent });
|
|
34
|
-
return {
|
|
35
|
-
cmd: cmd,
|
|
36
|
-
parent: parent
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
if (propertiesEntry) {
|
|
42
|
-
group.entries.push(propertiesEntry);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
// helpers ////////////////
|
|
49
|
-
|
|
50
|
-
function canHaveHeaders(element) {
|
|
51
|
-
return is(element, 'bpmn:UserTask') || isZeebeServiceTask(element);
|
|
52
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import inputOutput from './implementation/InputOutput';
|
|
2
|
-
|
|
3
|
-
export default function(group, element, bpmnFactory, translate, options) {
|
|
4
|
-
|
|
5
|
-
const inputOutputEntry = inputOutput(element, bpmnFactory, translate, options);
|
|
6
|
-
|
|
7
|
-
group.entries = group.entries.concat(inputOutputEntry.entries);
|
|
8
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getBusinessObject,
|
|
3
|
-
is
|
|
4
|
-
} from 'bpmn-js/lib/util/ModelUtil';
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
isEventSubProcess
|
|
8
|
-
} from 'bpmn-js/lib/util/DiUtil';
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
isZeebeServiceTask
|
|
12
|
-
} from '../../../helper/ZeebeServiceTaskHelper.js';
|
|
13
|
-
|
|
14
|
-
import eventDefinitionHelper from 'bpmn-js-properties-panel/lib/helper/EventDefinitionHelper';
|
|
15
|
-
|
|
16
|
-
import message from 'bpmn-js-properties-panel/lib/provider/bpmn/parts/implementation/MessageEventDefinition';
|
|
17
|
-
|
|
18
|
-
import referenceExtensionElementProperty from './implementation/ElementReferenceExtensionElementProperty';
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export default function(group, element, bpmnFactory, translate) {
|
|
22
|
-
|
|
23
|
-
const messageEventDefinition = eventDefinitionHelper.getMessageEventDefinition(element),
|
|
24
|
-
parent = element.parent;
|
|
25
|
-
|
|
26
|
-
if (is(element, 'bpmn:ReceiveTask')) {
|
|
27
|
-
message(group, element, bpmnFactory, getBusinessObject(element), translate);
|
|
28
|
-
group.entries = group.entries.concat(referenceExtensionElementProperty(element, getBusinessObject(element), bpmnFactory, translate, {
|
|
29
|
-
id: 'message-element-subscription',
|
|
30
|
-
label: translate('Subscription Correlation Key'),
|
|
31
|
-
referenceProperty: 'messageRef',
|
|
32
|
-
modelProperty: 'correlationKey',
|
|
33
|
-
extensionElement: 'zeebe:Subscription',
|
|
34
|
-
shouldValidate: true
|
|
35
|
-
}));
|
|
36
|
-
} else if (messageEventDefinition && !isZeebeServiceTask(element)) {
|
|
37
|
-
message(group, element, bpmnFactory, messageEventDefinition, translate);
|
|
38
|
-
if (!is(element, 'bpmn:StartEvent') || isEventSubProcess(parent)) {
|
|
39
|
-
|
|
40
|
-
group.entries = group.entries.concat(referenceExtensionElementProperty(element, messageEventDefinition, bpmnFactory, translate, {
|
|
41
|
-
id: 'message-element-subscription',
|
|
42
|
-
label: translate('Subscription Correlation Key'),
|
|
43
|
-
referenceProperty: 'messageRef',
|
|
44
|
-
modelProperty: 'correlationKey',
|
|
45
|
-
extensionElement: 'zeebe:Subscription',
|
|
46
|
-
shouldValidate: true
|
|
47
|
-
}));
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getBusinessObject
|
|
3
|
-
} from 'bpmn-js/lib/util/ModelUtil';
|
|
4
|
-
|
|
5
|
-
import multiInstanceLoopCharacteristics from './implementation/MultiInstanceLoopCharacteristics';
|
|
6
|
-
|
|
7
|
-
export default function(group, element, bpmnFactory, translate) {
|
|
8
|
-
|
|
9
|
-
if (!ensureMultiInstanceSupported(element)) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
group.entries = group.entries.concat(multiInstanceLoopCharacteristics(element, bpmnFactory, translate));
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// helpers //////////////
|
|
17
|
-
|
|
18
|
-
function getLoopCharacteristics(element) {
|
|
19
|
-
const bo = getBusinessObject(element);
|
|
20
|
-
return bo.loopCharacteristics;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function ensureMultiInstanceSupported(element) {
|
|
24
|
-
return !!getLoopCharacteristics(element);
|
|
25
|
-
}
|