@eclipse-glsp-examples/workflow-server 2.1.1 → 2.2.0-next.104
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.d.ts.map +1 -1
- package/lib/browser/app.js +6 -2
- package/lib/browser/app.js.map +1 -1
- package/lib/browser/example1.json +14 -50
- package/lib/browser/index.d.ts +2 -2
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +2 -2
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/reexport.d.ts +17 -0
- package/lib/browser/reexport.d.ts.map +1 -0
- package/lib/browser/reexport.js +33 -0
- package/lib/browser/reexport.js.map +1 -0
- package/lib/common/handler/create-activity-node-handler.d.ts +1 -1
- package/lib/common/handler/create-activity-node-handler.d.ts.map +1 -1
- package/lib/common/handler/create-activity-node-handler.js +2 -5
- package/lib/common/handler/create-activity-node-handler.js.map +1 -1
- package/lib/common/handler/create-decision-node-handler.d.ts +1 -1
- package/lib/common/handler/create-decision-node-handler.d.ts.map +1 -1
- package/lib/common/handler/create-decision-node-handler.js +17 -1
- package/lib/common/handler/create-decision-node-handler.js.map +1 -1
- package/lib/common/handler/create-merge-node-handler.d.ts +1 -1
- package/lib/common/handler/create-merge-node-handler.d.ts.map +1 -1
- package/lib/common/handler/create-merge-node-handler.js +17 -1
- package/lib/common/handler/create-merge-node-handler.js.map +1 -1
- package/lib/common/handler/create-workflow-node-operation-handler.js.map +1 -1
- package/lib/common/handler/grid-snapper.js.map +1 -1
- package/lib/common/index.d.ts +2 -2
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +2 -2
- package/lib/common/index.js.map +1 -1
- package/lib/common/labeledit/workflow-label-edit-validator.js.map +1 -1
- package/lib/common/marker/workflow-model-validator.js.map +1 -1
- package/lib/common/model/workflow-navigation-target-resolver.js.map +1 -1
- package/lib/common/provider/node-documentation-navigation-target-provider.d.ts.map +1 -1
- package/lib/common/provider/node-documentation-navigation-target-provider.js +1 -1
- package/lib/common/provider/node-documentation-navigation-target-provider.js.map +1 -1
- package/lib/common/provider/workflow-command-palette-action-provider.js.map +1 -1
- package/lib/common/provider/workflow-context-menu-item-provider.js.map +1 -1
- package/lib/common/taskedit/edit-task-operation-handler.js.map +1 -1
- package/lib/common/taskedit/task-edit-context-provider.js.map +1 -1
- package/lib/common/taskedit/task-edit-validator.js.map +1 -1
- package/lib/common/util/model-types.js.map +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 +15 -27
- 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/common/workflow-glsp-server.js.map +1 -1
- package/lib/common/workflow-popup-factory.d.ts +3 -2
- package/lib/common/workflow-popup-factory.d.ts.map +1 -1
- package/lib/common/workflow-popup-factory.js +1 -1
- package/lib/common/workflow-popup-factory.js.map +1 -1
- package/lib/node/app.d.ts +1 -1
- package/lib/node/app.js +9 -1
- package/lib/node/app.js.map +1 -1
- package/lib/node/index.d.ts +2 -2
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/index.js +2 -2
- package/lib/node/index.js.map +1 -1
- package/lib/node/reexport.d.ts +17 -0
- package/lib/node/reexport.d.ts.map +1 -0
- package/lib/node/reexport.js +33 -0
- package/lib/node/reexport.js.map +1 -0
- package/package.json +8 -8
- package/src/browser/.indexignore +4 -0
- package/src/browser/app.ts +6 -2
- package/src/browser/example1.json +15 -51
- package/src/browser/index.ts +2 -2
- package/src/browser/reexport.ts +16 -0
- package/src/common/handler/create-activity-node-handler.ts +2 -5
- package/src/common/handler/create-decision-node-handler.ts +3 -3
- package/src/common/handler/create-merge-node-handler.ts +3 -3
- package/src/common/index.ts +2 -2
- package/src/common/provider/node-documentation-navigation-target-provider.ts +2 -2
- package/src/common/workflow-diagram-configuration.ts +20 -19
- package/src/common/workflow-edge-creation-checker.ts +2 -2
- package/src/common/workflow-popup-factory.ts +2 -2
- package/src/node/.indexignore +4 -0
- package/src/node/app.ts +12 -2
- package/src/node/index.ts +2 -2
- package/src/node/reexport.ts +16 -0
|
@@ -5,10 +5,7 @@
|
|
|
5
5
|
"name": "Push",
|
|
6
6
|
"taskType": "manual",
|
|
7
7
|
"id": "task0",
|
|
8
|
-
"cssClasses": [
|
|
9
|
-
"task",
|
|
10
|
-
"manual"
|
|
11
|
-
],
|
|
8
|
+
"cssClasses": ["task", "manual"],
|
|
12
9
|
"children": [
|
|
13
10
|
{
|
|
14
11
|
"id": "task0_icon",
|
|
@@ -66,10 +63,7 @@
|
|
|
66
63
|
"name": "ChkWt",
|
|
67
64
|
"taskType": "automated",
|
|
68
65
|
"id": "task0_automated",
|
|
69
|
-
"cssClasses": [
|
|
70
|
-
"task",
|
|
71
|
-
"automated"
|
|
72
|
-
],
|
|
66
|
+
"cssClasses": ["task", "automated"],
|
|
73
67
|
"children": [
|
|
74
68
|
{
|
|
75
69
|
"id": "task0_automated_icon",
|
|
@@ -194,9 +188,7 @@
|
|
|
194
188
|
{
|
|
195
189
|
"nodeType": "forkNode",
|
|
196
190
|
"id": "bb2709f5-0ff0-4438-8853-b7e934b506d7",
|
|
197
|
-
"cssClasses": [
|
|
198
|
-
"forkOrJoin"
|
|
199
|
-
],
|
|
191
|
+
"cssClasses": ["forkOrJoin"],
|
|
200
192
|
"type": "activityNode:fork",
|
|
201
193
|
"position": {
|
|
202
194
|
"x": 170.0,
|
|
@@ -216,9 +208,7 @@
|
|
|
216
208
|
{
|
|
217
209
|
"nodeType": "joinNode",
|
|
218
210
|
"id": "bd94e44e-19f9-446e-89d4-97ca1a63c17b",
|
|
219
|
-
"cssClasses": [
|
|
220
|
-
"forkOrJoin"
|
|
221
|
-
],
|
|
211
|
+
"cssClasses": ["forkOrJoin"],
|
|
222
212
|
"type": "activityNode:join",
|
|
223
213
|
"position": {
|
|
224
214
|
"x": 560.0,
|
|
@@ -245,10 +235,7 @@
|
|
|
245
235
|
"name": "WtOK",
|
|
246
236
|
"taskType": "automated",
|
|
247
237
|
"id": "e47d5eba-612d-4c43-9aba-2c5502ff4f04",
|
|
248
|
-
"cssClasses": [
|
|
249
|
-
"task",
|
|
250
|
-
"automated"
|
|
251
|
-
],
|
|
238
|
+
"cssClasses": ["task", "automated"],
|
|
252
239
|
"children": [
|
|
253
240
|
{
|
|
254
241
|
"id": "e47d5eba-612d-4c43-9aba-2c5502ff4f04_icon",
|
|
@@ -304,9 +291,7 @@
|
|
|
304
291
|
},
|
|
305
292
|
{
|
|
306
293
|
"id": "2317f24a-034e-4352-8857-d361dc8f5ed7",
|
|
307
|
-
"cssClasses": [
|
|
308
|
-
"medium"
|
|
309
|
-
],
|
|
294
|
+
"cssClasses": ["medium"],
|
|
310
295
|
"type": "edge:weighted",
|
|
311
296
|
"sourceId": "b00fc494-0fa4-4448-8bf9-162c2c0865e4",
|
|
312
297
|
"targetId": "e47d5eba-612d-4c43-9aba-2c5502ff4f04"
|
|
@@ -333,10 +318,7 @@
|
|
|
333
318
|
"name": "RflWt",
|
|
334
319
|
"taskType": "manual",
|
|
335
320
|
"id": "a63cfd87-da7c-4846-912b-29040b776bfb",
|
|
336
|
-
"cssClasses": [
|
|
337
|
-
"task",
|
|
338
|
-
"manual"
|
|
339
|
-
],
|
|
321
|
+
"cssClasses": ["task", "manual"],
|
|
340
322
|
"children": [
|
|
341
323
|
{
|
|
342
324
|
"id": "54f08126-6041-44ce-9d8b-e7a549e48f91",
|
|
@@ -392,9 +374,7 @@
|
|
|
392
374
|
},
|
|
393
375
|
{
|
|
394
376
|
"id": "9bb443d7-44f3-4192-8dd8-1a2782593373",
|
|
395
|
-
"cssClasses": [
|
|
396
|
-
"medium"
|
|
397
|
-
],
|
|
377
|
+
"cssClasses": ["medium"],
|
|
398
378
|
"type": "edge:weighted",
|
|
399
379
|
"sourceId": "b00fc494-0fa4-4448-8bf9-162c2c0865e4",
|
|
400
380
|
"targetId": "a63cfd87-da7c-4846-912b-29040b776bfb"
|
|
@@ -421,10 +401,7 @@
|
|
|
421
401
|
"name": "Brew",
|
|
422
402
|
"taskType": "automated",
|
|
423
403
|
"id": "7afd430b-5031-4082-8190-7e755c57cde9",
|
|
424
|
-
"cssClasses": [
|
|
425
|
-
"task",
|
|
426
|
-
"automated"
|
|
427
|
-
],
|
|
404
|
+
"cssClasses": ["task", "automated"],
|
|
428
405
|
"children": [
|
|
429
406
|
{
|
|
430
407
|
"id": "7afd430b-5031-4082-8190-7e755c57cde9_icon",
|
|
@@ -491,10 +468,7 @@
|
|
|
491
468
|
"name": "ChkTp",
|
|
492
469
|
"taskType": "automated",
|
|
493
470
|
"id": "6c26f0a4-4354-45fa-9d9f-bc2b48adee17",
|
|
494
|
-
"cssClasses": [
|
|
495
|
-
"task",
|
|
496
|
-
"automated"
|
|
497
|
-
],
|
|
471
|
+
"cssClasses": ["task", "automated"],
|
|
498
472
|
"children": [
|
|
499
473
|
{
|
|
500
474
|
"id": "6c26f0a4-4354-45fa-9d9f-bc2b48adee17_icon",
|
|
@@ -570,10 +544,7 @@
|
|
|
570
544
|
"name": "KeepTp",
|
|
571
545
|
"taskType": "automated",
|
|
572
546
|
"id": "4b06ed95-c9be-47df-9941-98099259be4a",
|
|
573
|
-
"cssClasses": [
|
|
574
|
-
"task",
|
|
575
|
-
"automated"
|
|
576
|
-
],
|
|
547
|
+
"cssClasses": ["task", "automated"],
|
|
577
548
|
"children": [
|
|
578
549
|
{
|
|
579
550
|
"id": "4b06ed95-c9be-47df-9941-98099259be4a_icon",
|
|
@@ -631,10 +602,7 @@
|
|
|
631
602
|
"name": "PreHeat",
|
|
632
603
|
"taskType": "automated",
|
|
633
604
|
"id": "80d1792f-9c7e-41c0-8eca-eeb0509397b6",
|
|
634
|
-
"cssClasses": [
|
|
635
|
-
"task",
|
|
636
|
-
"automated"
|
|
637
|
-
],
|
|
605
|
+
"cssClasses": ["task", "automated"],
|
|
638
606
|
"children": [
|
|
639
607
|
{
|
|
640
608
|
"id": "80d1792f-9c7e-41c0-8eca-eeb0509397b6_icon",
|
|
@@ -690,18 +658,14 @@
|
|
|
690
658
|
},
|
|
691
659
|
{
|
|
692
660
|
"id": "d04afaf8-0894-4284-b844-22b255893107",
|
|
693
|
-
"cssClasses": [
|
|
694
|
-
"medium"
|
|
695
|
-
],
|
|
661
|
+
"cssClasses": ["medium"],
|
|
696
662
|
"type": "edge:weighted",
|
|
697
663
|
"sourceId": "activityNode2",
|
|
698
664
|
"targetId": "4b06ed95-c9be-47df-9941-98099259be4a"
|
|
699
665
|
},
|
|
700
666
|
{
|
|
701
667
|
"id": "b9ef468f-2aaf-41b9-b408-29e2d08e490e",
|
|
702
|
-
"cssClasses": [
|
|
703
|
-
"medium"
|
|
704
|
-
],
|
|
668
|
+
"cssClasses": ["medium"],
|
|
705
669
|
"type": "edge:weighted",
|
|
706
670
|
"sourceId": "activityNode2",
|
|
707
671
|
"targetId": "80d1792f-9c7e-41c0-8eca-eeb0509397b6"
|
|
@@ -727,4 +691,4 @@
|
|
|
727
691
|
],
|
|
728
692
|
"type": "graph",
|
|
729
693
|
"revision": 10
|
|
730
|
-
}
|
|
694
|
+
}
|
package/src/browser/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-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
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
export * from '../common/index';
|
|
17
16
|
export * from './mock-model-storage';
|
|
17
|
+
export * from './reexport';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
export * from '../common';
|
|
@@ -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
|
|
@@ -26,10 +26,7 @@ export abstract class CreateActivityNodeHandler extends CreateWorkflowNodeOperat
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
protected builder(point: Point = Point.ORIGIN, elementTypeId = this.elementTypeIds[0]): ActivityNodeBuilder {
|
|
29
|
-
return ActivityNode.builder()
|
|
30
|
-
.position(point)
|
|
31
|
-
.type(elementTypeId)
|
|
32
|
-
.nodeType(ModelTypes.toNodeType(elementTypeId));
|
|
29
|
+
return ActivityNode.builder().position(point).type(elementTypeId).nodeType(ModelTypes.toNodeType(elementTypeId));
|
|
33
30
|
}
|
|
34
31
|
|
|
35
32
|
override createTriggerGhostElement(elementTypeId: string): GhostElement | undefined {
|
|
@@ -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
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { Point } from '@eclipse-glsp/server';
|
|
16
|
+
import { GResizeLocation, Point } from '@eclipse-glsp/server';
|
|
17
17
|
import { injectable } from 'inversify';
|
|
18
18
|
import { ActivityNodeBuilder } from '../graph-extension';
|
|
19
19
|
import { ModelTypes } from '../util/model-types';
|
|
@@ -25,6 +25,6 @@ export class CreateDecisionNodeHandler extends CreateActivityNodeHandler {
|
|
|
25
25
|
label = 'Decision Node';
|
|
26
26
|
|
|
27
27
|
protected override builder(point?: Point): ActivityNodeBuilder {
|
|
28
|
-
return super.builder(point).addCssClass('decision');
|
|
28
|
+
return super.builder(point).addCssClass('decision').resizeLocations(GResizeLocation.CROSS);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -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
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { Point } from '@eclipse-glsp/server';
|
|
16
|
+
import { GResizeLocation, Point } from '@eclipse-glsp/server';
|
|
17
17
|
import { injectable } from 'inversify';
|
|
18
18
|
import { ActivityNodeBuilder } from '../graph-extension';
|
|
19
19
|
import { ModelTypes } from '../util/model-types';
|
|
@@ -25,6 +25,6 @@ export class CreateMergeNodeHandler extends CreateActivityNodeHandler {
|
|
|
25
25
|
label = 'Merge Node';
|
|
26
26
|
|
|
27
27
|
protected override builder(point: Point | undefined): ActivityNodeBuilder {
|
|
28
|
-
return super.builder(point).addCssClass('merge');
|
|
28
|
+
return super.builder(point).addCssClass('merge').resizeLocations(GResizeLocation.CROSS);
|
|
29
29
|
}
|
|
30
30
|
}
|
package/src/common/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023 STMicroelectronics and others.
|
|
2
|
+
* Copyright (c) 2023-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
|
|
@@ -29,7 +29,6 @@ export * from './handler/create-task-handler';
|
|
|
29
29
|
export * from './handler/create-weighted-edge-handler';
|
|
30
30
|
export * from './handler/create-workflow-node-operation-handler';
|
|
31
31
|
export * from './handler/grid-snapper';
|
|
32
|
-
export * from './index';
|
|
33
32
|
export * from './labeledit/workflow-label-edit-validator';
|
|
34
33
|
export * from './layout/workflow-layout-configurator';
|
|
35
34
|
export * from './marker/workflow-model-validator';
|
|
@@ -46,5 +45,6 @@ export * from './taskedit/task-edit-validator';
|
|
|
46
45
|
export * from './util/model-types';
|
|
47
46
|
export * from './workflow-diagram-configuration';
|
|
48
47
|
export * from './workflow-diagram-module';
|
|
48
|
+
export * from './workflow-edge-creation-checker';
|
|
49
49
|
export * from './workflow-glsp-server';
|
|
50
50
|
export * from './workflow-popup-factory';
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { Args, EditorContext, NavigationTarget } from '@eclipse-glsp/protocol';
|
|
17
|
-
import { JsonOpenerOptions, ModelState, NavigationTargetProvider } from '@eclipse-glsp/server';
|
|
17
|
+
import { GLabel, JsonOpenerOptions, ModelState, NavigationTargetProvider } from '@eclipse-glsp/server';
|
|
18
18
|
import { inject, injectable } from 'inversify';
|
|
19
19
|
import { TaskNode } from '../graph-extension';
|
|
20
20
|
|
|
@@ -28,7 +28,7 @@ export class NodeDocumentationNavigationTargetProvider implements NavigationTarg
|
|
|
28
28
|
getTargets(editorContext: EditorContext): NavigationTarget[] {
|
|
29
29
|
if (editorContext.selectedElementIds.length === 1) {
|
|
30
30
|
const taskNode = this.modelState.index.findByClass(editorContext.selectedElementIds[0], TaskNode);
|
|
31
|
-
if (!taskNode || !
|
|
31
|
+
if (!taskNode || !taskNode.children.some(child => child instanceof GLabel && child.text === 'Push')) {
|
|
32
32
|
return [];
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -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
|
-
{
|
|
65
|
+
createDefaultEdgeTypeHint({
|
|
70
66
|
elementTypeId: types.WEIGHTED_EDGE,
|
|
71
|
-
repositionable: true,
|
|
72
|
-
deletable: true,
|
|
73
|
-
routable: true,
|
|
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 (
|
|
@@ -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
|
|
@@ -38,7 +38,7 @@ export class WorkflowPopupFactory implements PopupModelFactory {
|
|
|
38
38
|
return undefined;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
protected generateBody(task: TaskNode): string {
|
|
42
42
|
return `Type: ${task.taskType} ${NL}
|
|
43
43
|
Duration: ${task.duration} ${NL}
|
|
44
44
|
Reference: ${task.references} ${NL}`;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# The app.ts is the entrypoint when the workflow server is used bundled in an external node process
|
|
2
|
+
# It launches the server when imported so it has to be excluded from the default export to avoid unintended
|
|
3
|
+
# autostarts when the server package is directly integrated into a node backed (e.g. Theia)
|
|
4
|
+
app.ts
|
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
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import 'reflect-metadata';
|
|
17
17
|
|
|
18
18
|
import { configureELKLayoutModule } from '@eclipse-glsp/layout-elk';
|
|
19
|
-
import { createAppModule, GModelStorage, SocketServerLauncher, WebSocketServerLauncher } from '@eclipse-glsp/server/node';
|
|
19
|
+
import { createAppModule, GModelStorage, Logger, SocketServerLauncher, WebSocketServerLauncher } from '@eclipse-glsp/server/node';
|
|
20
20
|
import { Container } from 'inversify';
|
|
21
21
|
|
|
22
22
|
import { WorkflowLayoutConfigurator } from '../common/layout/workflow-layout-configurator';
|
|
@@ -27,6 +27,16 @@ async function launch(argv?: string[]): Promise<void> {
|
|
|
27
27
|
const options = createWorkflowCliParser().parse(argv);
|
|
28
28
|
const appContainer = new Container();
|
|
29
29
|
appContainer.load(createAppModule(options));
|
|
30
|
+
const logger = appContainer.get(Logger);
|
|
31
|
+
|
|
32
|
+
// Add fallback hooks to catch unhandled exceptions & promise rejections and prevent the node process from crashing
|
|
33
|
+
process.on('unhandledRejection', (reason, p) => {
|
|
34
|
+
logger.error('Unhandled Rejection:', p, reason);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
process.on('uncaughtException', error => {
|
|
38
|
+
logger.error('Uncaught exception:', error);
|
|
39
|
+
});
|
|
30
40
|
|
|
31
41
|
const elkLayoutModule = configureELKLayoutModule({ algorithms: ['layered'], layoutConfigurator: WorkflowLayoutConfigurator });
|
|
32
42
|
const serverModule = new WorkflowServerModule().configureDiagramModule(new WorkflowDiagramModule(() => GModelStorage), elkLayoutModule);
|
package/src/node/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-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
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
export * from '
|
|
16
|
+
export * from './reexport';
|
|
17
17
|
export * from './workflow-cli-parser';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
export * from '../common';
|