@eclipse-glsp-examples/workflow-server 1.1.0-next.dc6b980.47 → 1.1.0-next.de91dcd.60
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/README.md +18 -0
- package/browser.d.ts +16 -0
- package/browser.js +18 -0
- package/lib/browser/app.d.ts +16 -0
- package/lib/browser/app.d.ts.map +1 -1
- package/lib/browser/app.js +9 -14
- package/lib/browser/app.js.map +1 -1
- package/lib/browser/index.d.ts +2 -1
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +16 -3
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/mock-model-storage.js +2 -3
- package/lib/browser/mock-model-storage.js.map +1 -1
- package/lib/common/handler/create-activity-node-handler.js +2 -3
- package/lib/common/handler/create-activity-node-handler.js.map +1 -1
- package/lib/common/handler/create-automated-task-handler.js +2 -3
- package/lib/common/handler/create-automated-task-handler.js.map +1 -1
- package/lib/common/handler/create-decision-node-handler.js +2 -3
- package/lib/common/handler/create-decision-node-handler.js.map +1 -1
- package/lib/common/handler/create-fork-node-handler.js +2 -3
- package/lib/common/handler/create-fork-node-handler.js.map +1 -1
- package/lib/common/handler/create-fork-or-join-node-handler.js +2 -3
- package/lib/common/handler/create-fork-or-join-node-handler.js.map +1 -1
- package/lib/common/handler/create-join-node-handler.js +2 -3
- package/lib/common/handler/create-join-node-handler.js.map +1 -1
- package/lib/common/handler/create-manual-task-handler.js +2 -3
- package/lib/common/handler/create-manual-task-handler.js.map +1 -1
- package/lib/common/handler/create-merge-node-handler.js +2 -3
- package/lib/common/handler/create-merge-node-handler.js.map +1 -1
- package/lib/common/handler/create-task-handler.js +2 -3
- package/lib/common/handler/create-task-handler.js.map +1 -1
- package/lib/common/handler/create-workflow-node-operation-handler.js +2 -3
- package/lib/common/handler/create-workflow-node-operation-handler.js.map +1 -1
- package/lib/common/index.d.ts +50 -0
- package/lib/common/index.d.ts.map +1 -0
- package/lib/common/index.js +66 -0
- package/lib/common/index.js.map +1 -0
- package/lib/common/labeledit/workflow-label-edit-validator.js +2 -3
- package/lib/common/labeledit/workflow-label-edit-validator.js.map +1 -1
- package/lib/common/layout/workflow-layout-configurator.js +2 -3
- package/lib/common/layout/workflow-layout-configurator.js.map +1 -1
- package/lib/common/marker/workflow-model-validator.d.ts +4 -3
- package/lib/common/marker/workflow-model-validator.d.ts.map +1 -1
- package/lib/common/marker/workflow-model-validator.js +15 -17
- package/lib/common/marker/workflow-model-validator.js.map +1 -1
- package/lib/common/model/workflow-navigation-target-resolver.js +2 -3
- package/lib/common/model/workflow-navigation-target-resolver.js.map +1 -1
- package/lib/common/provider/abstract-next-or-previous-navigation-target-provider.js +2 -3
- package/lib/common/provider/abstract-next-or-previous-navigation-target-provider.js.map +1 -1
- package/lib/common/provider/next-node-navigation-target-provider.js +2 -3
- package/lib/common/provider/next-node-navigation-target-provider.js.map +1 -1
- package/lib/common/provider/node-documentation-navigation-target-provider.js +2 -3
- package/lib/common/provider/node-documentation-navigation-target-provider.js.map +1 -1
- package/lib/common/provider/previous-node-navigation-target-provider.js +2 -3
- package/lib/common/provider/previous-node-navigation-target-provider.js.map +1 -1
- package/lib/common/provider/workflow-command-palette-action-provider.js +2 -3
- package/lib/common/provider/workflow-command-palette-action-provider.js.map +1 -1
- package/lib/common/provider/workflow-context-menu-item-provider.js +2 -3
- package/lib/common/provider/workflow-context-menu-item-provider.js.map +1 -1
- package/lib/common/taskedit/edit-task-operation-handler.js +3 -4
- package/lib/common/taskedit/edit-task-operation-handler.js.map +1 -1
- package/lib/common/taskedit/task-edit-context-provider.js +2 -3
- package/lib/common/taskedit/task-edit-context-provider.js.map +1 -1
- package/lib/common/taskedit/task-edit-validator.js +2 -3
- package/lib/common/taskedit/task-edit-validator.js.map +1 -1
- package/lib/common/util/model-types.js +1 -1
- package/lib/common/util/model-types.js.map +1 -1
- package/lib/common/workflow-diagram-configuration.js +2 -3
- package/lib/common/workflow-diagram-configuration.js.map +1 -1
- package/lib/common/workflow-diagram-module.js +4 -6
- package/lib/common/workflow-diagram-module.js.map +1 -1
- package/lib/common/workflow-glsp-server.js +2 -3
- package/lib/common/workflow-glsp-server.js.map +1 -1
- package/lib/common/workflow-popup-factory.js +2 -3
- package/lib/common/workflow-popup-factory.js.map +1 -1
- package/lib/node/app.d.ts +16 -1
- package/lib/node/app.d.ts.map +1 -1
- package/lib/node/app.js +15 -22
- package/lib/node/app.js.map +1 -1
- package/lib/node/index.d.ts +2 -1
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/index.js +16 -3
- package/lib/node/index.js.map +1 -1
- package/lib/node/workflow-cli-parser.d.ts +1 -1
- package/lib/node/workflow-cli-parser.js +1 -1
- package/node.d.ts +16 -0
- package/node.js +18 -0
- package/package.json +10 -7
- package/src/browser/app.ts +15 -18
- package/src/browser/index.ts +2 -4
- package/src/common/index.ts +50 -0
- package/src/common/marker/workflow-model-validator.ts +16 -15
- package/src/node/app.ts +20 -32
- package/src/node/index.ts +2 -4
- package/src/node/workflow-cli-parser.ts +1 -1
|
@@ -26,7 +26,7 @@ const server_1 = require("@eclipse-glsp/server");
|
|
|
26
26
|
const inversify_1 = require("inversify");
|
|
27
27
|
const graph_extension_1 = require("./graph-extension");
|
|
28
28
|
const NL = '<br/>';
|
|
29
|
-
let WorkflowPopupFactory = class WorkflowPopupFactory {
|
|
29
|
+
let WorkflowPopupFactory = exports.WorkflowPopupFactory = class WorkflowPopupFactory {
|
|
30
30
|
createPopupModel(element, action) {
|
|
31
31
|
if (element && element instanceof graph_extension_1.TaskNode) {
|
|
32
32
|
const popupTitle = server_1.GPreRenderedElement.builder()
|
|
@@ -47,8 +47,7 @@ let WorkflowPopupFactory = class WorkflowPopupFactory {
|
|
|
47
47
|
Reference: ${task.references} ${NL}`;
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
WorkflowPopupFactory = __decorate([
|
|
50
|
+
exports.WorkflowPopupFactory = WorkflowPopupFactory = __decorate([
|
|
51
51
|
(0, inversify_1.injectable)()
|
|
52
52
|
], WorkflowPopupFactory);
|
|
53
|
-
exports.WorkflowPopupFactory = WorkflowPopupFactory;
|
|
54
53
|
//# sourceMappingURL=workflow-popup-factory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-popup-factory.js","sourceRoot":"","sources":["../../src/common/workflow-popup-factory.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAAkI;AAClI,yCAAuC;AACvC,uDAA6C;AAE7C,MAAM,EAAE,GAAG,OAAO,CAAC;AAGZ,IAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"workflow-popup-factory.js","sourceRoot":"","sources":["../../src/common/workflow-popup-factory.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,iDAAkI;AAClI,yCAAuC;AACvC,uDAA6C;AAE7C,MAAM,EAAE,GAAG,OAAO,CAAC;AAGZ,IAAM,oBAAoB,kCAA1B,MAAM,oBAAoB;IAC7B,gBAAgB,CAAC,OAAsB,EAAE,MAA+B;QACpE,IAAI,OAAO,IAAI,OAAO,YAAY,0BAAQ,EAAE;YACxC,MAAM,UAAU,GAAG,4BAAmB,CAAC,OAAO,EAAE;iBAC3C,EAAE,CAAC,aAAa,CAAC;iBACjB,IAAI,CAAC,oCAAoC,OAAO,CAAC,IAAI,QAAQ,CAAC;iBAC9D,KAAK,EAAE,CAAC;YAEb,MAAM,SAAS,GAAG,4BAAmB,CAAC,OAAO,EAAE;iBAC1C,EAAE,CAAC,YAAY,CAAC;iBAChB,IAAI,CAAC,mCAAmC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC;iBAC3E,KAAK,EAAE,CAAC;YAEb,OAAO,mBAAU,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,CAAC;SACnI;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;IAEO,YAAY,CAAC,IAAc;QAC/B,OAAO,SAAS,IAAI,CAAC,QAAQ,IAAI,EAAE;wBACnB,IAAI,CAAC,QAAQ,IAAI,EAAE;yBAClB,IAAI,CAAC,UAAU,IAAI,EAAE,EAAE,CAAC;IAC7C,CAAC;CACJ,CAAA;+BAvBY,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CAuBhC"}
|
package/lib/node/app.d.ts
CHANGED
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2022-2023 STMicroelectronics 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
|
+
import 'reflect-metadata';
|
|
2
17
|
//# sourceMappingURL=app.d.ts.map
|
package/lib/node/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/node/app.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/node/app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,kBAAkB,CAAC"}
|
package/lib/node/app.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.launch = void 0;
|
|
4
3
|
/********************************************************************************
|
|
5
4
|
* Copyright (c) 2022-2023 STMicroelectronics and others.
|
|
6
5
|
*
|
|
@@ -16,6 +15,7 @@ exports.launch = void 0;
|
|
|
16
15
|
*
|
|
17
16
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
18
17
|
********************************************************************************/
|
|
18
|
+
require("reflect-metadata");
|
|
19
19
|
const layout_elk_1 = require("@eclipse-glsp/layout-elk");
|
|
20
20
|
const node_1 = require("@eclipse-glsp/server/node");
|
|
21
21
|
const inversify_1 = require("inversify");
|
|
@@ -23,28 +23,21 @@ const workflow_layout_configurator_1 = require("../common/layout/workflow-layout
|
|
|
23
23
|
const workflow_diagram_module_1 = require("../common/workflow-diagram-module");
|
|
24
24
|
const workflow_cli_parser_1 = require("./workflow-cli-parser");
|
|
25
25
|
async function launch(argv) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const launcher = appContainer.resolve(node_1.WebSocketServerLauncher);
|
|
36
|
-
launcher.configure(serverModule);
|
|
37
|
-
launcher.start({ port: options.port, host: options.host, path: 'workflow' });
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
const launcher = appContainer.resolve(node_1.SocketServerLauncher);
|
|
41
|
-
launcher.configure(serverModule);
|
|
42
|
-
launcher.start({ port: options.port, host: options.host });
|
|
43
|
-
}
|
|
26
|
+
const options = (0, workflow_cli_parser_1.createWorkflowCliParser)().parse(argv);
|
|
27
|
+
const appContainer = new inversify_1.Container();
|
|
28
|
+
appContainer.load((0, node_1.createAppModule)(options));
|
|
29
|
+
const elkLayoutModule = (0, layout_elk_1.configureELKLayoutModule)({ algorithms: ['layered'], layoutConfigurator: workflow_layout_configurator_1.WorkflowLayoutConfigurator });
|
|
30
|
+
const serverModule = new workflow_diagram_module_1.WorkflowServerModule().configureDiagramModule(new workflow_diagram_module_1.WorkflowDiagramModule(() => node_1.GModelStorage), elkLayoutModule);
|
|
31
|
+
if (options.webSocket) {
|
|
32
|
+
const launcher = appContainer.resolve(node_1.WebSocketServerLauncher);
|
|
33
|
+
launcher.configure(serverModule);
|
|
34
|
+
launcher.start({ port: options.port, host: options.host, path: 'workflow' });
|
|
44
35
|
}
|
|
45
|
-
|
|
46
|
-
|
|
36
|
+
else {
|
|
37
|
+
const launcher = appContainer.resolve(node_1.SocketServerLauncher);
|
|
38
|
+
launcher.configure(serverModule);
|
|
39
|
+
launcher.start({ port: options.port, host: options.host });
|
|
47
40
|
}
|
|
48
41
|
}
|
|
49
|
-
|
|
42
|
+
launch(process.argv).catch(error => console.error('Error in workflow server launcher:', error));
|
|
50
43
|
//# sourceMappingURL=app.js.map
|
package/lib/node/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/node/app.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/node/app.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,4BAA0B;AAE1B,yDAAoE;AACpE,oDAA0H;AAC1H,yCAAsC;AAEtC,gGAA2F;AAC3F,+EAAgG;AAChG,+DAAgE;AAEhE,KAAK,UAAU,MAAM,CAAC,IAAe;IACjC,MAAM,OAAO,GAAG,IAAA,6CAAuB,GAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACtD,MAAM,YAAY,GAAG,IAAI,qBAAS,EAAE,CAAC;IACrC,YAAY,CAAC,IAAI,CAAC,IAAA,sBAAe,EAAC,OAAO,CAAC,CAAC,CAAC;IAE5C,MAAM,eAAe,GAAG,IAAA,qCAAwB,EAAC,EAAE,UAAU,EAAE,CAAC,SAAS,CAAC,EAAE,kBAAkB,EAAE,yDAA0B,EAAE,CAAC,CAAC;IAC9H,MAAM,YAAY,GAAG,IAAI,8CAAoB,EAAE,CAAC,sBAAsB,CAAC,IAAI,+CAAqB,CAAC,GAAG,EAAE,CAAC,oBAAa,CAAC,EAAE,eAAe,CAAC,CAAC;IAExI,IAAI,OAAO,CAAC,SAAS,EAAE;QACnB,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,8BAAuB,CAAC,CAAC;QAC/D,QAAQ,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;KAChF;SAAM;QACH,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,2BAAoB,CAAC,CAAC;QAC5D,QAAQ,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;KAC9D;AACL,CAAC;AAED,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,oCAAoC,EAAE,KAAK,CAAC,CAAC,CAAC"}
|
package/lib/node/index.d.ts
CHANGED
|
@@ -13,5 +13,6 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
|
|
16
|
+
export * from '../common/index';
|
|
17
|
+
export * from './workflow-cli-parser';
|
|
17
18
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/node/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC"}
|
package/lib/node/index.js
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
17
|
/********************************************************************************
|
|
4
18
|
* Copyright (c) 2022-2023 EclipseSource and others.
|
|
@@ -15,7 +29,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
29
|
*
|
|
16
30
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
17
31
|
********************************************************************************/
|
|
18
|
-
require("
|
|
19
|
-
|
|
20
|
-
(0, app_1.launch)(process.argv);
|
|
32
|
+
__exportStar(require("../common/index"), exports);
|
|
33
|
+
__exportStar(require("./workflow-cli-parser"), exports);
|
|
21
34
|
//# sourceMappingURL=index.js.map
|
package/lib/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,kDAAgC;AAChC,wDAAsC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2022-2023 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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/********************************************************************************
|
|
3
|
-
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
* Copyright (c) 2022-2023 EclipseSource and others.
|
|
4
4
|
*
|
|
5
5
|
* This program and the accompanying materials are made available under the
|
|
6
6
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
package/node.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2022-2023 STMicroelectronics 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 './lib/node/index';
|
package/node.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 STMicroelectronics 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
|
+
'use strict';
|
|
17
|
+
|
|
18
|
+
module.exports = require('./lib/node/index');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp-examples/workflow-server",
|
|
3
|
-
"version": "1.1.0-next.
|
|
3
|
+
"version": "1.1.0-next.de91dcd.60+de91dcd",
|
|
4
4
|
"description": "GLSP node server for the workflow example",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eclipse",
|
|
@@ -39,7 +39,11 @@
|
|
|
39
39
|
"types": "lib/index",
|
|
40
40
|
"files": [
|
|
41
41
|
"lib",
|
|
42
|
-
"src"
|
|
42
|
+
"src",
|
|
43
|
+
"node.js",
|
|
44
|
+
"node.d.ts",
|
|
45
|
+
"browser.d.ts",
|
|
46
|
+
"browser.js"
|
|
43
47
|
],
|
|
44
48
|
"scripts": {
|
|
45
49
|
"build": "tsc -b && yarn bundle",
|
|
@@ -49,13 +53,12 @@
|
|
|
49
53
|
"lint": "eslint --ext .ts,.tsx ./src",
|
|
50
54
|
"lint:ci": "yarn lint -o eslint.xml -f checkstyle",
|
|
51
55
|
"prepare": "yarn clean && yarn build",
|
|
52
|
-
"start": "node --enable-source-maps bundle/wf-glsp-server-node.js --port 5007",
|
|
53
|
-
"start:websocket": "node --enable-source-maps bundle/wf-glsp-server-node.js -w --port 8081",
|
|
54
56
|
"watch": "tsc -w"
|
|
55
57
|
},
|
|
56
58
|
"dependencies": {
|
|
57
|
-
"@eclipse-glsp/layout-elk": "1.1.0-next.
|
|
58
|
-
"@eclipse-glsp/server": "1.1.0-next.
|
|
59
|
+
"@eclipse-glsp/layout-elk": "1.1.0-next.de91dcd.60+de91dcd",
|
|
60
|
+
"@eclipse-glsp/server": "1.1.0-next.de91dcd.60+de91dcd",
|
|
61
|
+
"inversify": "^6.0.1"
|
|
59
62
|
},
|
|
60
63
|
"devDependencies": {
|
|
61
64
|
"source-map-loader": "^4.0.1",
|
|
@@ -65,5 +68,5 @@
|
|
|
65
68
|
"publishConfig": {
|
|
66
69
|
"access": "public"
|
|
67
70
|
},
|
|
68
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "de91dcd22122b3f46536a9581dd9ed498b311659"
|
|
69
72
|
}
|
package/src/browser/app.ts
CHANGED
|
@@ -13,33 +13,30 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
import 'reflect-metadata';
|
|
17
|
+
|
|
16
18
|
import { configureELKLayoutModule } from '@eclipse-glsp/layout-elk';
|
|
17
|
-
import { createAppModule,
|
|
19
|
+
import { createAppModule, LogLevel, WorkerServerLauncher } from '@eclipse-glsp/server/browser';
|
|
18
20
|
import { Container } from 'inversify';
|
|
19
21
|
import { WorkflowLayoutConfigurator } from '../common/layout/workflow-layout-configurator';
|
|
20
22
|
import { WorkflowDiagramModule, WorkflowServerModule } from '../common/workflow-diagram-module';
|
|
21
23
|
import { WorkflowMockModelStorage } from './mock-model-storage';
|
|
22
24
|
|
|
23
25
|
export async function launch(argv?: string[]): Promise<void> {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
try {
|
|
27
|
-
const appContainer = new Container();
|
|
28
|
-
appContainer.load(createAppModule({ logLevel: LogLevel.info }));
|
|
26
|
+
const appContainer = new Container();
|
|
27
|
+
appContainer.load(createAppModule({ logLevel: LogLevel.info }));
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const elkLayoutModule = configureELKLayoutModule({ algorithms: ['layered'], layoutConfigurator: WorkflowLayoutConfigurator });
|
|
29
|
+
const launcher = appContainer.resolve(WorkerServerLauncher);
|
|
30
|
+
const elkLayoutModule = configureELKLayoutModule({ algorithms: ['layered'], layoutConfigurator: WorkflowLayoutConfigurator });
|
|
33
31
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
const serverModule = new WorkflowServerModule().configureDiagramModule(
|
|
33
|
+
new WorkflowDiagramModule(() => WorkflowMockModelStorage),
|
|
34
|
+
elkLayoutModule
|
|
35
|
+
);
|
|
38
36
|
|
|
39
|
-
|
|
37
|
+
launcher.configure(serverModule);
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
} catch (error) {
|
|
43
|
-
(logger ?? console).error('Error in workflow server launcher:', error);
|
|
44
|
-
}
|
|
39
|
+
await launcher.start({});
|
|
45
40
|
}
|
|
41
|
+
|
|
42
|
+
launch().catch(error => console.error('Error in workflow server launcher:', error));
|
package/src/browser/index.ts
CHANGED
|
@@ -13,7 +13,5 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
launch();
|
|
16
|
+
export * from '../common/index';
|
|
17
|
+
export * from './mock-model-storage';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 STMicroelectronics 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
|
+
|
|
17
|
+
export * from './graph-extension';
|
|
18
|
+
export * from './handler/create-activity-node-handler';
|
|
19
|
+
export * from './handler/create-automated-task-handler';
|
|
20
|
+
export * from './handler/create-category-handler';
|
|
21
|
+
export * from './handler/create-decision-node-handler';
|
|
22
|
+
export * from './handler/create-edge-handler';
|
|
23
|
+
export * from './handler/create-fork-node-handler';
|
|
24
|
+
export * from './handler/create-fork-or-join-node-handler';
|
|
25
|
+
export * from './handler/create-join-node-handler';
|
|
26
|
+
export * from './handler/create-manual-task-handler';
|
|
27
|
+
export * from './handler/create-merge-node-handler';
|
|
28
|
+
export * from './handler/create-task-handler';
|
|
29
|
+
export * from './handler/create-weighted-edge-handler';
|
|
30
|
+
export * from './handler/create-workflow-node-operation-handler';
|
|
31
|
+
export * from './handler/grid-snapper';
|
|
32
|
+
export * from './index';
|
|
33
|
+
export * from './labeledit/workflow-label-edit-validator';
|
|
34
|
+
export * from './layout/workflow-layout-configurator';
|
|
35
|
+
export * from './marker/workflow-model-validator';
|
|
36
|
+
export * from './model/workflow-navigation-target-resolver';
|
|
37
|
+
export * from './provider/abstract-next-or-previous-navigation-target-provider';
|
|
38
|
+
export * from './provider/next-node-navigation-target-provider';
|
|
39
|
+
export * from './provider/node-documentation-navigation-target-provider';
|
|
40
|
+
export * from './provider/previous-node-navigation-target-provider';
|
|
41
|
+
export * from './provider/workflow-command-palette-action-provider';
|
|
42
|
+
export * from './provider/workflow-context-menu-item-provider';
|
|
43
|
+
export * from './taskedit/edit-task-operation-handler';
|
|
44
|
+
export * from './taskedit/task-edit-context-provider';
|
|
45
|
+
export * from './taskedit/task-edit-validator';
|
|
46
|
+
export * from './util/model-types';
|
|
47
|
+
export * from './workflow-diagram-configuration';
|
|
48
|
+
export * from './workflow-diagram-module';
|
|
49
|
+
export * from './workflow-glsp-server';
|
|
50
|
+
export * from './workflow-popup-factory';
|
|
@@ -13,34 +13,35 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { GCompartment, GLabel, GModelElement, Marker, MarkerKind, ModelState
|
|
16
|
+
import { AbstractModelValidator, GCompartment, GLabel, GModelElement, Marker, MarkerKind, ModelState } from '@eclipse-glsp/server';
|
|
17
17
|
import { inject, injectable } from 'inversify';
|
|
18
18
|
import { ActivityNode, TaskNode } from '../graph-extension';
|
|
19
19
|
|
|
20
20
|
@injectable()
|
|
21
|
-
export class WorkflowModelValidator
|
|
21
|
+
export class WorkflowModelValidator extends AbstractModelValidator {
|
|
22
22
|
@inject(ModelState)
|
|
23
23
|
protected readonly modelState: ModelState;
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
override doLiveValidation(element: GModelElement): Marker[] {
|
|
26
26
|
const markers: Marker[] = [];
|
|
27
|
-
|
|
28
|
-
if (element
|
|
29
|
-
markers.push(...this.
|
|
30
|
-
} else if (element
|
|
31
|
-
|
|
32
|
-
markers.push(...this.validateDecisionNode(element));
|
|
33
|
-
} else if (element.nodeType === 'mergeNode') {
|
|
34
|
-
markers.push(...this.validateMergeNode(element));
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
if (element.children) {
|
|
38
|
-
markers.push(...this.validate(element.children));
|
|
27
|
+
if (element instanceof ActivityNode) {
|
|
28
|
+
if (element.nodeType === 'decisionNode') {
|
|
29
|
+
markers.push(...this.validateDecisionNode(element));
|
|
30
|
+
} else if (element.nodeType === 'mergeNode') {
|
|
31
|
+
markers.push(...this.validateMergeNode(element));
|
|
39
32
|
}
|
|
40
33
|
}
|
|
41
34
|
return markers;
|
|
42
35
|
}
|
|
43
36
|
|
|
37
|
+
override doBatchValidation(element: GModelElement): Marker[] {
|
|
38
|
+
const markers: Marker[] = [];
|
|
39
|
+
if (element instanceof TaskNode) {
|
|
40
|
+
markers.push(...this.validateTaskNode(element));
|
|
41
|
+
}
|
|
42
|
+
return markers;
|
|
43
|
+
}
|
|
44
|
+
|
|
44
45
|
protected validateTaskNode(taskNode: TaskNode): Marker[] {
|
|
45
46
|
const markers: Marker[] = [];
|
|
46
47
|
const automated = this.validateTaskNode_isAutomated(taskNode);
|
package/src/node/app.ts
CHANGED
|
@@ -13,45 +13,33 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
import 'reflect-metadata';
|
|
17
|
+
|
|
16
18
|
import { configureELKLayoutModule } from '@eclipse-glsp/layout-elk';
|
|
17
|
-
import {
|
|
18
|
-
createAppModule,
|
|
19
|
-
GModelStorage,
|
|
20
|
-
Logger,
|
|
21
|
-
LoggerFactory,
|
|
22
|
-
SocketServerLauncher,
|
|
23
|
-
WebSocketServerLauncher
|
|
24
|
-
} from '@eclipse-glsp/server/node';
|
|
19
|
+
import { createAppModule, GModelStorage, SocketServerLauncher, WebSocketServerLauncher } from '@eclipse-glsp/server/node';
|
|
25
20
|
import { Container } from 'inversify';
|
|
21
|
+
|
|
26
22
|
import { WorkflowLayoutConfigurator } from '../common/layout/workflow-layout-configurator';
|
|
27
23
|
import { WorkflowDiagramModule, WorkflowServerModule } from '../common/workflow-diagram-module';
|
|
28
24
|
import { createWorkflowCliParser } from './workflow-cli-parser';
|
|
29
25
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const appContainer = new Container();
|
|
35
|
-
appContainer.load(createAppModule(options));
|
|
26
|
+
async function launch(argv?: string[]): Promise<void> {
|
|
27
|
+
const options = createWorkflowCliParser().parse(argv);
|
|
28
|
+
const appContainer = new Container();
|
|
29
|
+
appContainer.load(createAppModule(options));
|
|
36
30
|
|
|
37
|
-
|
|
31
|
+
const elkLayoutModule = configureELKLayoutModule({ algorithms: ['layered'], layoutConfigurator: WorkflowLayoutConfigurator });
|
|
32
|
+
const serverModule = new WorkflowServerModule().configureDiagramModule(new WorkflowDiagramModule(() => GModelStorage), elkLayoutModule);
|
|
38
33
|
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
launcher.configure(serverModule);
|
|
48
|
-
launcher.start({ port: options.port, host: options.host, path: 'workflow' });
|
|
49
|
-
} else {
|
|
50
|
-
const launcher = appContainer.resolve(SocketServerLauncher);
|
|
51
|
-
launcher.configure(serverModule);
|
|
52
|
-
launcher.start({ port: options.port, host: options.host });
|
|
53
|
-
}
|
|
54
|
-
} catch (error) {
|
|
55
|
-
(logger ?? console).error('Error in workflow server launcher:', error);
|
|
34
|
+
if (options.webSocket) {
|
|
35
|
+
const launcher = appContainer.resolve(WebSocketServerLauncher);
|
|
36
|
+
launcher.configure(serverModule);
|
|
37
|
+
launcher.start({ port: options.port, host: options.host, path: 'workflow' });
|
|
38
|
+
} else {
|
|
39
|
+
const launcher = appContainer.resolve(SocketServerLauncher);
|
|
40
|
+
launcher.configure(serverModule);
|
|
41
|
+
launcher.start({ port: options.port, host: options.host });
|
|
56
42
|
}
|
|
57
43
|
}
|
|
44
|
+
|
|
45
|
+
launch(process.argv).catch(error => console.error('Error in workflow server launcher:', error));
|
package/src/node/index.ts
CHANGED
|
@@ -13,7 +13,5 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
launch(process.argv);
|
|
16
|
+
export * from '../common/index';
|
|
17
|
+
export * from './workflow-cli-parser';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2023 EclipseSource and others.
|
|
2
|
+
* Copyright (c) 2022-2023 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
|