@eclipse-glsp-examples/workflow-server 2.2.0-next.92 → 2.2.0-next.94
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/lib/browser/app.d.ts +1 -1
- package/lib/browser/app.js +1 -1
- package/lib/common/handler/create-decision-node-handler.d.ts +1 -1
- package/lib/common/handler/create-decision-node-handler.js +1 -1
- package/lib/common/handler/create-merge-node-handler.d.ts +1 -1
- package/lib/common/handler/create-merge-node-handler.js +1 -1
- package/lib/common/workflow-diagram-configuration.d.ts +7 -1
- package/lib/common/workflow-diagram-configuration.d.ts.map +1 -1
- package/lib/common/workflow-diagram-configuration.js +16 -28
- package/lib/common/workflow-diagram-configuration.js.map +1 -1
- package/lib/common/workflow-edge-creation-checker.d.ts +1 -1
- package/lib/common/workflow-edge-creation-checker.js +1 -1
- package/lib/node/app.d.ts +1 -1
- package/lib/node/app.js +1 -1
- package/package.json +4 -4
- package/src/browser/app.ts +1 -1
- package/src/common/handler/create-decision-node-handler.ts +1 -1
- package/src/common/handler/create-merge-node-handler.ts +1 -1
- package/src/common/workflow-diagram-configuration.ts +21 -20
- package/src/common/workflow-edge-creation-checker.ts +2 -2
- package/src/node/app.ts +1 -1
package/lib/browser/app.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
package/lib/browser/app.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.launch = void 0;
|
|
4
4
|
/********************************************************************************
|
|
5
|
-
* Copyright (c) 2022-
|
|
5
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
6
6
|
*
|
|
7
7
|
* This program and the accompanying materials are made available under the
|
|
8
8
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -8,7 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.CreateDecisionNodeHandler = void 0;
|
|
10
10
|
/********************************************************************************
|
|
11
|
-
* Copyright (c) 2022-
|
|
11
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
12
12
|
*
|
|
13
13
|
* This program and the accompanying materials are made available under the
|
|
14
14
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -8,7 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.CreateMergeNodeHandler = void 0;
|
|
10
10
|
/********************************************************************************
|
|
11
|
-
* Copyright (c) 2022-
|
|
11
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
12
12
|
*
|
|
13
13
|
* This program and the accompanying materials are made available under the
|
|
14
14
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -23,6 +23,12 @@ export declare class WorkflowDiagramConfiguration implements DiagramConfiguratio
|
|
|
23
23
|
needsClientLayout: boolean;
|
|
24
24
|
animatedUpdate: boolean;
|
|
25
25
|
}
|
|
26
|
+
export declare function createDefaultShapeTypeHint(template: {
|
|
27
|
+
elementTypeId: string;
|
|
28
|
+
} & Partial<ShapeTypeHint>): ShapeTypeHint;
|
|
26
29
|
export declare function createDefaultShapeTypeHint(elementId: string): ShapeTypeHint;
|
|
30
|
+
export declare function createDefaultEdgeTypeHint(template: {
|
|
31
|
+
elementTypeId: string;
|
|
32
|
+
} & Partial<EdgeTypeHint>): EdgeTypeHint;
|
|
27
33
|
export declare function createDefaultEdgeTypeHint(elementId: string): EdgeTypeHint;
|
|
28
34
|
//# sourceMappingURL=workflow-diagram-configuration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-diagram-configuration.d.ts","sourceRoot":"","sources":["../../src/common/workflow-diagram-configuration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAgB,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EACH,oBAAoB,EAIpB,wBAAwB,EACxB,gBAAgB,EAEnB,MAAM,sBAAsB,CAAC;AAK9B,qBACa,4BAA6B,YAAW,oBAAoB;IACrE,IAAI,WAAW,IAAI,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAavD;IAED,IAAI,cAAc,IAAI,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"workflow-diagram-configuration.d.ts","sourceRoot":"","sources":["../../src/common/workflow-diagram-configuration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAgB,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EACH,oBAAoB,EAIpB,wBAAwB,EACxB,gBAAgB,EAEnB,MAAM,sBAAsB,CAAC;AAK9B,qBACa,4BAA6B,YAAW,oBAAoB;IACrE,IAAI,WAAW,IAAI,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAavD;IAED,IAAI,cAAc,IAAI,aAAa,EAAE,CAapC;IAED,IAAI,aAAa,IAAI,YAAY,EAAE,CAUlC;IAED,UAAU,mBAA2B;IACrC,iBAAiB,UAAQ;IACzB,cAAc,UAAQ;CACzB;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAC;AACxH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,CAAC;AAQ7E,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,YAAY,CAAC,GAAG,YAAY,CAAC;AACrH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,CAAC"}
|
|
@@ -8,7 +8,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.createDefaultEdgeTypeHint = exports.createDefaultShapeTypeHint = exports.WorkflowDiagramConfiguration = void 0;
|
|
10
10
|
/********************************************************************************
|
|
11
|
-
* Copyright (c) 2022-
|
|
11
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
12
12
|
*
|
|
13
13
|
* This program and the accompanying materials are made available under the
|
|
14
14
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -51,32 +51,25 @@ let WorkflowDiagramConfiguration = class WorkflowDiagramConfiguration {
|
|
|
51
51
|
return [
|
|
52
52
|
createDefaultShapeTypeHint(model_types_1.ModelTypes.MANUAL_TASK),
|
|
53
53
|
createDefaultShapeTypeHint(model_types_1.ModelTypes.AUTOMATED_TASK),
|
|
54
|
-
createDefaultShapeTypeHint(model_types_1.ModelTypes.FORK_NODE),
|
|
55
|
-
createDefaultShapeTypeHint(model_types_1.ModelTypes.JOIN_NODE),
|
|
54
|
+
createDefaultShapeTypeHint({ elementTypeId: model_types_1.ModelTypes.FORK_NODE, resizable: false }),
|
|
55
|
+
createDefaultShapeTypeHint({ elementTypeId: model_types_1.ModelTypes.JOIN_NODE, resizable: false }),
|
|
56
56
|
createDefaultShapeTypeHint(model_types_1.ModelTypes.DECISION_NODE),
|
|
57
57
|
createDefaultShapeTypeHint(model_types_1.ModelTypes.MERGE_NODE),
|
|
58
|
-
{
|
|
58
|
+
createDefaultShapeTypeHint({
|
|
59
59
|
elementTypeId: model_types_1.ModelTypes.CATEGORY,
|
|
60
|
-
repositionable: true,
|
|
61
|
-
deletable: true,
|
|
62
|
-
resizable: true,
|
|
63
|
-
reparentable: true,
|
|
64
60
|
containableElementTypeIds: [model_types_1.ModelTypes.TASK, model_types_1.ModelTypes.ACTIVITY_NODE, model_types_1.ModelTypes.CATEGORY]
|
|
65
|
-
}
|
|
61
|
+
})
|
|
66
62
|
];
|
|
67
63
|
}
|
|
68
64
|
get edgeTypeHints() {
|
|
69
65
|
return [
|
|
70
66
|
createDefaultEdgeTypeHint(protocol_1.DefaultTypes.EDGE),
|
|
71
|
-
{
|
|
72
|
-
elementTypeId:
|
|
73
|
-
repositionable: true,
|
|
74
|
-
deletable: true,
|
|
75
|
-
routable: true,
|
|
67
|
+
createDefaultEdgeTypeHint({
|
|
68
|
+
elementTypeId: protocol_1.DefaultTypes.EDGE,
|
|
76
69
|
dynamic: true,
|
|
77
70
|
sourceElementTypeIds: [model_types_1.ModelTypes.ACTIVITY_NODE],
|
|
78
71
|
targetElementTypeIds: [model_types_1.ModelTypes.TASK, model_types_1.ModelTypes.ACTIVITY_NODE]
|
|
79
|
-
}
|
|
72
|
+
})
|
|
80
73
|
];
|
|
81
74
|
}
|
|
82
75
|
};
|
|
@@ -84,17 +77,14 @@ exports.WorkflowDiagramConfiguration = WorkflowDiagramConfiguration;
|
|
|
84
77
|
exports.WorkflowDiagramConfiguration = WorkflowDiagramConfiguration = __decorate([
|
|
85
78
|
(0, inversify_1.injectable)()
|
|
86
79
|
], WorkflowDiagramConfiguration);
|
|
87
|
-
function createDefaultShapeTypeHint(
|
|
88
|
-
|
|
80
|
+
function createDefaultShapeTypeHint(elementIdOrTemplate) {
|
|
81
|
+
const template = typeof elementIdOrTemplate === 'string' ? { elementTypeId: elementIdOrTemplate } : elementIdOrTemplate;
|
|
82
|
+
return Object.assign({ repositionable: true, deletable: true, resizable: true, reparentable: true }, template);
|
|
89
83
|
}
|
|
90
84
|
exports.createDefaultShapeTypeHint = createDefaultShapeTypeHint;
|
|
91
|
-
function createDefaultEdgeTypeHint(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
repositionable: true,
|
|
95
|
-
deletable: true,
|
|
96
|
-
routable: true,
|
|
97
|
-
sourceElementTypeIds: [
|
|
85
|
+
function createDefaultEdgeTypeHint(elementIdOrTemplate) {
|
|
86
|
+
const template = typeof elementIdOrTemplate === 'string' ? { elementTypeId: elementIdOrTemplate } : elementIdOrTemplate;
|
|
87
|
+
return Object.assign({ repositionable: true, deletable: true, routable: true, sourceElementTypeIds: [
|
|
98
88
|
model_types_1.ModelTypes.MANUAL_TASK,
|
|
99
89
|
model_types_1.ModelTypes.AUTOMATED_TASK,
|
|
100
90
|
model_types_1.ModelTypes.DECISION_NODE,
|
|
@@ -102,8 +92,7 @@ function createDefaultEdgeTypeHint(elementId) {
|
|
|
102
92
|
model_types_1.ModelTypes.FORK_NODE,
|
|
103
93
|
model_types_1.ModelTypes.JOIN_NODE,
|
|
104
94
|
model_types_1.ModelTypes.CATEGORY
|
|
105
|
-
],
|
|
106
|
-
targetElementTypeIds: [
|
|
95
|
+
], targetElementTypeIds: [
|
|
107
96
|
model_types_1.ModelTypes.MANUAL_TASK,
|
|
108
97
|
model_types_1.ModelTypes.AUTOMATED_TASK,
|
|
109
98
|
model_types_1.ModelTypes.DECISION_NODE,
|
|
@@ -111,8 +100,7 @@ function createDefaultEdgeTypeHint(elementId) {
|
|
|
111
100
|
model_types_1.ModelTypes.FORK_NODE,
|
|
112
101
|
model_types_1.ModelTypes.JOIN_NODE,
|
|
113
102
|
model_types_1.ModelTypes.CATEGORY
|
|
114
|
-
]
|
|
115
|
-
};
|
|
103
|
+
] }, template);
|
|
116
104
|
}
|
|
117
105
|
exports.createDefaultEdgeTypeHint = createDefaultEdgeTypeHint;
|
|
118
106
|
//# sourceMappingURL=workflow-diagram-configuration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-diagram-configuration.js","sourceRoot":"","sources":["../../src/common/workflow-diagram-configuration.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAmF;AACnF,iDAQ8B;AAC9B,yCAAuC;AACvC,uDAAqE;AACrE,oDAAyD;AAGlD,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAAlC;
|
|
1
|
+
{"version":3,"file":"workflow-diagram-configuration.js","sourceRoot":"","sources":["../../src/common/workflow-diagram-configuration.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,qDAAmF;AACnF,iDAQ8B;AAC9B,yCAAuC;AACvC,uDAAqE;AACrE,oDAAyD;AAGlD,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAAlC;QA2CH,eAAU,GAAG,yBAAgB,CAAC,MAAM,CAAC;QACrC,sBAAiB,GAAG,IAAI,CAAC;QACzB,mBAAc,GAAG,IAAI,CAAC;IAC1B,CAAC;IA7CG,IAAI,WAAW;QACX,MAAM,OAAO,GAAG,IAAA,0BAAiB,GAAE,CAAC;QACpC,OAAO,CAAC,GAAG,CAAC,wBAAK,CAAC,aAAa,EAAE,eAA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AK,CAAC,SAAS;YACf,wBAAK,CAAC,QAAQ;SACjB,EACD,oBAAoB,EAAE;YAClB,wBAAK,CAAC,WAAW;YACjB,wBAAK,CAAC,cAAc;YACpB,wBAAK,CAAC,aAAa;YACnB,wBAAK,CAAC,UAAU;YAChB,wBAAK,CAAC,SAAS;YACf,wBAAK,CAAC,SAAS;YACf,wBAAK,CAAC,QAAQ;SACjB,IACE,QAAQ,EACb;AACN,CAAC;AA1BD,8DA0BC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2023-2024 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -12,7 +12,7 @@ const graph_extension_1 = require("./graph-extension");
|
|
|
12
12
|
const model_types_1 = require("./util/model-types");
|
|
13
13
|
let WorkflowEdgeCreationChecker = class WorkflowEdgeCreationChecker {
|
|
14
14
|
isValidSource(edgeType, sourceElement) {
|
|
15
|
-
return edgeType !== model_types_1.ModelTypes.WEIGHTED_EDGE
|
|
15
|
+
return edgeType !== model_types_1.ModelTypes.WEIGHTED_EDGE && sourceElement.type === model_types_1.ModelTypes.DECISION_NODE;
|
|
16
16
|
}
|
|
17
17
|
isValidTarget(edgeType, sourceElement, targetElement) {
|
|
18
18
|
return (targetElement instanceof graph_extension_1.TaskNode || targetElement.type === model_types_1.ModelTypes.FORK_NODE || targetElement.type === model_types_1.ModelTypes.JOIN_NODE);
|
package/lib/node/app.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
package/lib/node/app.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
/********************************************************************************
|
|
4
|
-
* Copyright (c) 2022-
|
|
4
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
5
5
|
*
|
|
6
6
|
* This program and the accompanying materials are made available under the
|
|
7
7
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp-examples/workflow-server",
|
|
3
|
-
"version": "2.2.0-next.
|
|
3
|
+
"version": "2.2.0-next.94+d7e90ed",
|
|
4
4
|
"description": "GLSP node server for the workflow example",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eclipse",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"watch:bundle": "webpack -w"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@eclipse-glsp/layout-elk": "2.2.0-next.
|
|
60
|
-
"@eclipse-glsp/server": "2.2.0-next.
|
|
59
|
+
"@eclipse-glsp/layout-elk": "2.2.0-next.94+d7e90ed",
|
|
60
|
+
"@eclipse-glsp/server": "2.2.0-next.94+d7e90ed",
|
|
61
61
|
"inversify": "^6.0.1"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "d7e90ed146e48d80fc8fce3392751380fc0c5736"
|
|
72
72
|
}
|
package/src/browser/app.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -48,33 +48,26 @@ export class WorkflowDiagramConfiguration implements DiagramConfiguration {
|
|
|
48
48
|
return [
|
|
49
49
|
createDefaultShapeTypeHint(types.MANUAL_TASK),
|
|
50
50
|
createDefaultShapeTypeHint(types.AUTOMATED_TASK),
|
|
51
|
-
createDefaultShapeTypeHint(types.FORK_NODE),
|
|
52
|
-
createDefaultShapeTypeHint(types.JOIN_NODE),
|
|
51
|
+
createDefaultShapeTypeHint({ elementTypeId: types.FORK_NODE, resizable: false }),
|
|
52
|
+
createDefaultShapeTypeHint({ elementTypeId: types.JOIN_NODE, resizable: false }),
|
|
53
53
|
createDefaultShapeTypeHint(types.DECISION_NODE),
|
|
54
54
|
createDefaultShapeTypeHint(types.MERGE_NODE),
|
|
55
|
-
{
|
|
55
|
+
createDefaultShapeTypeHint({
|
|
56
56
|
elementTypeId: types.CATEGORY,
|
|
57
|
-
repositionable: true,
|
|
58
|
-
deletable: true,
|
|
59
|
-
resizable: true,
|
|
60
|
-
reparentable: true,
|
|
61
57
|
containableElementTypeIds: [types.TASK, types.ACTIVITY_NODE, types.CATEGORY]
|
|
62
|
-
}
|
|
58
|
+
})
|
|
63
59
|
];
|
|
64
60
|
}
|
|
65
61
|
|
|
66
62
|
get edgeTypeHints(): EdgeTypeHint[] {
|
|
67
63
|
return [
|
|
68
64
|
createDefaultEdgeTypeHint(DefaultTypes.EDGE),
|
|
69
|
-
{
|
|
70
|
-
elementTypeId:
|
|
71
|
-
repositionable: true,
|
|
72
|
-
deletable: true,
|
|
73
|
-
routable: true,
|
|
65
|
+
createDefaultEdgeTypeHint({
|
|
66
|
+
elementTypeId: DefaultTypes.EDGE,
|
|
74
67
|
dynamic: true,
|
|
75
68
|
sourceElementTypeIds: [types.ACTIVITY_NODE],
|
|
76
69
|
targetElementTypeIds: [types.TASK, types.ACTIVITY_NODE]
|
|
77
|
-
}
|
|
70
|
+
})
|
|
78
71
|
];
|
|
79
72
|
}
|
|
80
73
|
|
|
@@ -83,13 +76,20 @@ export class WorkflowDiagramConfiguration implements DiagramConfiguration {
|
|
|
83
76
|
animatedUpdate = true;
|
|
84
77
|
}
|
|
85
78
|
|
|
86
|
-
export function createDefaultShapeTypeHint(
|
|
87
|
-
|
|
79
|
+
export function createDefaultShapeTypeHint(template: { elementTypeId: string } & Partial<ShapeTypeHint>): ShapeTypeHint;
|
|
80
|
+
export function createDefaultShapeTypeHint(elementId: string): ShapeTypeHint;
|
|
81
|
+
export function createDefaultShapeTypeHint(
|
|
82
|
+
elementIdOrTemplate: string | ({ elementTypeId: string } & Partial<ShapeTypeHint>)
|
|
83
|
+
): ShapeTypeHint {
|
|
84
|
+
const template = typeof elementIdOrTemplate === 'string' ? { elementTypeId: elementIdOrTemplate } : elementIdOrTemplate;
|
|
85
|
+
return { repositionable: true, deletable: true, resizable: true, reparentable: true, ...template };
|
|
88
86
|
}
|
|
89
87
|
|
|
90
|
-
export function createDefaultEdgeTypeHint(
|
|
88
|
+
export function createDefaultEdgeTypeHint(template: { elementTypeId: string } & Partial<EdgeTypeHint>): EdgeTypeHint;
|
|
89
|
+
export function createDefaultEdgeTypeHint(elementId: string): EdgeTypeHint;
|
|
90
|
+
export function createDefaultEdgeTypeHint(elementIdOrTemplate: string | ({ elementTypeId: string } & Partial<EdgeTypeHint>)): EdgeTypeHint {
|
|
91
|
+
const template = typeof elementIdOrTemplate === 'string' ? { elementTypeId: elementIdOrTemplate } : elementIdOrTemplate;
|
|
91
92
|
return {
|
|
92
|
-
elementTypeId: elementId,
|
|
93
93
|
repositionable: true,
|
|
94
94
|
deletable: true,
|
|
95
95
|
routable: true,
|
|
@@ -110,6 +110,7 @@ export function createDefaultEdgeTypeHint(elementId: string): EdgeTypeHint {
|
|
|
110
110
|
types.FORK_NODE,
|
|
111
111
|
types.JOIN_NODE,
|
|
112
112
|
types.CATEGORY
|
|
113
|
-
]
|
|
113
|
+
],
|
|
114
|
+
...template
|
|
114
115
|
};
|
|
115
116
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2023-2024 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -21,7 +21,7 @@ import { ModelTypes } from './util/model-types';
|
|
|
21
21
|
@injectable()
|
|
22
22
|
export class WorkflowEdgeCreationChecker implements EdgeCreationChecker {
|
|
23
23
|
isValidSource(edgeType: string, sourceElement: GModelElement): boolean {
|
|
24
|
-
return edgeType !== ModelTypes.WEIGHTED_EDGE
|
|
24
|
+
return edgeType !== ModelTypes.WEIGHTED_EDGE && sourceElement.type === ModelTypes.DECISION_NODE;
|
|
25
25
|
}
|
|
26
26
|
isValidTarget(edgeType: string, sourceElement: GModelElement, targetElement: GModelElement): boolean {
|
|
27
27
|
return (
|
package/src/node/app.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2024 STMicroelectronics and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|