@valtimo/migration 4.15.3-next-main.15 → 4.15.3-next-main.16
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/bundles/valtimo-migration.umd.js +27 -23
- package/bundles/valtimo-migration.umd.js.map +1 -1
- package/bundles/valtimo-migration.umd.min.js +1 -1
- package/bundles/valtimo-migration.umd.min.js.map +1 -1
- package/esm2015/lib/migration-process-diagram/migration-process-diagram.component.js +3 -3
- package/esm2015/lib/migration-routing.module.js +3 -6
- package/esm2015/lib/migration.component.js +23 -16
- package/esm2015/lib/migration.module.js +3 -3
- package/esm2015/lib/migration.service.js +3 -4
- package/esm2015/public-api.js +1 -1
- package/esm2015/valtimo-migration.js +1 -1
- package/fesm2015/valtimo-migration.js +29 -26
- package/fesm2015/valtimo-migration.js.map +1 -1
- package/package.json +1 -1
- package/valtimo-migration.metadata.json +1 -1
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
MigrationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MigrationService_Factory() { return new MigrationService(); }, token: MigrationService, providedIn: "root" });
|
|
28
28
|
MigrationService.decorators = [
|
|
29
29
|
{ type: i0.Injectable, args: [{
|
|
30
|
-
providedIn: 'root'
|
|
30
|
+
providedIn: 'root',
|
|
31
31
|
},] }
|
|
32
32
|
];
|
|
33
33
|
MigrationService.ctorParameters = function () { return []; };
|
|
@@ -55,25 +55,25 @@
|
|
|
55
55
|
this.processDefinitions = [];
|
|
56
56
|
this.selectedVersions = {
|
|
57
57
|
source: [],
|
|
58
|
-
target: []
|
|
58
|
+
target: [],
|
|
59
59
|
};
|
|
60
60
|
this.selectedId = {
|
|
61
61
|
source: null,
|
|
62
|
-
target: null
|
|
62
|
+
target: null,
|
|
63
63
|
};
|
|
64
64
|
this.loaded = {
|
|
65
65
|
source: false,
|
|
66
|
-
target: false
|
|
66
|
+
target: false,
|
|
67
67
|
};
|
|
68
68
|
this.fields = {
|
|
69
69
|
source: {
|
|
70
70
|
definition: null,
|
|
71
|
-
version: null
|
|
71
|
+
version: null,
|
|
72
72
|
},
|
|
73
73
|
target: {
|
|
74
74
|
definition: null,
|
|
75
|
-
version: null
|
|
76
|
-
}
|
|
75
|
+
version: null,
|
|
76
|
+
},
|
|
77
77
|
};
|
|
78
78
|
this.processCount = null;
|
|
79
79
|
this.uniqueFlowNodeMap = [];
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
MigrationComponent.prototype.ngAfterViewInit = function () {
|
|
87
87
|
this.diagram = {
|
|
88
88
|
source: this.sourceDiagram,
|
|
89
|
-
target: this.targetDiagram
|
|
89
|
+
target: this.targetDiagram,
|
|
90
90
|
};
|
|
91
91
|
};
|
|
92
92
|
Object.defineProperty(MigrationComponent.prototype, "taskMappingLength", {
|
|
@@ -98,7 +98,9 @@
|
|
|
98
98
|
});
|
|
99
99
|
MigrationComponent.prototype.loadProcessDefinitions = function () {
|
|
100
100
|
var _this = this;
|
|
101
|
-
this.processService
|
|
101
|
+
this.processService
|
|
102
|
+
.getProcessDefinitions()
|
|
103
|
+
.subscribe(function (processDefinitions) {
|
|
102
104
|
_this.processDefinitions = processDefinitions;
|
|
103
105
|
});
|
|
104
106
|
};
|
|
@@ -108,7 +110,9 @@
|
|
|
108
110
|
this.selectedVersions[type] = [];
|
|
109
111
|
this.clearProcess(type);
|
|
110
112
|
if (key) {
|
|
111
|
-
this.processService
|
|
113
|
+
this.processService
|
|
114
|
+
.getProcessDefinitionVersions(key)
|
|
115
|
+
.subscribe(function (processDefinitionVersions) {
|
|
112
116
|
_this.selectedVersions[type] = processDefinitionVersions;
|
|
113
117
|
});
|
|
114
118
|
}
|
|
@@ -149,7 +153,8 @@
|
|
|
149
153
|
var sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;
|
|
150
154
|
var targetFlowNodeMap = this.targetDiagram.flowNodeMap;
|
|
151
155
|
if (sourceFlowNodeMap != null && targetFlowNodeMap != null) {
|
|
152
|
-
this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(function (sourceFlowNode) { return !targetFlowNodeMap.some(function (targetFlowNode) { return sourceFlowNode.id === targetFlowNode.id &&
|
|
156
|
+
this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(function (sourceFlowNode) { return !targetFlowNodeMap.some(function (targetFlowNode) { return sourceFlowNode.id === targetFlowNode.id &&
|
|
157
|
+
sourceFlowNode.$type === targetFlowNode.$type; }); });
|
|
153
158
|
}
|
|
154
159
|
};
|
|
155
160
|
MigrationComponent.prototype.getFilteredTargetFlowNodeMap = function (flowNodeType) {
|
|
@@ -167,19 +172,21 @@
|
|
|
167
172
|
};
|
|
168
173
|
MigrationComponent.prototype.migrateProcess = function () {
|
|
169
174
|
var _this = this;
|
|
170
|
-
this.processService
|
|
175
|
+
this.processService
|
|
176
|
+
.migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping)
|
|
177
|
+
.subscribe(function (res) {
|
|
171
178
|
_this.alertService.success('Process successfully migrated!');
|
|
172
179
|
_this.clearProcess('source');
|
|
173
180
|
_this.clearProcess('target');
|
|
174
181
|
_this.fields = {
|
|
175
182
|
source: {
|
|
176
183
|
definition: null,
|
|
177
|
-
version: null
|
|
184
|
+
version: null,
|
|
178
185
|
},
|
|
179
186
|
target: {
|
|
180
187
|
definition: null,
|
|
181
|
-
version: null
|
|
182
|
-
}
|
|
188
|
+
version: null,
|
|
189
|
+
},
|
|
183
190
|
};
|
|
184
191
|
}, function (err) {
|
|
185
192
|
_this.alertService.error('Process migration failed!');
|
|
@@ -191,7 +198,7 @@
|
|
|
191
198
|
MigrationComponent.decorators = [
|
|
192
199
|
{ type: i0.Component, args: [{
|
|
193
200
|
selector: 'valtimo-migration',
|
|
194
|
-
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row mb-5\">\n <div class=\"col-12\">\n <div class=\"alert alert-warning pl-2 plr-2\" role=\"alert\">\n <div class=\"icon\"><span class=\"mdi mdi-alert-triangle\"></span></div>\n <div class=\"message\" [innerHTML]=\"'Process migration warning' | translate\"
|
|
201
|
+
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row mb-5\">\n <div class=\"col-12\">\n <div class=\"alert alert-warning pl-2 plr-2\" role=\"alert\">\n <div class=\"icon\"><span class=\"mdi mdi-alert-triangle\"></span></div>\n <div class=\"message\" [innerHTML]=\"'Process migration warning' | translate\"></div>\n </div>\n </div>\n </div>\n <div class=\"row mb-5\">\n <div class=\"col-4\">\n <label for=\"sourceDef\">Source Definition</label>\n <select\n class=\"form-control\"\n id=\"sourceDef\"\n [ngModel]=\"fields.source.definition\"\n (ngModelChange)=\"loadProcessDefinitionVersions($event, 'source')\"\n >\n <option [ngValue]=\"null\" selected>- Source Definition -</option>\n <option *ngFor=\"let processDef of processDefinitions\" [ngValue]=\"processDef.key\">\n {{ processDef.name }}\n </option>\n </select>\n </div>\n <div class=\"col-2\">\n <label for=\"sourceVer\">Source Version</label>\n <select\n class=\"form-control\"\n id=\"sourceVer\"\n [ngModel]=\"fields.source.version\"\n (ngModelChange)=\"loadProcess($event, 'source')\"\n >\n <option [ngValue]=\"null\" selected>- Source Version -</option>\n <option *ngFor=\"let processVer of selectedVersions.source\" [ngValue]=\"processVer.id\">\n {{ processVer.version }}\n </option>\n </select>\n </div>\n <div class=\"col-4\">\n <label for=\"targetDef\">Target Definition</label>\n <select\n class=\"form-control\"\n id=\"targetDef\"\n [ngModel]=\"fields.target.definition\"\n (ngModelChange)=\"loadProcessDefinitionVersions($event, 'target')\"\n >\n <option [ngValue]=\"null\" selected>- Target Definition -</option>\n <option *ngFor=\"let processDef of processDefinitions\" [ngValue]=\"processDef.key\">\n {{ processDef.name }}\n </option>\n </select>\n </div>\n <div class=\"col-2\">\n <label for=\"targetVer\">Target Version</label>\n <select\n class=\"form-control\"\n id=\"targetVer\"\n [ngModel]=\"fields.target.version\"\n (ngModelChange)=\"loadProcess($event, 'target')\"\n >\n <option [ngValue]=\"null\" selected>- Target Version -</option>\n <option *ngFor=\"let processVer of selectedVersions.target\" [ngValue]=\"processVer.id\">\n {{ processVer.version }}\n </option>\n </select>\n </div>\n </div>\n\n <div class=\"row mb-5\">\n <div class=\"col-6\">\n <valtimo-migration-process-diagram\n name=\"source\"\n (loaded)=\"diagramLoaded($event)\"\n #sourceDiagram\n ></valtimo-migration-process-diagram>\n </div>\n <div class=\"col-6\">\n <valtimo-migration-process-diagram\n name=\"target\"\n (loaded)=\"diagramLoaded($event)\"\n #targetDiagram\n ></valtimo-migration-process-diagram>\n </div>\n </div>\n <table class=\"table table-striped mb-5\" *ngIf=\"selectedId.source && selectedId.target\">\n <tr *ngFor=\"let node of uniqueFlowNodeMap\">\n <td>{{ node.name ? node.name : node.id }}</td>\n <td>\n <select class=\"form-control\" (change)=\"taskMapping[node.id] = $event.target.value\">\n <option [value]=\"null\" disabled selected>- Choose Target -</option>\n <option\n *ngFor=\"let targetFlowNode of getFilteredTargetFlowNodeMap(node.$type)\"\n [value]=\"targetFlowNode.id\"\n >\n {{ targetFlowNode.name ? targetFlowNode.name : targetFlowNode.id }}\n </option>\n </select>\n </td>\n </tr>\n </table>\n <hr />\n <div class=\"btn-group mb-5\">\n <button\n [disabled]=\"\n (uniqueFlowNodeMap.length !== taskMappingLength && uniqueFlowNodeMap.length > 0) ||\n !loaded.source ||\n !loaded.target\n \"\n (click)=\"migrateProcess()\"\n class=\"btn btn-primary\"\n >\n Migrate\n <span *ngIf=\"processCount !== null\" class=\"badge badge-pill badge-secondary\">{{\n processCount\n }}</span>\n </button>\n </div>\n </div>\n</div>\n",
|
|
195
202
|
styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"]
|
|
196
203
|
},] }
|
|
197
204
|
];
|
|
@@ -236,11 +243,8 @@
|
|
|
236
243
|
}());
|
|
237
244
|
MigrationRoutingModule.decorators = [
|
|
238
245
|
{ type: i0.NgModule, args: [{
|
|
239
|
-
imports: [
|
|
240
|
-
|
|
241
|
-
router.RouterModule.forChild(routes),
|
|
242
|
-
],
|
|
243
|
-
exports: [router.RouterModule]
|
|
246
|
+
imports: [common.CommonModule, router.RouterModule.forChild(routes)],
|
|
247
|
+
exports: [router.RouterModule],
|
|
244
248
|
},] }
|
|
245
249
|
];
|
|
246
250
|
|
|
@@ -348,9 +352,9 @@
|
|
|
348
352
|
forms.ReactiveFormsModule,
|
|
349
353
|
components.WidgetModule,
|
|
350
354
|
forms.FormsModule,
|
|
351
|
-
core.TranslateModule
|
|
355
|
+
core.TranslateModule,
|
|
352
356
|
],
|
|
353
|
-
exports: [MigrationComponent]
|
|
357
|
+
exports: [MigrationComponent],
|
|
354
358
|
},] }
|
|
355
359
|
];
|
|
356
360
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valtimo-migration.umd.js","sources":["../../../../projects/valtimo/migration/src/lib/migration.service.ts","../../../../projects/valtimo/migration/src/lib/migration.component.ts","../../../../projects/valtimo/migration/src/lib/migration-routing.module.ts","../../../../projects/valtimo/migration/src/lib/migration-process-diagram/migration-process-diagram.component.ts","../../../../projects/valtimo/migration/src/lib/migration.module.ts","../../../../projects/valtimo/migration/src/public-api.ts","../../../../projects/valtimo/migration/src/valtimo-migration.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MigrationService {\n\n constructor() {\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';\nimport {ProcessService} from '@valtimo/process';\nimport {ProcessDefinition} from '@valtimo/contract';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {NGXLogger} from 'ngx-logger';\nimport {AlertService} from '@valtimo/components';\n\n@Component({\n selector: 'valtimo-migration',\n templateUrl: './migration.component.html',\n styleUrls: ['./migration.component.scss']\n})\nexport class MigrationComponent implements OnInit, AfterViewInit {\n\n public processDefinitions: ProcessDefinition[] = [];\n public selectedVersions = {\n source: [],\n target: []\n };\n public selectedId = {\n source: null,\n target: null\n };\n public loaded = {\n source: false,\n target: false\n };\n public fields = {\n source: {\n definition: null,\n version: null\n },\n target: {\n definition: null,\n version: null\n }\n };\n\n public processCount: number | null = null;\n public uniqueFlowNodeMap: any[] = [];\n public taskMapping: any = {};\n\n @ViewChild('sourceDiagram') sourceDiagram: MigrationProcessDiagramComponent;\n @ViewChild('targetDiagram') targetDiagram: MigrationProcessDiagramComponent;\n\n public diagram: any = null;\n\n constructor(private processService: ProcessService, private logger: NGXLogger, private alertService: AlertService) {\n }\n\n ngOnInit() {\n this.loadProcessDefinitions();\n }\n\n ngAfterViewInit() {\n this.diagram = {\n source: this.sourceDiagram,\n target: this.targetDiagram\n };\n }\n\n public get taskMappingLength() {\n return Object.keys(this.taskMapping).length;\n }\n\n loadProcessDefinitions() {\n this.processService.getProcessDefinitions().subscribe((processDefinitions: ProcessDefinition[]) => {\n this.processDefinitions = processDefinitions;\n });\n }\n\n loadProcessDefinitionVersions(key: string | null, type: string) {\n this.fields[type].definition = key;\n this.selectedVersions[type] = [];\n this.clearProcess(type);\n if (key) {\n this.processService.getProcessDefinitionVersions(key).subscribe((processDefinitionVersions: ProcessDefinition[]) => {\n this.selectedVersions[type] = processDefinitionVersions;\n });\n }\n }\n\n loadProcess(id: string | null, type: string) {\n this.fields[type].version = id;\n this.clearProcess(type);\n if (id) {\n this.loadProcessDefinitionXML(id, type);\n if (type === 'source') {\n this.loadProcessCount(id);\n }\n }\n }\n\n private clearProcess(type: string) {\n this.loaded[type] = false;\n this.selectedId[type] = null;\n this.diagram[type].clear();\n if (type === 'source') {\n this.processCount = null;\n }\n }\n\n loadProcessDefinitionXML(id: string, type: string) {\n this.processService.getProcessDefinitionXml(id).subscribe(xml => {\n this.diagram[type].loadXml(xml['bpmn20Xml']);\n this.selectedId[type] = id;\n });\n }\n\n loadProcessCount(id: string) {\n this.processService.getProcessCount(id).subscribe(response => {\n this.processCount = response.count;\n });\n }\n\n setUniqueFlowNodeMap() {\n this.uniqueFlowNodeMap = [];\n const sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n\n if (sourceFlowNodeMap != null && targetFlowNodeMap != null) {\n this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(sourceFlowNode =>\n !targetFlowNodeMap.some(targetFlowNode =>\n sourceFlowNode.id === targetFlowNode.id && sourceFlowNode.$type === targetFlowNode.$type));\n }\n }\n\n getFilteredTargetFlowNodeMap(flowNodeType) {\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n return targetFlowNodeMap.filter(function (flowNode) {\n return flowNode.$type === flowNodeType;\n });\n }\n\n diagramLoaded(diagramName: string) {\n this.loaded[diagramName] = true;\n if (this.loaded.source && this.loaded.target) {\n this.taskMapping = {};\n this.setUniqueFlowNodeMap();\n }\n }\n\n migrateProcess() {\n this.processService.migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping).subscribe((res) => {\n this.alertService.success('Process successfully migrated!');\n this.clearProcess('source');\n this.clearProcess('target');\n this.fields = {\n source: {\n definition: null,\n version: null\n },\n target: {\n definition: null,\n version: null\n }\n };\n }, err => {\n this.alertService.error('Process migration failed!');\n this.logger.debug(err);\n });\n }\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {MigrationComponent} from './migration.component';\nimport {ROLE_ADMIN} from '@valtimo/contract';\n\nconst routes: Routes = [\n {\n path: 'process-migration',\n component: MigrationComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Process migration', roles: [ROLE_ADMIN]},\n },\n];\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule.forChild(routes),\n ],\n exports: [RouterModule]\n})\nexport class MigrationRoutingModule {\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild} from '@angular/core';\n\nimport * as BpmnJS from 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js';\nimport {NGXLogger} from 'ngx-logger';\n\n@Component({\n selector: 'valtimo-migration-process-diagram',\n templateUrl: './migration-process-diagram.component.html',\n styleUrls: ['./migration-process-diagram.component.scss']\n})\nexport class MigrationProcessDiagramComponent implements OnInit, OnDestroy {\n\n private bpmnJS: BpmnJS;\n public flowNodeMap: any = null;\n\n @ViewChild('ref') public el: ElementRef;\n @Input() name: string;\n @Output() loaded = new EventEmitter();\n\n constructor(private logger: NGXLogger) {\n }\n\n ngOnInit() {\n this.bpmnJS = new BpmnJS();\n this.bpmnJS.on('import.done', ({error}: any) => {\n if (!error) {\n const canvas = this.bpmnJS.get('canvas');\n canvas.zoom('fit-viewport', 'auto');\n\n }\n });\n }\n\n ngOnDestroy() {\n if (this.bpmnJS) {\n this.bpmnJS.destroy();\n }\n }\n\n clear() {\n this.bpmnJS.clear();\n }\n\n public loadXml(xml: string): void {\n this.bpmnJS.attachTo(this.el.nativeElement);\n this.bpmnJS.importXML(xml, (err) => {\n this.logger.debug(err);\n const processElements = this.bpmnJS.getDefinitions().rootElements.filter(function (element) {\n return element.isExecutable;\n });\n this.flowNodeMap = processElements[0].flowElements.filter(function (element) {\n if (element.name === null || element.name === '') {\n element.name = element.id;\n }\n return element.$type !== 'bpmn:SequenceFlow';\n });\n this.loaded.emit(this.name);\n });\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {MigrationComponent} from './migration.component';\nimport {MigrationRoutingModule} from './migration-routing.module';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {WidgetModule} from '@valtimo/components';\nimport {TranslateModule} from '@ngx-translate/core';\n\n\n@NgModule({\n declarations: [MigrationComponent, MigrationProcessDiagramComponent],\n imports: [\n CommonModule,\n MigrationRoutingModule,\n ReactiveFormsModule,\n WidgetModule,\n FormsModule,\n TranslateModule\n ],\n exports: [MigrationComponent]\n})\nexport class MigrationModule {\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of migration\n */\n\nexport * from './lib/migration.service';\nexport * from './lib/migration.component';\nexport * from './lib/migration.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {MigrationProcessDiagramComponent as ɵa} from './lib/migration-process-diagram/migration-process-diagram.component';\nexport {MigrationRoutingModule as ɵb} from './lib/migration-routing.module';"],"names":["Injectable","Component","ProcessService","NGXLogger","AlertService","ViewChild","ROLE_ADMIN","AuthGuardService","NgModule","CommonModule","RouterModule","EventEmitter","Input","Output","ReactiveFormsModule","WidgetModule","FormsModule","TranslateModule"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;;;QAuBE;SACC;;;;;gBANFA,aAAU,SAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;;ICpBD;;;;;;;;;;;;;;;;QA+DE,4BAAoB,cAA8B,EAAU,MAAiB,EAAU,YAA0B;YAA7F,mBAAc,GAAd,cAAc,CAAgB;YAAU,WAAM,GAAN,MAAM,CAAW;YAAU,iBAAY,GAAZ,YAAY,CAAc;YAjC1G,uBAAkB,GAAwB,EAAE,CAAC;YAC7C,qBAAgB,GAAG;gBACxB,MAAM,EAAE,EAAE;gBACV,MAAM,EAAE,EAAE;aACX,CAAC;YACK,eAAU,GAAG;gBAClB,MAAM,EAAE,IAAI;gBACZ,MAAM,EAAE,IAAI;aACb,CAAC;YACK,WAAM,GAAG;gBACd,MAAM,EAAE,KAAK;gBACb,MAAM,EAAE,KAAK;aACd,CAAC;YACK,WA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AAO,CAAC,IAAI,KAAK,EAAE,EAAE;wBAChD,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,EAAE,CAAC;qBAC3B;oBACD,OAAO,OAAO,CAAC,KAAK,KAAK,mBAAmB,CAAC;iBAC9C,CAAC,CAAC;gBACH,KAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAI,CAAC,IAAI,CAAC,CAAC;aAC7B,CAAC,CAAC;SACJ;;;;gBArDFV,YAAS,SAAC;oBACT,QAAQ,EAAE,mCAAmC;oBAC7C,0sBAAyD;;iBAE1D;;;gBANOE,mBAAS;;;qBAYdE,YAAS,SAAC,KAAK;uBACfO,QAAK;yBACLC,SAAM;;;ICjCT;;;;;;;;;;;;;;;;QAsCA;;;;;gBAZCL,WAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,kBAAkB,EAAE,gCAAgC,CAAC;oBACpE,OAAO,EAAE;wBACPC,mBAAY;wBACZ,sBAAsB;wBACtBK,yBAAmB;wBACnBC,uBAAY;wBACZC,iBAAW;wBACXC,oBAAe;qBAChB;oBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;iBAC9B;;;ICrCD;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"valtimo-migration.umd.js","sources":["../../../../projects/valtimo/migration/src/lib/migration.service.ts","../../../../projects/valtimo/migration/src/lib/migration.component.ts","../../../../projects/valtimo/migration/src/lib/migration-routing.module.ts","../../../../projects/valtimo/migration/src/lib/migration-process-diagram/migration-process-diagram.component.ts","../../../../projects/valtimo/migration/src/lib/migration.module.ts","../../../../projects/valtimo/migration/src/public-api.ts","../../../../projects/valtimo/migration/src/valtimo-migration.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MigrationService {\n constructor() {}\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';\nimport {ProcessService} from '@valtimo/process';\nimport {ProcessDefinition} from '@valtimo/contract';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {NGXLogger} from 'ngx-logger';\nimport {AlertService} from '@valtimo/components';\n\n@Component({\n selector: 'valtimo-migration',\n templateUrl: './migration.component.html',\n styleUrls: ['./migration.component.scss'],\n})\nexport class MigrationComponent implements OnInit, AfterViewInit {\n public processDefinitions: ProcessDefinition[] = [];\n public selectedVersions = {\n source: [],\n target: [],\n };\n public selectedId = {\n source: null,\n target: null,\n };\n public loaded = {\n source: false,\n target: false,\n };\n public fields = {\n source: {\n definition: null,\n version: null,\n },\n target: {\n definition: null,\n version: null,\n },\n };\n\n public processCount: number | null = null;\n public uniqueFlowNodeMap: any[] = [];\n public taskMapping: any = {};\n\n @ViewChild('sourceDiagram') sourceDiagram: MigrationProcessDiagramComponent;\n @ViewChild('targetDiagram') targetDiagram: MigrationProcessDiagramComponent;\n\n public diagram: any = null;\n\n constructor(\n private processService: ProcessService,\n private logger: NGXLogger,\n private alertService: AlertService\n ) {}\n\n ngOnInit() {\n this.loadProcessDefinitions();\n }\n\n ngAfterViewInit() {\n this.diagram = {\n source: this.sourceDiagram,\n target: this.targetDiagram,\n };\n }\n\n public get taskMappingLength() {\n return Object.keys(this.taskMapping).length;\n }\n\n loadProcessDefinitions() {\n this.processService\n .getProcessDefinitions()\n .subscribe((processDefinitions: ProcessDefinition[]) => {\n this.processDefinitions = processDefinitions;\n });\n }\n\n loadProcessDefinitionVersions(key: string | null, type: string) {\n this.fields[type].definition = key;\n this.selectedVersions[type] = [];\n this.clearProcess(type);\n if (key) {\n this.processService\n .getProcessDefinitionVersions(key)\n .subscribe((processDefinitionVersions: ProcessDefinition[]) => {\n this.selectedVersions[type] = processDefinitionVersions;\n });\n }\n }\n\n loadProcess(id: string | null, type: string) {\n this.fields[type].version = id;\n this.clearProcess(type);\n if (id) {\n this.loadProcessDefinitionXML(id, type);\n if (type === 'source') {\n this.loadProcessCount(id);\n }\n }\n }\n\n private clearProcess(type: string) {\n this.loaded[type] = false;\n this.selectedId[type] = null;\n this.diagram[type].clear();\n if (type === 'source') {\n this.processCount = null;\n }\n }\n\n loadProcessDefinitionXML(id: string, type: string) {\n this.processService.getProcessDefinitionXml(id).subscribe(xml => {\n this.diagram[type].loadXml(xml['bpmn20Xml']);\n this.selectedId[type] = id;\n });\n }\n\n loadProcessCount(id: string) {\n this.processService.getProcessCount(id).subscribe(response => {\n this.processCount = response.count;\n });\n }\n\n setUniqueFlowNodeMap() {\n this.uniqueFlowNodeMap = [];\n const sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n\n if (sourceFlowNodeMap != null && targetFlowNodeMap != null) {\n this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(\n sourceFlowNode =>\n !targetFlowNodeMap.some(\n targetFlowNode =>\n sourceFlowNode.id === targetFlowNode.id &&\n sourceFlowNode.$type === targetFlowNode.$type\n )\n );\n }\n }\n\n getFilteredTargetFlowNodeMap(flowNodeType) {\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n return targetFlowNodeMap.filter(function (flowNode) {\n return flowNode.$type === flowNodeType;\n });\n }\n\n diagramLoaded(diagramName: string) {\n this.loaded[diagramName] = true;\n if (this.loaded.source && this.loaded.target) {\n this.taskMapping = {};\n this.setUniqueFlowNodeMap();\n }\n }\n\n migrateProcess() {\n this.processService\n .migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping)\n .subscribe(\n res => {\n this.alertService.success('Process successfully migrated!');\n this.clearProcess('source');\n this.clearProcess('target');\n this.fields = {\n source: {\n definition: null,\n version: null,\n },\n target: {\n definition: null,\n version: null,\n },\n };\n },\n err => {\n this.alertService.error('Process migration failed!');\n this.logger.debug(err);\n }\n );\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {MigrationComponent} from './migration.component';\nimport {ROLE_ADMIN} from '@valtimo/contract';\n\nconst routes: Routes = [\n {\n path: 'process-migration',\n component: MigrationComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Process migration', roles: [ROLE_ADMIN]},\n },\n];\n\n@NgModule({\n imports: [CommonModule, RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class MigrationRoutingModule {}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\n\nimport * as BpmnJS from 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js';\nimport {NGXLogger} from 'ngx-logger';\n\n@Component({\n selector: 'valtimo-migration-process-diagram',\n templateUrl: './migration-process-diagram.component.html',\n styleUrls: ['./migration-process-diagram.component.scss'],\n})\nexport class MigrationProcessDiagramComponent implements OnInit, OnDestroy {\n private bpmnJS: BpmnJS;\n public flowNodeMap: any = null;\n\n @ViewChild('ref') public el: ElementRef;\n @Input() name: string;\n @Output() loaded = new EventEmitter();\n\n constructor(private logger: NGXLogger) {}\n\n ngOnInit() {\n this.bpmnJS = new BpmnJS();\n this.bpmnJS.on('import.done', ({error}: any) => {\n if (!error) {\n const canvas = this.bpmnJS.get('canvas');\n canvas.zoom('fit-viewport', 'auto');\n }\n });\n }\n\n ngOnDestroy() {\n if (this.bpmnJS) {\n this.bpmnJS.destroy();\n }\n }\n\n clear() {\n this.bpmnJS.clear();\n }\n\n public loadXml(xml: string): void {\n this.bpmnJS.attachTo(this.el.nativeElement);\n this.bpmnJS.importXML(xml, err => {\n this.logger.debug(err);\n const processElements = this.bpmnJS.getDefinitions().rootElements.filter(function (element) {\n return element.isExecutable;\n });\n this.flowNodeMap = processElements[0].flowElements.filter(function (element) {\n if (element.name === null || element.name === '') {\n element.name = element.id;\n }\n return element.$type !== 'bpmn:SequenceFlow';\n });\n this.loaded.emit(this.name);\n });\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {MigrationComponent} from './migration.component';\nimport {MigrationRoutingModule} from './migration-routing.module';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {WidgetModule} from '@valtimo/components';\nimport {TranslateModule} from '@ngx-translate/core';\n\n@NgModule({\n declarations: [MigrationComponent, MigrationProcessDiagramComponent],\n imports: [\n CommonModule,\n MigrationRoutingModule,\n ReactiveFormsModule,\n WidgetModule,\n FormsModule,\n TranslateModule,\n ],\n exports: [MigrationComponent],\n})\nexport class MigrationModule {}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of migration\n */\n\nexport * from './lib/migration.service';\nexport * from './lib/migration.component';\nexport * from './lib/migration.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {MigrationProcessDiagramComponent as ɵa} from './lib/migration-process-diagram/migration-process-diagram.component';\nexport {MigrationRoutingModule as ɵb} from './lib/migration-routing.module';"],"names":["Injectable","Component","ProcessService","NGXLogger","AlertService","ViewChild","ROLE_ADMIN","AuthGuardService","NgModule","CommonModule","RouterModule","EventEmitter","Input","Output","ReactiveFormsModule","WidgetModule","FormsModule","TranslateModule"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;;;QAsBE;SAAgB;;;;;gBAJjBA,aAAU,SAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;;ICpBD;;;;;;;;;;;;;;;;QA8DE,4BACU,cAA8B,EAC9B,MAAiB,EACjB,YAA0B;YAF1B,mBAAc,GAAd,cAAc,CAAgB;YAC9B,WAAM,GAAN,MAAM,CAAW;YACjB,iBAAY,GAAZ,YAAY,CAAc;YApC7B,uBAAkB,GAAwB,EAAE,CAAC;YAC7C,qBAAgB,GAAG;gBACxB,MAAM,EAAE,EAAE;gBACV,MAAM,EAAE,EAAE;aACX,CAAC;YACK,eAAU,GAAG;gBAClB,MAAM,EAAE,IAAI;gBACZ,MAAM,EAAE,IAAI;aACb,CAAC;YACK,WAAM,GAAG;gBACd,MAAM,EAAE,KAAK;gBACb,MAAM,EAAE,KAAK;aACd,CAAC;YACK,WAAM,GAAG;gBACd,MAAM,EAAE;oBACN,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,IAAI;iBACd;gBACD,MAAM,EAAE;oBACN,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,IAAI;iBACd;aACF,CAAC;YAEK,iBAAY,GAAkB,IAAI,CAAC;YACnC,sBAAiB,GAAU,EAAE,CAAC;YAC9B,gBAAW,GAAQ,EAAE,CAAC;YAKtB,YAAO,GAAQ,IAAI,CAAC;SAMvB;QAEJ,qCAAQ,GAAR;YACE,IAAI,CAAC,sBAAsB,EAAE,CAAC;SAC/B;QAED,4CAAe,GAAf;YACE,IAAI,CAAC,OAAO,GAAG;gBACb,MAAM,EAAE,IAAI,CAAC,aAAa;gBAC1B,MAAM,EAAE,IAAI,CAAC,aAAa;aAC3B,CAAC;SACH;QAED,sBAAW,iDAAiB;iBAA5B;gBACE,OAAO,MAAM,CAAC,I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Y;wBACZ,sBAAsB;wBACtBK,yBAAmB;wBACnBC,uBAAY;wBACZC,iBAAW;wBACXC,oBAAe;qBAChB;oBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;iBAC9B;;;ICpCD;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core"),require("@valtimo/process"),require("ngx-logger"),require("@valtimo/components"),require("@angular/router"),require("@angular/common"),require("@valtimo/security"),require("@valtimo/contract"),require("@angular/forms"),require("bpmn-js/dist/bpmn-navigated-viewer.production.min.js"),require("@ngx-translate/core")):"function"==typeof define&&define.amd?define("@valtimo/migration",["exports","@angular/core","@valtimo/process","ngx-logger","@valtimo/components","@angular/router","@angular/common","@valtimo/security","@valtimo/contract","@angular/forms","bpmn-js/dist/bpmn-navigated-viewer.production.min.js","@ngx-translate/core"],n):n(((e=e||self).valtimo=e.valtimo||{},e.valtimo.migration={}),e.ng.core,e.process,e.ngxLogger,e.components,e.ng.router,e.ng.common,e.security,e.contract,e.ng.forms,e.BpmnJS,e.core)}(this,(function(e,n,t,o,i,r,s,a,l,c,d,u){"use strict";var p=function(){};p.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new p},token:p,providedIn:"root"}),p.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],p.ctorParameters=function(){return[]};var g=function(){function e(e,n,t){this.processService=e,this.logger=n,this.alertService=t,this.processDefinitions=[],this.selectedVersions={source:[],target:[]},this.selectedId={source:null,target:null},this.loaded={source:!1,target:!1},this.fields={source:{definition:null,version:null},target:{definition:null,version:null}},this.processCount=null,this.uniqueFlowNodeMap=[],this.taskMapping={},this.diagram=null}return e.prototype.ngOnInit=function(){this.loadProcessDefinitions()},e.prototype.ngAfterViewInit=function(){this.diagram={source:this.sourceDiagram,target:this.targetDiagram}},Object.defineProperty(e.prototype,"taskMappingLength",{get:function(){return Object.keys(this.taskMapping).length},enumerable:!1,configurable:!0}),e.prototype.loadProcessDefinitions=function(){var e=this;this.processService.getProcessDefinitions().subscribe((function(n){e.processDefinitions=n}))},e.prototype.loadProcessDefinitionVersions=function(e,n){var t=this;this.fields[n].definition=e,this.selectedVersions[n]=[],this.clearProcess(n),e&&this.processService.getProcessDefinitionVersions(e).subscribe((function(e){t.selectedVersions[n]=e}))},e.prototype.loadProcess=function(e,n){this.fields[n].version=e,this.clearProcess(n),e&&(this.loadProcessDefinitionXML(e,n),"source"===n&&this.loadProcessCount(e))},e.prototype.clearProcess=function(e){this.loaded[e]=!1,this.selectedId[e]=null,this.diagram[e].clear(),"source"===e&&(this.processCount=null)},e.prototype.loadProcessDefinitionXML=function(e,n){var t=this;this.processService.getProcessDefinitionXml(e).subscribe((function(o){t.diagram[n].loadXml(o.bpmn20Xml),t.selectedId[n]=e}))},e.prototype.loadProcessCount=function(e){var n=this;this.processService.getProcessCount(e).subscribe((function(e){n.processCount=e.count}))},e.prototype.setUniqueFlowNodeMap=function(){this.uniqueFlowNodeMap=[];var e=this.sourceDiagram.flowNodeMap,n=this.targetDiagram.flowNodeMap;null!=e&&null!=n&&(this.uniqueFlowNodeMap=e.filter((function(e){return!n.some((function(n){return e.id===n.id&&e.$type===n.$type}))})))},e.prototype.getFilteredTargetFlowNodeMap=function(e){return this.targetDiagram.flowNodeMap.filter((function(n){return n.$type===e}))},e.prototype.diagramLoaded=function(e){this.loaded[e]=!0,this.loaded.source&&this.loaded.target&&(this.taskMapping={},this.setUniqueFlowNodeMap())},e.prototype.migrateProcess=function(){var e=this;this.processService.migrateProcess(this.selectedId.source,this.selectedId.target,this.taskMapping).subscribe((function(n){e.alertService.success("Process successfully migrated!"),e.clearProcess("source"),e.clearProcess("target"),e.fields={source:{definition:null,version:null},target:{definition:null,version:null}}}),(function(n){e.alertService.error("Process migration failed!"),e.logger.debug(n)}))},e}();g.decorators=[{type:n.Component,args:[{selector:"valtimo-migration",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="main-content">\n <div class="container-fluid">\n <div class="row mb-5">\n <div class="col-12">\n <div class="alert alert-warning pl-2 plr-2" role="alert">\n <div class="icon"><span class="mdi mdi-alert-triangle"></span></div>\n <div class="message" [innerHTML]="\'Process migration warning\' | translate">\n </div>\n </div>\n </div>\n </div>\n <div class="row mb-5">\n <div class="col-4">\n <label for="sourceDef">Source Definition</label>\n <select class="form-control" id="sourceDef"\n [ngModel]="fields.source.definition" (ngModelChange)="loadProcessDefinitionVersions($event, \'source\')">\n <option [ngValue]="null" selected>- Source Definition -</option>\n <option *ngFor="let processDef of processDefinitions" [ngValue]="processDef.key">{{processDef.name}}</option>\n </select>\n </div>\n <div class="col-2">\n <label for="sourceVer">Source Version</label>\n <select class="form-control" id="sourceVer" [ngModel]="fields.source.version"\n (ngModelChange)="loadProcess($event, \'source\')">\n <option [ngValue]="null" selected>- Source Version -</option>\n <option *ngFor="let processVer of selectedVersions.source"\n [ngValue]="processVer.id">{{processVer.version}}</option>\n </select>\n </div>\n <div class="col-4">\n <label for="targetDef">Target Definition</label>\n <select class="form-control" id="targetDef" [ngModel]="fields.target.definition"\n (ngModelChange)="loadProcessDefinitionVersions($event, \'target\')">\n <option [ngValue]="null" selected>- Target Definition -</option>\n <option *ngFor="let processDef of processDefinitions" [ngValue]="processDef.key">{{processDef.name}}</option>\n </select>\n </div>\n <div class="col-2">\n <label for="targetVer">Target Version</label>\n <select class="form-control" id="targetVer" [ngModel]="fields.target.version"\n (ngModelChange)="loadProcess($event, \'target\')">\n <option [ngValue]="null" selected>- Target Version -</option>\n <option *ngFor="let processVer of selectedVersions.target"\n [ngValue]="processVer.id">{{processVer.version}}</option>\n </select>\n </div>\n </div>\n\n <div class="row mb-5">\n <div class="col-6">\n <valtimo-migration-process-diagram name="source" (loaded)="diagramLoaded($event)"\n #sourceDiagram></valtimo-migration-process-diagram>\n </div>\n <div class="col-6">\n <valtimo-migration-process-diagram name="target" (loaded)="diagramLoaded($event)"\n #targetDiagram></valtimo-migration-process-diagram>\n </div>\n </div>\n <table class="table table-striped mb-5" *ngIf="selectedId.source && selectedId.target">\n <tr *ngFor="let node of uniqueFlowNodeMap">\n <td>{{node.name ? node.name : node.id}}</td>\n <td>\n <select class="form-control" (change)="taskMapping[node.id]=$event.target.value">\n <option [value]="null" disabled selected>- Choose Target -</option>\n <option *ngFor="let targetFlowNode of getFilteredTargetFlowNodeMap(node.$type)"\n [value]="targetFlowNode.id">{{targetFlowNode.name ? targetFlowNode.name : targetFlowNode.id}}</option>\n </select>\n </td>\n </tr>\n </table>\n <hr>\n <div class="btn-group mb-5">\n <button [disabled]="(uniqueFlowNodeMap.length !== taskMappingLength && uniqueFlowNodeMap.length > 0) || !loaded.source || !loaded.target"\n (click)="migrateProcess()"\n class="btn btn-primary">Migrate <span *ngIf="processCount !== null"\n class="badge badge-pill badge-secondary">{{processCount}}</span>\n </button>\n </div>\n </div>\n</div>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */']}]}],g.ctorParameters=function(){return[{type:t.ProcessService},{type:o.NGXLogger},{type:i.AlertService}]},g.propDecorators={sourceDiagram:[{type:n.ViewChild,args:["sourceDiagram"]}],targetDiagram:[{type:n.ViewChild,args:["targetDiagram"]}]};var m={title:"Process migration",roles:[l.ROLE_ADMIN]},f=[{path:"process-migration",component:g,canActivate:[a.AuthGuardService],data:m}],h=function(){};h.decorators=[{type:n.NgModule,args:[{imports:[s.CommonModule,r.RouterModule.forChild(f)],exports:[r.RouterModule]}]}];var v=function(){function e(e){this.logger=e,this.flowNodeMap=null,this.loaded=new n.EventEmitter}return e.prototype.ngOnInit=function(){var e=this;this.bpmnJS=new d,this.bpmnJS.on("import.done",(function(n){n.error||e.bpmnJS.get("canvas").zoom("fit-viewport","auto")}))},e.prototype.ngOnDestroy=function(){this.bpmnJS&&this.bpmnJS.destroy()},e.prototype.clear=function(){this.bpmnJS.clear()},e.prototype.loadXml=function(e){var n=this;this.bpmnJS.attachTo(this.el.nativeElement),this.bpmnJS.importXML(e,(function(e){n.logger.debug(e);var t=n.bpmnJS.getDefinitions().rootElements.filter((function(e){return e.isExecutable}));n.flowNodeMap=t[0].flowElements.filter((function(e){return null!==e.name&&""!==e.name||(e.name=e.id),"bpmn:SequenceFlow"!==e.$type})),n.loaded.emit(n.name)}))},e}();v.decorators=[{type:n.Component,args:[{selector:"valtimo-migration-process-diagram",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div #ref class="diagram-container"></div>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.diagram-container-switch-holder{width:100%;z-index:1000}.diagram-container{height:48vh}']}]}],v.ctorParameters=function(){return[{type:o.NGXLogger}]},v.propDecorators={el:[{type:n.ViewChild,args:["ref"]}],name:[{type:n.Input}],loaded:[{type:n.Output}]};var b=function(){};b.decorators=[{type:n.NgModule,args:[{declarations:[g,v],imports:[s.CommonModule,h,c.ReactiveFormsModule,i.WidgetModule,c.FormsModule,u.TranslateModule],exports:[g]}]}],e.MigrationComponent=g,e.MigrationModule=b,e.MigrationService=p,e.ɵa=v,e.ɵb=h,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core"),require("@valtimo/process"),require("ngx-logger"),require("@valtimo/components"),require("@angular/router"),require("@angular/common"),require("@valtimo/security"),require("@valtimo/contract"),require("@angular/forms"),require("bpmn-js/dist/bpmn-navigated-viewer.production.min.js"),require("@ngx-translate/core")):"function"==typeof define&&define.amd?define("@valtimo/migration",["exports","@angular/core","@valtimo/process","ngx-logger","@valtimo/components","@angular/router","@angular/common","@valtimo/security","@valtimo/contract","@angular/forms","bpmn-js/dist/bpmn-navigated-viewer.production.min.js","@ngx-translate/core"],n):n(((e=e||self).valtimo=e.valtimo||{},e.valtimo.migration={}),e.ng.core,e.process,e.ngxLogger,e.components,e.ng.router,e.ng.common,e.security,e.contract,e.ng.forms,e.BpmnJS,e.core)}(this,(function(e,n,t,o,i,r,s,a,l,c,d,u){"use strict";var p=function(){};p.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new p},token:p,providedIn:"root"}),p.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],p.ctorParameters=function(){return[]};var g=function(){function e(e,n,t){this.processService=e,this.logger=n,this.alertService=t,this.processDefinitions=[],this.selectedVersions={source:[],target:[]},this.selectedId={source:null,target:null},this.loaded={source:!1,target:!1},this.fields={source:{definition:null,version:null},target:{definition:null,version:null}},this.processCount=null,this.uniqueFlowNodeMap=[],this.taskMapping={},this.diagram=null}return e.prototype.ngOnInit=function(){this.loadProcessDefinitions()},e.prototype.ngAfterViewInit=function(){this.diagram={source:this.sourceDiagram,target:this.targetDiagram}},Object.defineProperty(e.prototype,"taskMappingLength",{get:function(){return Object.keys(this.taskMapping).length},enumerable:!1,configurable:!0}),e.prototype.loadProcessDefinitions=function(){var e=this;this.processService.getProcessDefinitions().subscribe((function(n){e.processDefinitions=n}))},e.prototype.loadProcessDefinitionVersions=function(e,n){var t=this;this.fields[n].definition=e,this.selectedVersions[n]=[],this.clearProcess(n),e&&this.processService.getProcessDefinitionVersions(e).subscribe((function(e){t.selectedVersions[n]=e}))},e.prototype.loadProcess=function(e,n){this.fields[n].version=e,this.clearProcess(n),e&&(this.loadProcessDefinitionXML(e,n),"source"===n&&this.loadProcessCount(e))},e.prototype.clearProcess=function(e){this.loaded[e]=!1,this.selectedId[e]=null,this.diagram[e].clear(),"source"===e&&(this.processCount=null)},e.prototype.loadProcessDefinitionXML=function(e,n){var t=this;this.processService.getProcessDefinitionXml(e).subscribe((function(o){t.diagram[n].loadXml(o.bpmn20Xml),t.selectedId[n]=e}))},e.prototype.loadProcessCount=function(e){var n=this;this.processService.getProcessCount(e).subscribe((function(e){n.processCount=e.count}))},e.prototype.setUniqueFlowNodeMap=function(){this.uniqueFlowNodeMap=[];var e=this.sourceDiagram.flowNodeMap,n=this.targetDiagram.flowNodeMap;null!=e&&null!=n&&(this.uniqueFlowNodeMap=e.filter((function(e){return!n.some((function(n){return e.id===n.id&&e.$type===n.$type}))})))},e.prototype.getFilteredTargetFlowNodeMap=function(e){return this.targetDiagram.flowNodeMap.filter((function(n){return n.$type===e}))},e.prototype.diagramLoaded=function(e){this.loaded[e]=!0,this.loaded.source&&this.loaded.target&&(this.taskMapping={},this.setUniqueFlowNodeMap())},e.prototype.migrateProcess=function(){var e=this;this.processService.migrateProcess(this.selectedId.source,this.selectedId.target,this.taskMapping).subscribe((function(n){e.alertService.success("Process successfully migrated!"),e.clearProcess("source"),e.clearProcess("target"),e.fields={source:{definition:null,version:null},target:{definition:null,version:null}}}),(function(n){e.alertService.error("Process migration failed!"),e.logger.debug(n)}))},e}();g.decorators=[{type:n.Component,args:[{selector:"valtimo-migration",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="main-content">\n <div class="container-fluid">\n <div class="row mb-5">\n <div class="col-12">\n <div class="alert alert-warning pl-2 plr-2" role="alert">\n <div class="icon"><span class="mdi mdi-alert-triangle"></span></div>\n <div class="message" [innerHTML]="\'Process migration warning\' | translate"></div>\n </div>\n </div>\n </div>\n <div class="row mb-5">\n <div class="col-4">\n <label for="sourceDef">Source Definition</label>\n <select\n class="form-control"\n id="sourceDef"\n [ngModel]="fields.source.definition"\n (ngModelChange)="loadProcessDefinitionVersions($event, \'source\')"\n >\n <option [ngValue]="null" selected>- Source Definition -</option>\n <option *ngFor="let processDef of processDefinitions" [ngValue]="processDef.key">\n {{ processDef.name }}\n </option>\n </select>\n </div>\n <div class="col-2">\n <label for="sourceVer">Source Version</label>\n <select\n class="form-control"\n id="sourceVer"\n [ngModel]="fields.source.version"\n (ngModelChange)="loadProcess($event, \'source\')"\n >\n <option [ngValue]="null" selected>- Source Version -</option>\n <option *ngFor="let processVer of selectedVersions.source" [ngValue]="processVer.id">\n {{ processVer.version }}\n </option>\n </select>\n </div>\n <div class="col-4">\n <label for="targetDef">Target Definition</label>\n <select\n class="form-control"\n id="targetDef"\n [ngModel]="fields.target.definition"\n (ngModelChange)="loadProcessDefinitionVersions($event, \'target\')"\n >\n <option [ngValue]="null" selected>- Target Definition -</option>\n <option *ngFor="let processDef of processDefinitions" [ngValue]="processDef.key">\n {{ processDef.name }}\n </option>\n </select>\n </div>\n <div class="col-2">\n <label for="targetVer">Target Version</label>\n <select\n class="form-control"\n id="targetVer"\n [ngModel]="fields.target.version"\n (ngModelChange)="loadProcess($event, \'target\')"\n >\n <option [ngValue]="null" selected>- Target Version -</option>\n <option *ngFor="let processVer of selectedVersions.target" [ngValue]="processVer.id">\n {{ processVer.version }}\n </option>\n </select>\n </div>\n </div>\n\n <div class="row mb-5">\n <div class="col-6">\n <valtimo-migration-process-diagram\n name="source"\n (loaded)="diagramLoaded($event)"\n #sourceDiagram\n ></valtimo-migration-process-diagram>\n </div>\n <div class="col-6">\n <valtimo-migration-process-diagram\n name="target"\n (loaded)="diagramLoaded($event)"\n #targetDiagram\n ></valtimo-migration-process-diagram>\n </div>\n </div>\n <table class="table table-striped mb-5" *ngIf="selectedId.source && selectedId.target">\n <tr *ngFor="let node of uniqueFlowNodeMap">\n <td>{{ node.name ? node.name : node.id }}</td>\n <td>\n <select class="form-control" (change)="taskMapping[node.id] = $event.target.value">\n <option [value]="null" disabled selected>- Choose Target -</option>\n <option\n *ngFor="let targetFlowNode of getFilteredTargetFlowNodeMap(node.$type)"\n [value]="targetFlowNode.id"\n >\n {{ targetFlowNode.name ? targetFlowNode.name : targetFlowNode.id }}\n </option>\n </select>\n </td>\n </tr>\n </table>\n <hr />\n <div class="btn-group mb-5">\n <button\n [disabled]="\n (uniqueFlowNodeMap.length !== taskMappingLength && uniqueFlowNodeMap.length > 0) ||\n !loaded.source ||\n !loaded.target\n "\n (click)="migrateProcess()"\n class="btn btn-primary"\n >\n Migrate\n <span *ngIf="processCount !== null" class="badge badge-pill badge-secondary">{{\n processCount\n }}</span>\n </button>\n </div>\n </div>\n</div>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */']}]}],g.ctorParameters=function(){return[{type:t.ProcessService},{type:o.NGXLogger},{type:i.AlertService}]},g.propDecorators={sourceDiagram:[{type:n.ViewChild,args:["sourceDiagram"]}],targetDiagram:[{type:n.ViewChild,args:["targetDiagram"]}]};var m={title:"Process migration",roles:[l.ROLE_ADMIN]},f=[{path:"process-migration",component:g,canActivate:[a.AuthGuardService],data:m}],h=function(){};h.decorators=[{type:n.NgModule,args:[{imports:[s.CommonModule,r.RouterModule.forChild(f)],exports:[r.RouterModule]}]}];var v=function(){function e(e){this.logger=e,this.flowNodeMap=null,this.loaded=new n.EventEmitter}return e.prototype.ngOnInit=function(){var e=this;this.bpmnJS=new d,this.bpmnJS.on("import.done",(function(n){n.error||e.bpmnJS.get("canvas").zoom("fit-viewport","auto")}))},e.prototype.ngOnDestroy=function(){this.bpmnJS&&this.bpmnJS.destroy()},e.prototype.clear=function(){this.bpmnJS.clear()},e.prototype.loadXml=function(e){var n=this;this.bpmnJS.attachTo(this.el.nativeElement),this.bpmnJS.importXML(e,(function(e){n.logger.debug(e);var t=n.bpmnJS.getDefinitions().rootElements.filter((function(e){return e.isExecutable}));n.flowNodeMap=t[0].flowElements.filter((function(e){return null!==e.name&&""!==e.name||(e.name=e.id),"bpmn:SequenceFlow"!==e.$type})),n.loaded.emit(n.name)}))},e}();v.decorators=[{type:n.Component,args:[{selector:"valtimo-migration-process-diagram",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div #ref class="diagram-container"></div>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.diagram-container-switch-holder{width:100%;z-index:1000}.diagram-container{height:48vh}']}]}],v.ctorParameters=function(){return[{type:o.NGXLogger}]},v.propDecorators={el:[{type:n.ViewChild,args:["ref"]}],name:[{type:n.Input}],loaded:[{type:n.Output}]};var b=function(){};b.decorators=[{type:n.NgModule,args:[{declarations:[g,v],imports:[s.CommonModule,h,c.ReactiveFormsModule,i.WidgetModule,c.FormsModule,u.TranslateModule],exports:[g]}]}],e.MigrationComponent=g,e.MigrationModule=b,e.MigrationService=p,e.ɵa=v,e.ɵb=h,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=valtimo-migration.umd.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../projects/valtimo/migration/src/lib/migration.service.ts","../../../../projects/valtimo/migration/src/lib/migration.component.ts","../../../../projects/valtimo/migration/src/lib/migration-routing.module.ts","../../../../projects/valtimo/migration/src/lib/migration-process-diagram/migration-process-diagram.component.ts","../../../../projects/valtimo/migration/src/lib/migration.module.ts"],"names":["Injectable","args","providedIn","MigrationComponent","processService","logger","alertService","this","processDefinitions","selectedVersions","source","target","selectedId","loaded","fields","definition","version","processCount","uniqueFlowNodeMap","taskMapping","diagram","prototype","ngOnInit","loadProcessDefinitions","ngAfterViewInit","sourceDiagram","targetDiagram","Object","defineProperty","keys","length","_this","getProcessDefinitions","subscribe","loadProcessDefinitionVersions","key","type","clearProcess","getProcessDefinitionVersions","processDefinitionVersions","loadProcess","id","loadProcessDefinitionXML","loadProcessCount","clear","getProcessDefinitionXml","xml","loadXml","getProcessCount","response","count","setUniqueFlowNodeMap","sourceFlowNodeMap","flowNodeMap","targetFlowNodeMap","filter","sourceFlowNode","some","targetFlowNode","$type","getFilteredTargetFlowNodeMap","flowNodeType","flowNode","diagramLoaded","diagramName","migrateProcess","res","success","err","error","debug","Component","selector","template","ProcessService","NGXLogger","AlertService","ViewChild","title","roles","ROLE_ADMIN","routes","path","component","canActivate","AuthGuardService","data","ɵ0","NgModule","imports","CommonModule","RouterModule","forChild","exports","MigrationProcessDiagramComponent","EventEmitter","bpmnJS","BpmnJS","on","_a","get","zoom","ngOnDestroy","destroy","attachTo","el","nativeElement","importXML","processElements","getDefinitions","rootElements","element","isExecutable","flowElements","name","emit","Input","Output","declarations","MigrationRoutingModule","ReactiveFormsModule","WidgetModule","FormsModule","TranslateModule"],"mappings":"m9BAuBE,4HALDA,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,kEC4CZ,SAAAC,EAAoBC,EAAwCC,EAA2BC,GAAnEC,KAAAH,eAAAA,EAAwCG,KAAAF,OAAAA,EAA2BE,KAAAD,aAAAA,EAjChFC,KAAAC,mBAA0C,GAC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AAOiE,MAAMF,GAClB,IAAMwC,EAAkB7E,EAAKiE,OAAOa,iBAAiBC,aAAavD,QAAO,SAAUwD,GACjF,OAAOA,EAAQC,gBAEjBjF,EAAKsB,YAAcuD,EAAgB,GAAGK,aAAa1D,QAAO,SAAUwD,GAIlE,OAHqB,OAAjBA,EAAQG,MAAkC,KAAjBH,EAAQG,OACnCH,EAAQG,KAAOH,EAAQtE,IAEA,sBAAlBsE,EAAQpD,SAEjB5B,EAAKlB,OAAOsG,KAAKpF,EAAKmF,mCAnD3B3C,EAAAA,UAAStE,KAAA,CAAC,CACTuE,SAAU,oCACVC,SAAA,08CAJME,EAAAA,yCAYLE,EAAAA,UAAS5E,KAAA,CAAC,qBACVmH,EAAAA,sBACAC,EAAAA,gBCKH,iCAZC7B,EAAAA,SAAQvF,KAAA,CAAC,CACRqH,aAAc,CAACnH,EAAoB2F,GACnCL,QAAS,CACPC,EAAAA,aACA6B,EACAC,EAAAA,oBACAC,EAAAA,aACAC,EAAAA,YACAC,EAAAA,iBAEF9B,QAAS,CAAC1F","sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MigrationService {\n\n constructor() {\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';\nimport {ProcessService} from '@valtimo/process';\nimport {ProcessDefinition} from '@valtimo/contract';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {NGXLogger} from 'ngx-logger';\nimport {AlertService} from '@valtimo/components';\n\n@Component({\n selector: 'valtimo-migration',\n templateUrl: './migration.component.html',\n styleUrls: ['./migration.component.scss']\n})\nexport class MigrationComponent implements OnInit, AfterViewInit {\n\n public processDefinitions: ProcessDefinition[] = [];\n public selectedVersions = {\n source: [],\n target: []\n };\n public selectedId = {\n source: null,\n target: null\n };\n public loaded = {\n source: false,\n target: false\n };\n public fields = {\n source: {\n definition: null,\n version: null\n },\n target: {\n definition: null,\n version: null\n }\n };\n\n public processCount: number | null = null;\n public uniqueFlowNodeMap: any[] = [];\n public taskMapping: any = {};\n\n @ViewChild('sourceDiagram') sourceDiagram: MigrationProcessDiagramComponent;\n @ViewChild('targetDiagram') targetDiagram: MigrationProcessDiagramComponent;\n\n public diagram: any = null;\n\n constructor(private processService: ProcessService, private logger: NGXLogger, private alertService: AlertService) {\n }\n\n ngOnInit() {\n this.loadProcessDefinitions();\n }\n\n ngAfterViewInit() {\n this.diagram = {\n source: this.sourceDiagram,\n target: this.targetDiagram\n };\n }\n\n public get taskMappingLength() {\n return Object.keys(this.taskMapping).length;\n }\n\n loadProcessDefinitions() {\n this.processService.getProcessDefinitions().subscribe((processDefinitions: ProcessDefinition[]) => {\n this.processDefinitions = processDefinitions;\n });\n }\n\n loadProcessDefinitionVersions(key: string | null, type: string) {\n this.fields[type].definition = key;\n this.selectedVersions[type] = [];\n this.clearProcess(type);\n if (key) {\n this.processService.getProcessDefinitionVersions(key).subscribe((processDefinitionVersions: ProcessDefinition[]) => {\n this.selectedVersions[type] = processDefinitionVersions;\n });\n }\n }\n\n loadProcess(id: string | null, type: string) {\n this.fields[type].version = id;\n this.clearProcess(type);\n if (id) {\n this.loadProcessDefinitionXML(id, type);\n if (type === 'source') {\n this.loadProcessCount(id);\n }\n }\n }\n\n private clearProcess(type: string) {\n this.loaded[type] = false;\n this.selectedId[type] = null;\n this.diagram[type].clear();\n if (type === 'source') {\n this.processCount = null;\n }\n }\n\n loadProcessDefinitionXML(id: string, type: string) {\n this.processService.getProcessDefinitionXml(id).subscribe(xml => {\n this.diagram[type].loadXml(xml['bpmn20Xml']);\n this.selectedId[type] = id;\n });\n }\n\n loadProcessCount(id: string) {\n this.processService.getProcessCount(id).subscribe(response => {\n this.processCount = response.count;\n });\n }\n\n setUniqueFlowNodeMap() {\n this.uniqueFlowNodeMap = [];\n const sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n\n if (sourceFlowNodeMap != null && targetFlowNodeMap != null) {\n this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(sourceFlowNode =>\n !targetFlowNodeMap.some(targetFlowNode =>\n sourceFlowNode.id === targetFlowNode.id && sourceFlowNode.$type === targetFlowNode.$type));\n }\n }\n\n getFilteredTargetFlowNodeMap(flowNodeType) {\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n return targetFlowNodeMap.filter(function (flowNode) {\n return flowNode.$type === flowNodeType;\n });\n }\n\n diagramLoaded(diagramName: string) {\n this.loaded[diagramName] = true;\n if (this.loaded.source && this.loaded.target) {\n this.taskMapping = {};\n this.setUniqueFlowNodeMap();\n }\n }\n\n migrateProcess() {\n this.processService.migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping).subscribe((res) => {\n this.alertService.success('Process successfully migrated!');\n this.clearProcess('source');\n this.clearProcess('target');\n this.fields = {\n source: {\n definition: null,\n version: null\n },\n target: {\n definition: null,\n version: null\n }\n };\n }, err => {\n this.alertService.error('Process migration failed!');\n this.logger.debug(err);\n });\n }\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {MigrationComponent} from './migration.component';\nimport {ROLE_ADMIN} from '@valtimo/contract';\n\nconst routes: Routes = [\n {\n path: 'process-migration',\n component: MigrationComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Process migration', roles: [ROLE_ADMIN]},\n },\n];\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule.forChild(routes),\n ],\n exports: [RouterModule]\n})\nexport class MigrationRoutingModule {\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild} from '@angular/core';\n\nimport * as BpmnJS from 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js';\nimport {NGXLogger} from 'ngx-logger';\n\n@Component({\n selector: 'valtimo-migration-process-diagram',\n templateUrl: './migration-process-diagram.component.html',\n styleUrls: ['./migration-process-diagram.component.scss']\n})\nexport class MigrationProcessDiagramComponent implements OnInit, OnDestroy {\n\n private bpmnJS: BpmnJS;\n public flowNodeMap: any = null;\n\n @ViewChild('ref') public el: ElementRef;\n @Input() name: string;\n @Output() loaded = new EventEmitter();\n\n constructor(private logger: NGXLogger) {\n }\n\n ngOnInit() {\n this.bpmnJS = new BpmnJS();\n this.bpmnJS.on('import.done', ({error}: any) => {\n if (!error) {\n const canvas = this.bpmnJS.get('canvas');\n canvas.zoom('fit-viewport', 'auto');\n\n }\n });\n }\n\n ngOnDestroy() {\n if (this.bpmnJS) {\n this.bpmnJS.destroy();\n }\n }\n\n clear() {\n this.bpmnJS.clear();\n }\n\n public loadXml(xml: string): void {\n this.bpmnJS.attachTo(this.el.nativeElement);\n this.bpmnJS.importXML(xml, (err) => {\n this.logger.debug(err);\n const processElements = this.bpmnJS.getDefinitions().rootElements.filter(function (element) {\n return element.isExecutable;\n });\n this.flowNodeMap = processElements[0].flowElements.filter(function (element) {\n if (element.name === null || element.name === '') {\n element.name = element.id;\n }\n return element.$type !== 'bpmn:SequenceFlow';\n });\n this.loaded.emit(this.name);\n });\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {MigrationComponent} from './migration.component';\nimport {MigrationRoutingModule} from './migration-routing.module';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {WidgetModule} from '@valtimo/components';\nimport {TranslateModule} from '@ngx-translate/core';\n\n\n@NgModule({\n declarations: [MigrationComponent, MigrationProcessDiagramComponent],\n imports: [\n CommonModule,\n MigrationRoutingModule,\n ReactiveFormsModule,\n WidgetModule,\n FormsModule,\n TranslateModule\n ],\n exports: [MigrationComponent]\n})\nexport class MigrationModule {\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../../projects/valtimo/migration/src/lib/migration.service.ts","../../../../projects/valtimo/migration/src/lib/migration.component.ts","../../../../projects/valtimo/migration/src/lib/migration-routing.module.ts","../../../../projects/valtimo/migration/src/lib/migration-process-diagram/migration-process-diagram.component.ts","../../../../projects/valtimo/migration/src/lib/migration.module.ts"],"names":["Injectable","args","providedIn","MigrationComponent","processService","logger","alertService","this","processDefinitions","selectedVersions","source","target","selectedId","loaded","fields","definition","version","processCount","uniqueFlowNodeMap","taskMapping","diagram","prototype","ngOnInit","loadProcessDefinitions","ngAfterViewInit","sourceDiagram","targetDiagram","Object","defineProperty","keys","length","_this","getProcessDefinitions","subscribe","loadProcessDefinitionVersions","key","type","clearProcess","getProcessDefinitionVersions","processDefinitionVersions","loadProcess","id","loadProcessDefinitionXML","loadProcessCount","clear","getProcessDefinitionXml","xml","loadXml","getProcessCount","response","count","setUniqueFlowNodeMap","sourceFlowNodeMap","flowNodeMap","targetFlowNodeMap","filter","sourceFlowNode","some","targetFlowNode","$type","getFilteredTargetFlowNodeMap","flowNodeType","flowNode","diagramLoaded","diagramName","migrateProcess","res","success","err","error","debug","Component","selector","template","ProcessService","NGXLogger","AlertService","ViewChild","title","roles","ROLE_ADMIN","routes","path","component","canActivate","AuthGuardService","data","NgModule","imports","CommonModule","RouterModule","forChild","exports","MigrationProcessDiagramComponent","EventEmitter","bpmnJS","BpmnJS","on","_a","get","zoom","ngOnDestroy","destroy","attachTo","el","nativeElement","importXML","processElements","getDefinitions","rootElements","element","isExecutable","flowElements","name","emit","Input","Output","declarations","MigrationRoutingModule","ReactiveFormsModule","WidgetModule","Forms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AAKwF,OAAOnD,SAGPiD,EAAAxE,UAAA0B,QAAA,SAAQD,GAAR,IAAAf,EAAAxB,KACLA,KAAKwF,OAAOQ,SAAShG,KAAKiG,GAAGC,eAC7BlG,KAAKwF,OAAOW,UAAU5D,GAAK,SAAAsB,GACzBrC,EAAK1B,OAAOiE,MAAMF,GAClB,IAAMuC,EAAkB5E,EAAKgE,OAAOa,iBAAiBC,aAAatD,QAAO,SAAUuD,GACjF,OAAOA,EAAQC,gBAEjBhF,EAAKsB,YAAcsD,EAAgB,GAAGK,aAAazD,QAAO,SAAUuD,GAIlE,OAHqB,OAAjBA,EAAQG,MAAkC,KAAjBH,EAAQG,OACnCH,EAAQG,KAAOH,EAAQrE,IAEA,sBAAlBqE,EAAQnD,SAEjB5B,EAAKlB,OAAOqG,KAAKnF,EAAKkF,mCAhD3B1C,EAAAA,UAAStE,KAAA,CAAC,CACTuE,SAAU,oCACVC,SAAA,08CAJME,EAAAA,yCAWLE,EAAAA,UAAS5E,KAAA,CAAC,qBACVkH,EAAAA,sBACAC,EAAAA,gBCJH,iCAZC7B,EAAAA,SAAQtF,KAAA,CAAC,CACRoH,aAAc,CAAClH,EAAoB0F,GACnCL,QAAS,CACPC,EAAAA,aACA6B,EACAC,EAAAA,oBACAC,EAAAA,aACAC,EAAAA,YACAC,EAAAA,iBAEF9B,QAAS,CAACzF","sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MigrationService {\n constructor() {}\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';\nimport {ProcessService} from '@valtimo/process';\nimport {ProcessDefinition} from '@valtimo/contract';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {NGXLogger} from 'ngx-logger';\nimport {AlertService} from '@valtimo/components';\n\n@Component({\n selector: 'valtimo-migration',\n templateUrl: './migration.component.html',\n styleUrls: ['./migration.component.scss'],\n})\nexport class MigrationComponent implements OnInit, AfterViewInit {\n public processDefinitions: ProcessDefinition[] = [];\n public selectedVersions = {\n source: [],\n target: [],\n };\n public selectedId = {\n source: null,\n target: null,\n };\n public loaded = {\n source: false,\n target: false,\n };\n public fields = {\n source: {\n definition: null,\n version: null,\n },\n target: {\n definition: null,\n version: null,\n },\n };\n\n public processCount: number | null = null;\n public uniqueFlowNodeMap: any[] = [];\n public taskMapping: any = {};\n\n @ViewChild('sourceDiagram') sourceDiagram: MigrationProcessDiagramComponent;\n @ViewChild('targetDiagram') targetDiagram: MigrationProcessDiagramComponent;\n\n public diagram: any = null;\n\n constructor(\n private processService: ProcessService,\n private logger: NGXLogger,\n private alertService: AlertService\n ) {}\n\n ngOnInit() {\n this.loadProcessDefinitions();\n }\n\n ngAfterViewInit() {\n this.diagram = {\n source: this.sourceDiagram,\n target: this.targetDiagram,\n };\n }\n\n public get taskMappingLength() {\n return Object.keys(this.taskMapping).length;\n }\n\n loadProcessDefinitions() {\n this.processService\n .getProcessDefinitions()\n .subscribe((processDefinitions: ProcessDefinition[]) => {\n this.processDefinitions = processDefinitions;\n });\n }\n\n loadProcessDefinitionVersions(key: string | null, type: string) {\n this.fields[type].definition = key;\n this.selectedVersions[type] = [];\n this.clearProcess(type);\n if (key) {\n this.processService\n .getProcessDefinitionVersions(key)\n .subscribe((processDefinitionVersions: ProcessDefinition[]) => {\n this.selectedVersions[type] = processDefinitionVersions;\n });\n }\n }\n\n loadProcess(id: string | null, type: string) {\n this.fields[type].version = id;\n this.clearProcess(type);\n if (id) {\n this.loadProcessDefinitionXML(id, type);\n if (type === 'source') {\n this.loadProcessCount(id);\n }\n }\n }\n\n private clearProcess(type: string) {\n this.loaded[type] = false;\n this.selectedId[type] = null;\n this.diagram[type].clear();\n if (type === 'source') {\n this.processCount = null;\n }\n }\n\n loadProcessDefinitionXML(id: string, type: string) {\n this.processService.getProcessDefinitionXml(id).subscribe(xml => {\n this.diagram[type].loadXml(xml['bpmn20Xml']);\n this.selectedId[type] = id;\n });\n }\n\n loadProcessCount(id: string) {\n this.processService.getProcessCount(id).subscribe(response => {\n this.processCount = response.count;\n });\n }\n\n setUniqueFlowNodeMap() {\n this.uniqueFlowNodeMap = [];\n const sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n\n if (sourceFlowNodeMap != null && targetFlowNodeMap != null) {\n this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(\n sourceFlowNode =>\n !targetFlowNodeMap.some(\n targetFlowNode =>\n sourceFlowNode.id === targetFlowNode.id &&\n sourceFlowNode.$type === targetFlowNode.$type\n )\n );\n }\n }\n\n getFilteredTargetFlowNodeMap(flowNodeType) {\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n return targetFlowNodeMap.filter(function (flowNode) {\n return flowNode.$type === flowNodeType;\n });\n }\n\n diagramLoaded(diagramName: string) {\n this.loaded[diagramName] = true;\n if (this.loaded.source && this.loaded.target) {\n this.taskMapping = {};\n this.setUniqueFlowNodeMap();\n }\n }\n\n migrateProcess() {\n this.processService\n .migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping)\n .subscribe(\n res => {\n this.alertService.success('Process successfully migrated!');\n this.clearProcess('source');\n this.clearProcess('target');\n this.fields = {\n source: {\n definition: null,\n version: null,\n },\n target: {\n definition: null,\n version: null,\n },\n };\n },\n err => {\n this.alertService.error('Process migration failed!');\n this.logger.debug(err);\n }\n );\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {MigrationComponent} from './migration.component';\nimport {ROLE_ADMIN} from '@valtimo/contract';\n\nconst routes: Routes = [\n {\n path: 'process-migration',\n component: MigrationComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Process migration', roles: [ROLE_ADMIN]},\n },\n];\n\n@NgModule({\n imports: [CommonModule, RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class MigrationRoutingModule {}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\n\nimport * as BpmnJS from 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js';\nimport {NGXLogger} from 'ngx-logger';\n\n@Component({\n selector: 'valtimo-migration-process-diagram',\n templateUrl: './migration-process-diagram.component.html',\n styleUrls: ['./migration-process-diagram.component.scss'],\n})\nexport class MigrationProcessDiagramComponent implements OnInit, OnDestroy {\n private bpmnJS: BpmnJS;\n public flowNodeMap: any = null;\n\n @ViewChild('ref') public el: ElementRef;\n @Input() name: string;\n @Output() loaded = new EventEmitter();\n\n constructor(private logger: NGXLogger) {}\n\n ngOnInit() {\n this.bpmnJS = new BpmnJS();\n this.bpmnJS.on('import.done', ({error}: any) => {\n if (!error) {\n const canvas = this.bpmnJS.get('canvas');\n canvas.zoom('fit-viewport', 'auto');\n }\n });\n }\n\n ngOnDestroy() {\n if (this.bpmnJS) {\n this.bpmnJS.destroy();\n }\n }\n\n clear() {\n this.bpmnJS.clear();\n }\n\n public loadXml(xml: string): void {\n this.bpmnJS.attachTo(this.el.nativeElement);\n this.bpmnJS.importXML(xml, err => {\n this.logger.debug(err);\n const processElements = this.bpmnJS.getDefinitions().rootElements.filter(function (element) {\n return element.isExecutable;\n });\n this.flowNodeMap = processElements[0].flowElements.filter(function (element) {\n if (element.name === null || element.name === '') {\n element.name = element.id;\n }\n return element.$type !== 'bpmn:SequenceFlow';\n });\n this.loaded.emit(this.name);\n });\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {MigrationComponent} from './migration.component';\nimport {MigrationRoutingModule} from './migration-routing.module';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {WidgetModule} from '@valtimo/components';\nimport {TranslateModule} from '@ngx-translate/core';\n\n@NgModule({\n declarations: [MigrationComponent, MigrationProcessDiagramComponent],\n imports: [\n CommonModule,\n MigrationRoutingModule,\n ReactiveFormsModule,\n WidgetModule,\n FormsModule,\n TranslateModule,\n ],\n exports: [MigrationComponent],\n})\nexport class MigrationModule {}\n"]}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core';
|
|
16
|
+
import { Component, ElementRef, EventEmitter, Input, Output, ViewChild, } from '@angular/core';
|
|
17
17
|
import * as BpmnJS from 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js';
|
|
18
18
|
import { NGXLogger } from 'ngx-logger';
|
|
19
19
|
export class MigrationProcessDiagramComponent {
|
|
@@ -41,7 +41,7 @@ export class MigrationProcessDiagramComponent {
|
|
|
41
41
|
}
|
|
42
42
|
loadXml(xml) {
|
|
43
43
|
this.bpmnJS.attachTo(this.el.nativeElement);
|
|
44
|
-
this.bpmnJS.importXML(xml,
|
|
44
|
+
this.bpmnJS.importXML(xml, err => {
|
|
45
45
|
this.logger.debug(err);
|
|
46
46
|
const processElements = this.bpmnJS.getDefinitions().rootElements.filter(function (element) {
|
|
47
47
|
return element.isExecutable;
|
|
@@ -71,4 +71,4 @@ MigrationProcessDiagramComponent.propDecorators = {
|
|
|
71
71
|
name: [{ type: Input }],
|
|
72
72
|
loaded: [{ type: Output }]
|
|
73
73
|
};
|
|
74
|
-
//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uIChlbGVtZW50KSB7XG4gICAgICAgIHJldHVybiBlbGVtZW50LmlzRXhlY3V0YWJsZTtcbiAgICAgIH0pO1xuICAgICAgdGhpcy5mbG93Tm9kZU1hcCA9IHByb2Nlc3NFbGVtZW50c1swXS5mbG93RWxlbWVudHMuZmlsdGVyKGZ1bmN0aW9uIChlbGVtZW50KSB7XG4gICAgICAgIGlmIChlbGVtZW50Lm5hbWUgPT09IG51bGwgfHwgZWxlbWVudC5uYW1lID09PSAnJykge1xuICAgICAgICAgIGVsZW1lbnQubmFtZSA9IGVsZW1lbnQuaWQ7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGVsZW1lbnQuJHR5cGUgIT09ICdicG1uOlNlcXVlbmNlRmxvdyc7XG4gICAgICB9KTtcbiAgICAgIHRoaXMubG9hZGVkLmVtaXQodGhpcy5uYW1lKTtcbiAgICB9KTtcbiAgfVxufVxuIl19
|
|
@@ -32,12 +32,9 @@ export class MigrationRoutingModule {
|
|
|
32
32
|
}
|
|
33
33
|
MigrationRoutingModule.decorators = [
|
|
34
34
|
{ type: NgModule, args: [{
|
|
35
|
-
imports: [
|
|
36
|
-
|
|
37
|
-
RouterModule.forChild(routes),
|
|
38
|
-
],
|
|
39
|
-
exports: [RouterModule]
|
|
35
|
+
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
36
|
+
exports: [RouterModule],
|
|
40
37
|
},] }
|
|
41
38
|
];
|
|
42
39
|
export { ɵ0 };
|
|
43
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
40
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlncmF0aW9uLXJvdXRpbmcubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IkQ6L1dvcmtzcGFjZS92YWx0aW1vL3ZhbHRpbW8tZnJvbnRlbmQtbGlicmFyaWVzL3Byb2plY3RzL3ZhbHRpbW8vbWlncmF0aW9uL3NyYy8iLCJzb3VyY2VzIjpbImxpYi9taWdy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nQnO1xuaW1wb3J0IHtST0xFX0FETUlOfSBmcm9tICdAdmFsdGltby9jb250cmFjdCc7XG5cbmNvbnN0IHJvdXRlczogUm91dGVzID0gW1xuICB7XG4gICAgcGF0aDogJ3Byb2Nlc3MtbWlncmF0aW9uJyxcbiAgICBjb21wb25lbnQ6IE1pZ3JhdGlvbkNvbXBvbmVudCxcbiAgICBjYW5BY3RpdmF0ZTogW0F1dGhHdWFyZFNlcnZpY2VdLFxuICAgIGRhdGE6IHt0aXRsZTogJ1Byb2Nlc3MgbWlncmF0aW9uJywgcm9sZXM6IFtST0xFX0FETUlOXX0sXG4gIH0sXG5dO1xuXG5ATmdNb2R1bGUoe1xuICBpbXBvcnRzOiBbQ29tbW9uTW9kdWxlLCBSb3V0ZXJNb2R1bGUuZm9yQ2hpbGQocm91dGVzKV0sXG4gIGV4cG9ydHM6IFtSb3V0ZXJNb2R1bGVdLFxufSlcbmV4cG9ydCBjbGFzcyBNaWdyYXRpb25Sb3V0aW5nTW9kdWxlIHt9XG4iXX0=
|
|
@@ -26,25 +26,25 @@ export class MigrationComponent {
|
|
|
26
26
|
this.processDefinitions = [];
|
|
27
27
|
this.selectedVersions = {
|
|
28
28
|
source: [],
|
|
29
|
-
target: []
|
|
29
|
+
target: [],
|
|
30
30
|
};
|
|
31
31
|
this.selectedId = {
|
|
32
32
|
source: null,
|
|
33
|
-
target: null
|
|
33
|
+
target: null,
|
|
34
34
|
};
|
|
35
35
|
this.loaded = {
|
|
36
36
|
source: false,
|
|
37
|
-
target: false
|
|
37
|
+
target: false,
|
|
38
38
|
};
|
|
39
39
|
this.fields = {
|
|
40
40
|
source: {
|
|
41
41
|
definition: null,
|
|
42
|
-
version: null
|
|
42
|
+
version: null,
|
|
43
43
|
},
|
|
44
44
|
target: {
|
|
45
45
|
definition: null,
|
|
46
|
-
version: null
|
|
47
|
-
}
|
|
46
|
+
version: null,
|
|
47
|
+
},
|
|
48
48
|
};
|
|
49
49
|
this.processCount = null;
|
|
50
50
|
this.uniqueFlowNodeMap = [];
|
|
@@ -57,14 +57,16 @@ export class MigrationComponent {
|
|
|
57
57
|
ngAfterViewInit() {
|
|
58
58
|
this.diagram = {
|
|
59
59
|
source: this.sourceDiagram,
|
|
60
|
-
target: this.targetDiagram
|
|
60
|
+
target: this.targetDiagram,
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
get taskMappingLength() {
|
|
64
64
|
return Object.keys(this.taskMapping).length;
|
|
65
65
|
}
|
|
66
66
|
loadProcessDefinitions() {
|
|
67
|
-
this.processService
|
|
67
|
+
this.processService
|
|
68
|
+
.getProcessDefinitions()
|
|
69
|
+
.subscribe((processDefinitions) => {
|
|
68
70
|
this.processDefinitions = processDefinitions;
|
|
69
71
|
});
|
|
70
72
|
}
|
|
@@ -73,7 +75,9 @@ export class MigrationComponent {
|
|
|
73
75
|
this.selectedVersions[type] = [];
|
|
74
76
|
this.clearProcess(type);
|
|
75
77
|
if (key) {
|
|
76
|
-
this.processService
|
|
78
|
+
this.processService
|
|
79
|
+
.getProcessDefinitionVersions(key)
|
|
80
|
+
.subscribe((processDefinitionVersions) => {
|
|
77
81
|
this.selectedVersions[type] = processDefinitionVersions;
|
|
78
82
|
});
|
|
79
83
|
}
|
|
@@ -112,7 +116,8 @@ export class MigrationComponent {
|
|
|
112
116
|
const sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;
|
|
113
117
|
const targetFlowNodeMap = this.targetDiagram.flowNodeMap;
|
|
114
118
|
if (sourceFlowNodeMap != null && targetFlowNodeMap != null) {
|
|
115
|
-
this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(sourceFlowNode => !targetFlowNodeMap.some(targetFlowNode => sourceFlowNode.id === targetFlowNode.id &&
|
|
119
|
+
this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(sourceFlowNode => !targetFlowNodeMap.some(targetFlowNode => sourceFlowNode.id === targetFlowNode.id &&
|
|
120
|
+
sourceFlowNode.$type === targetFlowNode.$type));
|
|
116
121
|
}
|
|
117
122
|
}
|
|
118
123
|
getFilteredTargetFlowNodeMap(flowNodeType) {
|
|
@@ -129,19 +134,21 @@ export class MigrationComponent {
|
|
|
129
134
|
}
|
|
130
135
|
}
|
|
131
136
|
migrateProcess() {
|
|
132
|
-
this.processService
|
|
137
|
+
this.processService
|
|
138
|
+
.migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping)
|
|
139
|
+
.subscribe(res => {
|
|
133
140
|
this.alertService.success('Process successfully migrated!');
|
|
134
141
|
this.clearProcess('source');
|
|
135
142
|
this.clearProcess('target');
|
|
136
143
|
this.fields = {
|
|
137
144
|
source: {
|
|
138
145
|
definition: null,
|
|
139
|
-
version: null
|
|
146
|
+
version: null,
|
|
140
147
|
},
|
|
141
148
|
target: {
|
|
142
149
|
definition: null,
|
|
143
|
-
version: null
|
|
144
|
-
}
|
|
150
|
+
version: null,
|
|
151
|
+
},
|
|
145
152
|
};
|
|
146
153
|
}, err => {
|
|
147
154
|
this.alertService.error('Process migration failed!');
|
|
@@ -152,7 +159,7 @@ export class MigrationComponent {
|
|
|
152
159
|
MigrationComponent.decorators = [
|
|
153
160
|
{ type: Component, args: [{
|
|
154
161
|
selector: 'valtimo-migration',
|
|
155
|
-
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row mb-5\">\n <div class=\"col-12\">\n <div class=\"alert alert-warning pl-2 plr-2\" role=\"alert\">\n <div class=\"icon\"><span class=\"mdi mdi-alert-triangle\"></span></div>\n <div class=\"message\" [innerHTML]=\"'Process migration warning' | translate\"
|
|
162
|
+
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row mb-5\">\n <div class=\"col-12\">\n <div class=\"alert alert-warning pl-2 plr-2\" role=\"alert\">\n <div class=\"icon\"><span class=\"mdi mdi-alert-triangle\"></span></div>\n <div class=\"message\" [innerHTML]=\"'Process migration warning' | translate\"></div>\n </div>\n </div>\n </div>\n <div class=\"row mb-5\">\n <div class=\"col-4\">\n <label for=\"sourceDef\">Source Definition</label>\n <select\n class=\"form-control\"\n id=\"sourceDef\"\n [ngModel]=\"fields.source.definition\"\n (ngModelChange)=\"loadProcessDefinitionVersions($event, 'source')\"\n >\n <option [ngValue]=\"null\" selected>- Source Definition -</option>\n <option *ngFor=\"let processDef of processDefinitions\" [ngValue]=\"processDef.key\">\n {{ processDef.name }}\n </option>\n </select>\n </div>\n <div class=\"col-2\">\n <label for=\"sourceVer\">Source Version</label>\n <select\n class=\"form-control\"\n id=\"sourceVer\"\n [ngModel]=\"fields.source.version\"\n (ngModelChange)=\"loadProcess($event, 'source')\"\n >\n <option [ngValue]=\"null\" selected>- Source Version -</option>\n <option *ngFor=\"let processVer of selectedVersions.source\" [ngValue]=\"processVer.id\">\n {{ processVer.version }}\n </option>\n </select>\n </div>\n <div class=\"col-4\">\n <label for=\"targetDef\">Target Definition</label>\n <select\n class=\"form-control\"\n id=\"targetDef\"\n [ngModel]=\"fields.target.definition\"\n (ngModelChange)=\"loadProcessDefinitionVersions($event, 'target')\"\n >\n <option [ngValue]=\"null\" selected>- Target Definition -</option>\n <option *ngFor=\"let processDef of processDefinitions\" [ngValue]=\"processDef.key\">\n {{ processDef.name }}\n </option>\n </select>\n </div>\n <div class=\"col-2\">\n <label for=\"targetVer\">Target Version</label>\n <select\n class=\"form-control\"\n id=\"targetVer\"\n [ngModel]=\"fields.target.version\"\n (ngModelChange)=\"loadProcess($event, 'target')\"\n >\n <option [ngValue]=\"null\" selected>- Target Version -</option>\n <option *ngFor=\"let processVer of selectedVersions.target\" [ngValue]=\"processVer.id\">\n {{ processVer.version }}\n </option>\n </select>\n </div>\n </div>\n\n <div class=\"row mb-5\">\n <div class=\"col-6\">\n <valtimo-migration-process-diagram\n name=\"source\"\n (loaded)=\"diagramLoaded($event)\"\n #sourceDiagram\n ></valtimo-migration-process-diagram>\n </div>\n <div class=\"col-6\">\n <valtimo-migration-process-diagram\n name=\"target\"\n (loaded)=\"diagramLoaded($event)\"\n #targetDiagram\n ></valtimo-migration-process-diagram>\n </div>\n </div>\n <table class=\"table table-striped mb-5\" *ngIf=\"selectedId.source && selectedId.target\">\n <tr *ngFor=\"let node of uniqueFlowNodeMap\">\n <td>{{ node.name ? node.name : node.id }}</td>\n <td>\n <select class=\"form-control\" (change)=\"taskMapping[node.id] = $event.target.value\">\n <option [value]=\"null\" disabled selected>- Choose Target -</option>\n <option\n *ngFor=\"let targetFlowNode of getFilteredTargetFlowNodeMap(node.$type)\"\n [value]=\"targetFlowNode.id\"\n >\n {{ targetFlowNode.name ? targetFlowNode.name : targetFlowNode.id }}\n </option>\n </select>\n </td>\n </tr>\n </table>\n <hr />\n <div class=\"btn-group mb-5\">\n <button\n [disabled]=\"\n (uniqueFlowNodeMap.length !== taskMappingLength && uniqueFlowNodeMap.length > 0) ||\n !loaded.source ||\n !loaded.target\n \"\n (click)=\"migrateProcess()\"\n class=\"btn btn-primary\"\n >\n Migrate\n <span *ngIf=\"processCount !== null\" class=\"badge badge-pill badge-secondary\">{{\n processCount\n }}</span>\n </button>\n </div>\n </div>\n</div>\n",
|
|
156
163
|
styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"]
|
|
157
164
|
},] }
|
|
158
165
|
];
|
|
@@ -165,4 +172,4 @@ MigrationComponent.propDecorators = {
|
|
|
165
172
|
sourceDiagram: [{ type: ViewChild, args: ['sourceDiagram',] }],
|
|
166
173
|
targetDiagram: [{ type: ViewChild, args: ['targetDiagram',] }]
|
|
167
174
|
};
|
|
168
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlncmF0aW9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3ZhbHRpbW8vbWlncmF0aW9uL3NyYy9saWIvbWlncmF0aW9uLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7R0FjRztBQUVILE9BQU8sRUFBZ0IsU0FBUyxFQUFVLFNBQVMsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUMxRSxPQUFPLEVBQUMsY0FBYyxFQUFDLE1BQU0sa0JBQWtCLENBQUM7QUFFaEQsT0FBTyxFQUFDLGdDQUFnQyxFQUFDLE1BQU0saUVBQWlFLENBQUM7QUFDakgsT0FBTyxFQUFDLFNBQVMsRUFBQyxNQUFNLFl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nByb2Nlc3NTZXJ2aWNlXG4gICAgICAubWlncmF0ZVByb2Nlc3ModGhpcy5zZWxlY3RlZElkLnNvdXJjZSwgdGhpcy5zZWxlY3RlZElkLnRhcmdldCwgdGhpcy50YXNrTWFwcGluZylcbiAgICAgIC5zdWJzY3JpYmUoXG4gICAgICAgIHJlcyA9PiB7XG4gICAgICAgICAgdGhpcy5hbGVydFNlcnZpY2Uuc3VjY2VzcygnUHJvY2VzcyBzdWNjZXNzZnVsbHkgbWlncmF0ZWQhJyk7XG4gICAgICAgICAgdGhpcy5jbGVhclByb2Nlc3MoJ3NvdXJjZScpO1xuICAgICAgICAgIHRoaXMuY2xlYXJQcm9jZXNzKCd0YXJnZXQnKTtcbiAgICAgICAgICB0aGlzLmZpZWxkcyA9IHtcbiAgICAgICAgICAgIHNvdXJjZToge1xuICAgICAgICAgICAgICBkZWZpbml0aW9uOiBudWxsLFxuICAgICAgICAgICAgICB2ZXJzaW9uOiBudWxsLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHRhcmdldDoge1xuICAgICAgICAgICAgICBkZWZpbml0aW9uOiBudWxsLFxuICAgICAgICAgICAgICB2ZXJzaW9uOiBudWxsLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9O1xuICAgICAgICB9LFxuICAgICAgICBlcnIgPT4ge1xuICAgICAgICAgIHRoaXMuYWxlcnRTZXJ2aWNlLmVycm9yKCdQcm9jZXNzIG1pZ3JhdGlvbiBmYWlsZWQhJyk7XG4gICAgICAgICAgdGhpcy5sb2dnZXIuZGVidWcoZXJyKTtcbiAgICAgICAgfVxuICAgICAgKTtcbiAgfVxufVxuIl19
|
|
@@ -32,9 +32,9 @@ MigrationModule.decorators = [
|
|
|
32
32
|
ReactiveFormsModule,
|
|
33
33
|
WidgetModule,
|
|
34
34
|
FormsModule,
|
|
35
|
-
TranslateModule
|
|
35
|
+
TranslateModule,
|
|
36
36
|
],
|
|
37
|
-
exports: [MigrationComponent]
|
|
37
|
+
exports: [MigrationComponent],
|
|
38
38
|
},] }
|
|
39
39
|
];
|
|
40
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
40
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlncmF0aW9uLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiJEOi9Xb3Jrc3BhY2UvdmFsdGltby92YWx0aW1vLWZyb250ZW5kLWxpYnJhcmllcy9wcm9qZWN0cy92YWx0aW1vL21pZ3JhdGlvbi9zcmMvIiwic291cmNlcyI6WyJsaWIvbWlncmF0aW9uLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7R0FjRztBQUVILE9BQU8sRUFBQyxRQUFRLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDdkMsT0FBTyxFQUFDLGtCQUFrQixFQUFDLE1BQU0sdUJBQXVCLENBQUM7QUFDekQsT0FBTyxFQUFDLHNCQUFzQixFQUFDLE1BQU0sNEJBQTRCLENBQUM7QUFDbEUsT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLGlCQUFpQixDQUFDO0FBQzdDLE9BQU8sRUFBQyxXQUFXLEVBQUUsbUJBQW1CLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQztBQUNoRSxPQUFPLEVBQUMsZ0NBQWdDLEVBQUMsTUFBTSxpRUFBaUUsQ0FBQztBQUNqSCxPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0scUJBQXFCLENBQUM7QUFDakQsT0FBTyxFQUFDLGVBQWUsRUFBQyxNQUFNLHFCQUFxQixDQUFDO0FBY3BELE1BQU0sT0FBTyxlQUFlOzs7WUFaM0IsUUFBUSxTQUFDO2dCQUNSLFlBQVksRUFBRSxDQUFDLGtCQUFrQixFQUFFLGdDQUFnQyxDQUFDO2dCQUNwRSxPQUFPLEVBQUU7b0JBQ1AsWUFBWTtvQkFDWixzQkFBc0I7b0JBQ3RCLG1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|
|
17
17
|
import * as i0 from "@angular/core";
|
|
18
18
|
export class MigrationService {
|
|
19
|
-
constructor() {
|
|
20
|
-
}
|
|
19
|
+
constructor() { }
|
|
21
20
|
}
|
|
22
21
|
MigrationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MigrationService_Factory() { return new MigrationService(); }, token: MigrationService, providedIn: "root" });
|
|
23
22
|
MigrationService.decorators = [
|
|
24
23
|
{ type: Injectable, args: [{
|
|
25
|
-
providedIn: 'root'
|
|
24
|
+
providedIn: 'root',
|
|
26
25
|
},] }
|
|
27
26
|
];
|
|
28
27
|
MigrationService.ctorParameters = () => [];
|
|
29
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlncmF0aW9uLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiRDovV29ya3NwYWNlL3ZhbHRpbW8vdmFsdGltby1mcm9udGVuZC1saWJyYXJpZXMvcHJvamVjdHMvdmFsdGltby9taWdyYXRpb24vc3JjLyIsInNvdXJjZXMiOlsibGliL21pZ3JhdGlvbi5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7OztHQWNHO0FBRUgsT0FBTyxFQUFDLFVBQVUsRUFBQyxNQUFNLGVBQWUsQ0FBQzs7QUFLekMsTUFBTSxPQUFPLGdCQUFnQjtJQUMzQixnQkFBZSxDQUFDOzs7O1lBSmpCLFVBQVUsU0FBQztnQkFDVixVQUFVLEVBQUUsTUFBTTthQUNuQiIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBDb3B5cmlnaHQgMjAxNS0yMDIwIFJpdGVuc2UgQlYsIHRoZSBOZXRoZXJsYW5kcy5cbiAqXG4gKiBMaWNlbnNlZCB1bmRlciBFVVBMLCBWZXJzaW9uIDEuMiAodGhlIFwiTGljZW5zZVwiKTtcbiAqIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS5cbiAqIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdFxuICpcbiAqIGh0dHBzOi8vam9pbnVwLmVjLmV1cm9wYS5ldS9jb2xsZWN0aW9uL2V1cGwvZXVwbC10ZXh0LWV1cGwtMTJcbiAqXG4gKiBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlXG4gKiBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiBcIkFTIElTXCIgYmFzaXMsXG4gKiBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC5cbiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmRcbiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLlxuICovXG5cbmltcG9ydCB7SW5qZWN0YWJsZX0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbkBJbmplY3RhYmxlKHtcbiAgcHJvdmlkZWRJbjogJ3Jvb3QnLFxufSlcbmV4cG9ydCBjbGFzcyBNaWdyYXRpb25TZXJ2aWNlIHtcbiAgY29uc3RydWN0b3IoKSB7fVxufVxuIl19
|
package/esm2015/public-api.js
CHANGED
|
@@ -19,4 +19,4 @@
|
|
|
19
19
|
export * from './lib/migration.service';
|
|
20
20
|
export * from './lib/migration.component';
|
|
21
21
|
export * from './lib/migration.module';
|
|
22
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2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0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC5cbiAqIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmRcbiAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLlxuICovXG5cbi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2YgbWlncmF0aW9uXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvbWlncmF0aW9uLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvbWlncmF0aW9uLmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9taWdyYXRpb24ubW9kdWxlJztcbiJdfQ==
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
export * from './public-api';
|
|
5
5
|
export { MigrationProcessDiagramComponent as ɵa } from './lib/migration-process-diagram/migration-process-diagram.component';
|
|
6
6
|
export { MigrationRoutingModule as ɵb } from './lib/migration-routing.module';
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsdGltby1taWdyYXRpb24uanMiLCJzb3VyY2VSb290IjoiRDovV29ya3NwYWNlL3ZhbHRpbW8vdmFsdGltby1mcm9udGVuZC1saWJyYXJpZXMvcHJvamVjdHMvdmFsdGltby9taWdyYXRpb24vc3JjLyIsInNvdXJjZXMiOlsidmFsdGltby1taWdyYXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQztBQUU3QixPQUFPLEVBQUMsZ0NBQWdDLElBQUksRUFBRSxFQUFDLE1BQU0scUVBQXFFLENBQUM7QUFDM0gsT0FBTyxFQUFDLHNCQUFzQixJQUFJLEVBQUUsRUFBQyxNQUFNLGdDQUFnQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuXG5leHBvcnQge01pZ3JhdGlvblByb2Nlc3NEaWFncmFtQ29tcG9uZW50IGFzIMm1YX0gZnJvbSAnLi9saWIvbWlncmF0aW9uLXByb2Nlc3MtZGlhZ3JhbS9taWdyYXRpb24tcHJvY2Vzcy1kaWFncmFtLmNvbXBvbmVudCc7XG5leHBvcnQge01pZ3JhdGlvblJvdXRpbmdNb2R1bGUgYXMgybVifSBmcm9tICcuL2xpYi9taWdyYXRpb24tcm91dGluZy5tb2R1bGUnOyJdfQ==
|
|
@@ -26,13 +26,12 @@ import { TranslateModule } from '@ngx-translate/core';
|
|
|
26
26
|
* limitations under the License.
|
|
27
27
|
*/
|
|
28
28
|
class MigrationService {
|
|
29
|
-
constructor() {
|
|
30
|
-
}
|
|
29
|
+
constructor() { }
|
|
31
30
|
}
|
|
32
31
|
MigrationService.ɵprov = ɵɵdefineInjectable({ factory: function MigrationService_Factory() { return new MigrationService(); }, token: MigrationService, providedIn: "root" });
|
|
33
32
|
MigrationService.decorators = [
|
|
34
33
|
{ type: Injectable, args: [{
|
|
35
|
-
providedIn: 'root'
|
|
34
|
+
providedIn: 'root',
|
|
36
35
|
},] }
|
|
37
36
|
];
|
|
38
37
|
MigrationService.ctorParameters = () => [];
|
|
@@ -77,7 +76,7 @@ class MigrationProcessDiagramComponent {
|
|
|
77
76
|
}
|
|
78
77
|
loadXml(xml) {
|
|
79
78
|
this.bpmnJS.attachTo(this.el.nativeElement);
|
|
80
|
-
this.bpmnJS.importXML(xml,
|
|
79
|
+
this.bpmnJS.importXML(xml, err => {
|
|
81
80
|
this.logger.debug(err);
|
|
82
81
|
const processElements = this.bpmnJS.getDefinitions().rootElements.filter(function (element) {
|
|
83
82
|
return element.isExecutable;
|
|
@@ -131,25 +130,25 @@ class MigrationComponent {
|
|
|
131
130
|
this.processDefinitions = [];
|
|
132
131
|
this.selectedVersions = {
|
|
133
132
|
source: [],
|
|
134
|
-
target: []
|
|
133
|
+
target: [],
|
|
135
134
|
};
|
|
136
135
|
this.selectedId = {
|
|
137
136
|
source: null,
|
|
138
|
-
target: null
|
|
137
|
+
target: null,
|
|
139
138
|
};
|
|
140
139
|
this.loaded = {
|
|
141
140
|
source: false,
|
|
142
|
-
target: false
|
|
141
|
+
target: false,
|
|
143
142
|
};
|
|
144
143
|
this.fields = {
|
|
145
144
|
source: {
|
|
146
145
|
definition: null,
|
|
147
|
-
version: null
|
|
146
|
+
version: null,
|
|
148
147
|
},
|
|
149
148
|
target: {
|
|
150
149
|
definition: null,
|
|
151
|
-
version: null
|
|
152
|
-
}
|
|
150
|
+
version: null,
|
|
151
|
+
},
|
|
153
152
|
};
|
|
154
153
|
this.processCount = null;
|
|
155
154
|
this.uniqueFlowNodeMap = [];
|
|
@@ -162,14 +161,16 @@ class MigrationComponent {
|
|
|
162
161
|
ngAfterViewInit() {
|
|
163
162
|
this.diagram = {
|
|
164
163
|
source: this.sourceDiagram,
|
|
165
|
-
target: this.targetDiagram
|
|
164
|
+
target: this.targetDiagram,
|
|
166
165
|
};
|
|
167
166
|
}
|
|
168
167
|
get taskMappingLength() {
|
|
169
168
|
return Object.keys(this.taskMapping).length;
|
|
170
169
|
}
|
|
171
170
|
loadProcessDefinitions() {
|
|
172
|
-
this.processService
|
|
171
|
+
this.processService
|
|
172
|
+
.getProcessDefinitions()
|
|
173
|
+
.subscribe((processDefinitions) => {
|
|
173
174
|
this.processDefinitions = processDefinitions;
|
|
174
175
|
});
|
|
175
176
|
}
|
|
@@ -178,7 +179,9 @@ class MigrationComponent {
|
|
|
178
179
|
this.selectedVersions[type] = [];
|
|
179
180
|
this.clearProcess(type);
|
|
180
181
|
if (key) {
|
|
181
|
-
this.processService
|
|
182
|
+
this.processService
|
|
183
|
+
.getProcessDefinitionVersions(key)
|
|
184
|
+
.subscribe((processDefinitionVersions) => {
|
|
182
185
|
this.selectedVersions[type] = processDefinitionVersions;
|
|
183
186
|
});
|
|
184
187
|
}
|
|
@@ -217,7 +220,8 @@ class MigrationComponent {
|
|
|
217
220
|
const sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;
|
|
218
221
|
const targetFlowNodeMap = this.targetDiagram.flowNodeMap;
|
|
219
222
|
if (sourceFlowNodeMap != null && targetFlowNodeMap != null) {
|
|
220
|
-
this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(sourceFlowNode => !targetFlowNodeMap.some(targetFlowNode => sourceFlowNode.id === targetFlowNode.id &&
|
|
223
|
+
this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(sourceFlowNode => !targetFlowNodeMap.some(targetFlowNode => sourceFlowNode.id === targetFlowNode.id &&
|
|
224
|
+
sourceFlowNode.$type === targetFlowNode.$type));
|
|
221
225
|
}
|
|
222
226
|
}
|
|
223
227
|
getFilteredTargetFlowNodeMap(flowNodeType) {
|
|
@@ -234,19 +238,21 @@ class MigrationComponent {
|
|
|
234
238
|
}
|
|
235
239
|
}
|
|
236
240
|
migrateProcess() {
|
|
237
|
-
this.processService
|
|
241
|
+
this.processService
|
|
242
|
+
.migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping)
|
|
243
|
+
.subscribe(res => {
|
|
238
244
|
this.alertService.success('Process successfully migrated!');
|
|
239
245
|
this.clearProcess('source');
|
|
240
246
|
this.clearProcess('target');
|
|
241
247
|
this.fields = {
|
|
242
248
|
source: {
|
|
243
249
|
definition: null,
|
|
244
|
-
version: null
|
|
250
|
+
version: null,
|
|
245
251
|
},
|
|
246
252
|
target: {
|
|
247
253
|
definition: null,
|
|
248
|
-
version: null
|
|
249
|
-
}
|
|
254
|
+
version: null,
|
|
255
|
+
},
|
|
250
256
|
};
|
|
251
257
|
}, err => {
|
|
252
258
|
this.alertService.error('Process migration failed!');
|
|
@@ -257,7 +263,7 @@ class MigrationComponent {
|
|
|
257
263
|
MigrationComponent.decorators = [
|
|
258
264
|
{ type: Component, args: [{
|
|
259
265
|
selector: 'valtimo-migration',
|
|
260
|
-
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row mb-5\">\n <div class=\"col-12\">\n <div class=\"alert alert-warning pl-2 plr-2\" role=\"alert\">\n <div class=\"icon\"><span class=\"mdi mdi-alert-triangle\"></span></div>\n <div class=\"message\" [innerHTML]=\"'Process migration warning' | translate\"
|
|
266
|
+
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row mb-5\">\n <div class=\"col-12\">\n <div class=\"alert alert-warning pl-2 plr-2\" role=\"alert\">\n <div class=\"icon\"><span class=\"mdi mdi-alert-triangle\"></span></div>\n <div class=\"message\" [innerHTML]=\"'Process migration warning' | translate\"></div>\n </div>\n </div>\n </div>\n <div class=\"row mb-5\">\n <div class=\"col-4\">\n <label for=\"sourceDef\">Source Definition</label>\n <select\n class=\"form-control\"\n id=\"sourceDef\"\n [ngModel]=\"fields.source.definition\"\n (ngModelChange)=\"loadProcessDefinitionVersions($event, 'source')\"\n >\n <option [ngValue]=\"null\" selected>- Source Definition -</option>\n <option *ngFor=\"let processDef of processDefinitions\" [ngValue]=\"processDef.key\">\n {{ processDef.name }}\n </option>\n </select>\n </div>\n <div class=\"col-2\">\n <label for=\"sourceVer\">Source Version</label>\n <select\n class=\"form-control\"\n id=\"sourceVer\"\n [ngModel]=\"fields.source.version\"\n (ngModelChange)=\"loadProcess($event, 'source')\"\n >\n <option [ngValue]=\"null\" selected>- Source Version -</option>\n <option *ngFor=\"let processVer of selectedVersions.source\" [ngValue]=\"processVer.id\">\n {{ processVer.version }}\n </option>\n </select>\n </div>\n <div class=\"col-4\">\n <label for=\"targetDef\">Target Definition</label>\n <select\n class=\"form-control\"\n id=\"targetDef\"\n [ngModel]=\"fields.target.definition\"\n (ngModelChange)=\"loadProcessDefinitionVersions($event, 'target')\"\n >\n <option [ngValue]=\"null\" selected>- Target Definition -</option>\n <option *ngFor=\"let processDef of processDefinitions\" [ngValue]=\"processDef.key\">\n {{ processDef.name }}\n </option>\n </select>\n </div>\n <div class=\"col-2\">\n <label for=\"targetVer\">Target Version</label>\n <select\n class=\"form-control\"\n id=\"targetVer\"\n [ngModel]=\"fields.target.version\"\n (ngModelChange)=\"loadProcess($event, 'target')\"\n >\n <option [ngValue]=\"null\" selected>- Target Version -</option>\n <option *ngFor=\"let processVer of selectedVersions.target\" [ngValue]=\"processVer.id\">\n {{ processVer.version }}\n </option>\n </select>\n </div>\n </div>\n\n <div class=\"row mb-5\">\n <div class=\"col-6\">\n <valtimo-migration-process-diagram\n name=\"source\"\n (loaded)=\"diagramLoaded($event)\"\n #sourceDiagram\n ></valtimo-migration-process-diagram>\n </div>\n <div class=\"col-6\">\n <valtimo-migration-process-diagram\n name=\"target\"\n (loaded)=\"diagramLoaded($event)\"\n #targetDiagram\n ></valtimo-migration-process-diagram>\n </div>\n </div>\n <table class=\"table table-striped mb-5\" *ngIf=\"selectedId.source && selectedId.target\">\n <tr *ngFor=\"let node of uniqueFlowNodeMap\">\n <td>{{ node.name ? node.name : node.id }}</td>\n <td>\n <select class=\"form-control\" (change)=\"taskMapping[node.id] = $event.target.value\">\n <option [value]=\"null\" disabled selected>- Choose Target -</option>\n <option\n *ngFor=\"let targetFlowNode of getFilteredTargetFlowNodeMap(node.$type)\"\n [value]=\"targetFlowNode.id\"\n >\n {{ targetFlowNode.name ? targetFlowNode.name : targetFlowNode.id }}\n </option>\n </select>\n </td>\n </tr>\n </table>\n <hr />\n <div class=\"btn-group mb-5\">\n <button\n [disabled]=\"\n (uniqueFlowNodeMap.length !== taskMappingLength && uniqueFlowNodeMap.length > 0) ||\n !loaded.source ||\n !loaded.target\n \"\n (click)=\"migrateProcess()\"\n class=\"btn btn-primary\"\n >\n Migrate\n <span *ngIf=\"processCount !== null\" class=\"badge badge-pill badge-secondary\">{{\n processCount\n }}</span>\n </button>\n </div>\n </div>\n</div>\n",
|
|
261
267
|
styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"]
|
|
262
268
|
},] }
|
|
263
269
|
];
|
|
@@ -299,11 +305,8 @@ class MigrationRoutingModule {
|
|
|
299
305
|
}
|
|
300
306
|
MigrationRoutingModule.decorators = [
|
|
301
307
|
{ type: NgModule, args: [{
|
|
302
|
-
imports: [
|
|
303
|
-
|
|
304
|
-
RouterModule.forChild(routes),
|
|
305
|
-
],
|
|
306
|
-
exports: [RouterModule]
|
|
308
|
+
imports: [CommonModule, RouterModule.forChild(routes)],
|
|
309
|
+
exports: [RouterModule],
|
|
307
310
|
},] }
|
|
308
311
|
];
|
|
309
312
|
|
|
@@ -333,9 +336,9 @@ MigrationModule.decorators = [
|
|
|
333
336
|
ReactiveFormsModule,
|
|
334
337
|
WidgetModule,
|
|
335
338
|
FormsModule,
|
|
336
|
-
TranslateModule
|
|
339
|
+
TranslateModule,
|
|
337
340
|
],
|
|
338
|
-
exports: [MigrationComponent]
|
|
341
|
+
exports: [MigrationComponent],
|
|
339
342
|
},] }
|
|
340
343
|
];
|
|
341
344
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valtimo-migration.js","sources":["../../../../projects/valtimo/migration/src/lib/migration.service.ts","../../../../projects/valtimo/migration/src/lib/migration-process-diagram/migration-process-diagram.component.ts","../../../../projects/valtimo/migration/src/lib/migration.component.ts","../../../../projects/valtimo/migration/src/lib/migration-routing.module.ts","../../../../projects/valtimo/migration/src/lib/migration.module.ts","../../../../projects/valtimo/migration/src/public-api.ts","../../../../projects/valtimo/migration/src/valtimo-migration.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MigrationService {\n\n constructor() {\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild} from '@angular/core';\n\nimport * as BpmnJS from 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js';\nimport {NGXLogger} from 'ngx-logger';\n\n@Component({\n selector: 'valtimo-migration-process-diagram',\n templateUrl: './migration-process-diagram.component.html',\n styleUrls: ['./migration-process-diagram.component.scss']\n})\nexport class MigrationProcessDiagramComponent implements OnInit, OnDestroy {\n\n private bpmnJS: BpmnJS;\n public flowNodeMap: any = null;\n\n @ViewChild('ref') public el: ElementRef;\n @Input() name: string;\n @Output() loaded = new EventEmitter();\n\n constructor(private logger: NGXLogger) {\n }\n\n ngOnInit() {\n this.bpmnJS = new BpmnJS();\n this.bpmnJS.on('import.done', ({error}: any) => {\n if (!error) {\n const canvas = this.bpmnJS.get('canvas');\n canvas.zoom('fit-viewport', 'auto');\n\n }\n });\n }\n\n ngOnDestroy() {\n if (this.bpmnJS) {\n this.bpmnJS.destroy();\n }\n }\n\n clear() {\n this.bpmnJS.clear();\n }\n\n public loadXml(xml: string): void {\n this.bpmnJS.attachTo(this.el.nativeElement);\n this.bpmnJS.importXML(xml, (err) => {\n this.logger.debug(err);\n const processElements = this.bpmnJS.getDefinitions().rootElements.filter(function (element) {\n return element.isExecutable;\n });\n this.flowNodeMap = processElements[0].flowElements.filter(function (element) {\n if (element.name === null || element.name === '') {\n element.name = element.id;\n }\n return element.$type !== 'bpmn:SequenceFlow';\n });\n this.loaded.emit(this.name);\n });\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';\nimport {ProcessService} from '@valtimo/process';\nimport {ProcessDefinition} from '@valtimo/contract';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {NGXLogger} from 'ngx-logger';\nimport {AlertService} from '@valtimo/components';\n\n@Component({\n selector: 'valtimo-migration',\n templateUrl: './migration.component.html',\n styleUrls: ['./migration.component.scss']\n})\nexport class MigrationComponent implements OnInit, AfterViewInit {\n\n public processDefinitions: ProcessDefinition[] = [];\n public selectedVersions = {\n source: [],\n target: []\n };\n public selectedId = {\n source: null,\n target: null\n };\n public loaded = {\n source: false,\n target: false\n };\n public fields = {\n source: {\n definition: null,\n version: null\n },\n target: {\n definition: null,\n version: null\n }\n };\n\n public processCount: number | null = null;\n public uniqueFlowNodeMap: any[] = [];\n public taskMapping: any = {};\n\n @ViewChild('sourceDiagram') sourceDiagram: MigrationProcessDiagramComponent;\n @ViewChild('targetDiagram') targetDiagram: MigrationProcessDiagramComponent;\n\n public diagram: any = null;\n\n constructor(private processService: ProcessService, private logger: NGXLogger, private alertService: AlertService) {\n }\n\n ngOnInit() {\n this.loadProcessDefinitions();\n }\n\n ngAfterViewInit() {\n this.diagram = {\n source: this.sourceDiagram,\n target: this.targetDiagram\n };\n }\n\n public get taskMappingLength() {\n return Object.keys(this.taskMapping).length;\n }\n\n loadProcessDefinitions() {\n this.processService.getProcessDefinitions().subscribe((processDefinitions: ProcessDefinition[]) => {\n this.processDefinitions = processDefinitions;\n });\n }\n\n loadProcessDefinitionVersions(key: string | null, type: string) {\n this.fields[type].definition = key;\n this.selectedVersions[type] = [];\n this.clearProcess(type);\n if (key) {\n this.processService.getProcessDefinitionVersions(key).subscribe((processDefinitionVersions: ProcessDefinition[]) => {\n this.selectedVersions[type] = processDefinitionVersions;\n });\n }\n }\n\n loadProcess(id: string | null, type: string) {\n this.fields[type].version = id;\n this.clearProcess(type);\n if (id) {\n this.loadProcessDefinitionXML(id, type);\n if (type === 'source') {\n this.loadProcessCount(id);\n }\n }\n }\n\n private clearProcess(type: string) {\n this.loaded[type] = false;\n this.selectedId[type] = null;\n this.diagram[type].clear();\n if (type === 'source') {\n this.processCount = null;\n }\n }\n\n loadProcessDefinitionXML(id: string, type: string) {\n this.processService.getProcessDefinitionXml(id).subscribe(xml => {\n this.diagram[type].loadXml(xml['bpmn20Xml']);\n this.selectedId[type] = id;\n });\n }\n\n loadProcessCount(id: string) {\n this.processService.getProcessCount(id).subscribe(response => {\n this.processCount = response.count;\n });\n }\n\n setUniqueFlowNodeMap() {\n this.uniqueFlowNodeMap = [];\n const sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n\n if (sourceFlowNodeMap != null && targetFlowNodeMap != null) {\n this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(sourceFlowNode =>\n !targetFlowNodeMap.some(targetFlowNode =>\n sourceFlowNode.id === targetFlowNode.id && sourceFlowNode.$type === targetFlowNode.$type));\n }\n }\n\n getFilteredTargetFlowNodeMap(flowNodeType) {\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n return targetFlowNodeMap.filter(function (flowNode) {\n return flowNode.$type === flowNodeType;\n });\n }\n\n diagramLoaded(diagramName: string) {\n this.loaded[diagramName] = true;\n if (this.loaded.source && this.loaded.target) {\n this.taskMapping = {};\n this.setUniqueFlowNodeMap();\n }\n }\n\n migrateProcess() {\n this.processService.migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping).subscribe((res) => {\n this.alertService.success('Process successfully migrated!');\n this.clearProcess('source');\n this.clearProcess('target');\n this.fields = {\n source: {\n definition: null,\n version: null\n },\n target: {\n definition: null,\n version: null\n }\n };\n }, err => {\n this.alertService.error('Process migration failed!');\n this.logger.debug(err);\n });\n }\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {MigrationComponent} from './migration.component';\nimport {ROLE_ADMIN} from '@valtimo/contract';\n\nconst routes: Routes = [\n {\n path: 'process-migration',\n component: MigrationComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Process migration', roles: [ROLE_ADMIN]},\n },\n];\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule.forChild(routes),\n ],\n exports: [RouterModule]\n})\nexport class MigrationRoutingModule {\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {MigrationComponent} from './migration.component';\nimport {MigrationRoutingModule} from './migration-routing.module';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {WidgetModule} from '@valtimo/components';\nimport {TranslateModule} from '@ngx-translate/core';\n\n\n@NgModule({\n declarations: [MigrationComponent, MigrationProcessDiagramComponent],\n imports: [\n CommonModule,\n MigrationRoutingModule,\n ReactiveFormsModule,\n WidgetModule,\n FormsModule,\n TranslateModule\n ],\n exports: [MigrationComponent]\n})\nexport class MigrationModule {\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of migration\n */\n\nexport * from './lib/migration.service';\nexport * from './lib/migration.component';\nexport * from './lib/migration.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {MigrationProcessDiagramComponent as ɵa} from './lib/migration-process-diagram/migration-process-diagram.component';\nexport {MigrationRoutingModule as ɵb} from './lib/migration-routing.module';"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;MAqBa,gBAAgB;IAE3B;KACC;;;;YANF,UAAU,SAAC;gBACV,UAAU,EAAE,MAAM;aACnB;;;;ACpBD;;;;;;;;;;;;;;;MA0Ba,gCAAgC;IAS3C,YAAoB,MAAiB;QAAjB,WAAM,GAAN,MAAM,CAAW;QAN9B,gBAAW,GAAQ,IAAI,CAAC;QAIrB,WAAM,GAAG,IAAI,YAAY,EAAE,CAAC;KAGrC;IAED,QAAQ;QACN,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,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7B,WAAW,EAAE,CAAC,gBAAgB,CAAC;QAC/B,IAAI,IAAmD;KACxD;CACF,CAAC;MASW,sBAAsB;;;YAPlC,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,YAAY;oBACZ,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC;iBAC9B;gBACD,OAAO,EAAE,CAAC,YAAY,CAAC;aACxB;;;ACtCD;;;;;;;;;;;;;;;MAsCa,eAAe;;;YAZ3B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,kBAAkB,EAAE,gCAAgC,CAAC;gBACpE,OAAO,EAAE;oBACP,YAAY;oBACZ,sBAAsB;oBACtB,mBAAmB;oBACnB,YAAY;oBACZ,WAAW;oBACX,eAAe;iBAChB;gBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;aAC9B;;;ACrCD;;;;;;;;;;;;;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"valtimo-migration.js","sources":["../../../../projects/valtimo/migration/src/lib/migration.service.ts","../../../../projects/valtimo/migration/src/lib/migration-process-diagram/migration-process-diagram.component.ts","../../../../projects/valtimo/migration/src/lib/migration.component.ts","../../../../projects/valtimo/migration/src/lib/migration-routing.module.ts","../../../../projects/valtimo/migration/src/lib/migration.module.ts","../../../../projects/valtimo/migration/src/public-api.ts","../../../../projects/valtimo/migration/src/valtimo-migration.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MigrationService {\n constructor() {}\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\n\nimport * as BpmnJS from 'bpmn-js/dist/bpmn-navigated-viewer.production.min.js';\nimport {NGXLogger} from 'ngx-logger';\n\n@Component({\n selector: 'valtimo-migration-process-diagram',\n templateUrl: './migration-process-diagram.component.html',\n styleUrls: ['./migration-process-diagram.component.scss'],\n})\nexport class MigrationProcessDiagramComponent implements OnInit, OnDestroy {\n private bpmnJS: BpmnJS;\n public flowNodeMap: any = null;\n\n @ViewChild('ref') public el: ElementRef;\n @Input() name: string;\n @Output() loaded = new EventEmitter();\n\n constructor(private logger: NGXLogger) {}\n\n ngOnInit() {\n this.bpmnJS = new BpmnJS();\n this.bpmnJS.on('import.done', ({error}: any) => {\n if (!error) {\n const canvas = this.bpmnJS.get('canvas');\n canvas.zoom('fit-viewport', 'auto');\n }\n });\n }\n\n ngOnDestroy() {\n if (this.bpmnJS) {\n this.bpmnJS.destroy();\n }\n }\n\n clear() {\n this.bpmnJS.clear();\n }\n\n public loadXml(xml: string): void {\n this.bpmnJS.attachTo(this.el.nativeElement);\n this.bpmnJS.importXML(xml, err => {\n this.logger.debug(err);\n const processElements = this.bpmnJS.getDefinitions().rootElements.filter(function (element) {\n return element.isExecutable;\n });\n this.flowNodeMap = processElements[0].flowElements.filter(function (element) {\n if (element.name === null || element.name === '') {\n element.name = element.id;\n }\n return element.$type !== 'bpmn:SequenceFlow';\n });\n this.loaded.emit(this.name);\n });\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';\nimport {ProcessService} from '@valtimo/process';\nimport {ProcessDefinition} from '@valtimo/contract';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {NGXLogger} from 'ngx-logger';\nimport {AlertService} from '@valtimo/components';\n\n@Component({\n selector: 'valtimo-migration',\n templateUrl: './migration.component.html',\n styleUrls: ['./migration.component.scss'],\n})\nexport class MigrationComponent implements OnInit, AfterViewInit {\n public processDefinitions: ProcessDefinition[] = [];\n public selectedVersions = {\n source: [],\n target: [],\n };\n public selectedId = {\n source: null,\n target: null,\n };\n public loaded = {\n source: false,\n target: false,\n };\n public fields = {\n source: {\n definition: null,\n version: null,\n },\n target: {\n definition: null,\n version: null,\n },\n };\n\n public processCount: number | null = null;\n public uniqueFlowNodeMap: any[] = [];\n public taskMapping: any = {};\n\n @ViewChild('sourceDiagram') sourceDiagram: MigrationProcessDiagramComponent;\n @ViewChild('targetDiagram') targetDiagram: MigrationProcessDiagramComponent;\n\n public diagram: any = null;\n\n constructor(\n private processService: ProcessService,\n private logger: NGXLogger,\n private alertService: AlertService\n ) {}\n\n ngOnInit() {\n this.loadProcessDefinitions();\n }\n\n ngAfterViewInit() {\n this.diagram = {\n source: this.sourceDiagram,\n target: this.targetDiagram,\n };\n }\n\n public get taskMappingLength() {\n return Object.keys(this.taskMapping).length;\n }\n\n loadProcessDefinitions() {\n this.processService\n .getProcessDefinitions()\n .subscribe((processDefinitions: ProcessDefinition[]) => {\n this.processDefinitions = processDefinitions;\n });\n }\n\n loadProcessDefinitionVersions(key: string | null, type: string) {\n this.fields[type].definition = key;\n this.selectedVersions[type] = [];\n this.clearProcess(type);\n if (key) {\n this.processService\n .getProcessDefinitionVersions(key)\n .subscribe((processDefinitionVersions: ProcessDefinition[]) => {\n this.selectedVersions[type] = processDefinitionVersions;\n });\n }\n }\n\n loadProcess(id: string | null, type: string) {\n this.fields[type].version = id;\n this.clearProcess(type);\n if (id) {\n this.loadProcessDefinitionXML(id, type);\n if (type === 'source') {\n this.loadProcessCount(id);\n }\n }\n }\n\n private clearProcess(type: string) {\n this.loaded[type] = false;\n this.selectedId[type] = null;\n this.diagram[type].clear();\n if (type === 'source') {\n this.processCount = null;\n }\n }\n\n loadProcessDefinitionXML(id: string, type: string) {\n this.processService.getProcessDefinitionXml(id).subscribe(xml => {\n this.diagram[type].loadXml(xml['bpmn20Xml']);\n this.selectedId[type] = id;\n });\n }\n\n loadProcessCount(id: string) {\n this.processService.getProcessCount(id).subscribe(response => {\n this.processCount = response.count;\n });\n }\n\n setUniqueFlowNodeMap() {\n this.uniqueFlowNodeMap = [];\n const sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n\n if (sourceFlowNodeMap != null && targetFlowNodeMap != null) {\n this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(\n sourceFlowNode =>\n !targetFlowNodeMap.some(\n targetFlowNode =>\n sourceFlowNode.id === targetFlowNode.id &&\n sourceFlowNode.$type === targetFlowNode.$type\n )\n );\n }\n }\n\n getFilteredTargetFlowNodeMap(flowNodeType) {\n const targetFlowNodeMap = this.targetDiagram.flowNodeMap;\n return targetFlowNodeMap.filter(function (flowNode) {\n return flowNode.$type === flowNodeType;\n });\n }\n\n diagramLoaded(diagramName: string) {\n this.loaded[diagramName] = true;\n if (this.loaded.source && this.loaded.target) {\n this.taskMapping = {};\n this.setUniqueFlowNodeMap();\n }\n }\n\n migrateProcess() {\n this.processService\n .migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping)\n .subscribe(\n res => {\n this.alertService.success('Process successfully migrated!');\n this.clearProcess('source');\n this.clearProcess('target');\n this.fields = {\n source: {\n definition: null,\n version: null,\n },\n target: {\n definition: null,\n version: null,\n },\n };\n },\n err => {\n this.alertService.error('Process migration failed!');\n this.logger.debug(err);\n }\n );\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {MigrationComponent} from './migration.component';\nimport {ROLE_ADMIN} from '@valtimo/contract';\n\nconst routes: Routes = [\n {\n path: 'process-migration',\n component: MigrationComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Process migration', roles: [ROLE_ADMIN]},\n },\n];\n\n@NgModule({\n imports: [CommonModule, RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class MigrationRoutingModule {}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {MigrationComponent} from './migration.component';\nimport {MigrationRoutingModule} from './migration-routing.module';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {WidgetModule} from '@valtimo/components';\nimport {TranslateModule} from '@ngx-translate/core';\n\n@NgModule({\n declarations: [MigrationComponent, MigrationProcessDiagramComponent],\n imports: [\n CommonModule,\n MigrationRoutingModule,\n ReactiveFormsModule,\n WidgetModule,\n FormsModule,\n TranslateModule,\n ],\n exports: [MigrationComponent],\n})\nexport class MigrationModule {}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of migration\n */\n\nexport * from './lib/migration.service';\nexport * from './lib/migration.component';\nexport * from './lib/migration.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {MigrationProcessDiagramComponent as ɵa} from './lib/migration-process-diagram/migration-process-diagram.component';\nexport {MigrationRoutingModule as ɵb} from './lib/migration-routing.module';"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;MAqBa,gBAAgB;IAC3B,iBAAgB;;;;YAJjB,UAAU,SAAC;gBACV,UAAU,EAAE,MAAM;aACnB;;;;ACpBD;;;;;;;;;;;;;;;MAmCa,gCAAgC;IAQ3C,YAAoB,MAAiB;QAAjB,WAAM,GAAN,MAAM,CAAW;QAN9B,gBAAW,G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U,EAAC,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,CAAC,UAAU,CAAC,EAAC;AAL3D,MAAM,MAAM,GAAW;IACrB;QACE,IAAI,EAAE,mBAAmB;QACzB,SAAS,EAAE,kBAAkB;QAC7B,WAAW,EAAE,CAAC,gBAAgB,CAAC;QAC/B,IAAI,IAAmD;KACxD;CACF,CAAC;MAMW,sBAAsB;;;YAJlC,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;gBACtD,OAAO,EAAE,CAAC,YAAY,CAAC;aACxB;;;ACnCD;;;;;;;;;;;;;;;MAqCa,eAAe;;;YAZ3B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,kBAAkB,EAAE,gCAAgC,CAAC;gBACpE,OAAO,EAAE;oBACP,YAAY;oBACZ,sBAAsB;oBACtB,mBAAmB;oBACnB,YAAY;oBACZ,WAAW;oBACX,eAAe;iBAChB;gBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;aAC9B;;;ACpCD;;;;;;;;;;;;;;;;ACAA;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"MigrationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":18,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]},"statics":{"ɵprov":{}}},"MigrationComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":23,"character":1},"arguments":[{"selector":"valtimo-migration","template":"<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row mb-5\">\n <div class=\"col-12\">\n <div class=\"alert alert-warning pl-2 plr-2\" role=\"alert\">\n <div class=\"icon\"><span class=\"mdi mdi-alert-triangle\"></span></div>\n <div class=\"message\" [innerHTML]=\"'Process migration warning' | translate\">\n </div>\n </div>\n </div>\n </div>\n <div class=\"row mb-5\">\n <div class=\"col-4\">\n <label for=\"sourceDef\">Source Definition</label>\n <select class=\"form-control\" id=\"sourceDef\"\n [ngModel]=\"fields.source.definition\" (ngModelChange)=\"loadProcessDefinitionVersions($event, 'source')\">\n <option [ngValue]=\"null\" selected>- Source Definition -</option>\n <option *ngFor=\"let processDef of processDefinitions\" [ngValue]=\"processDef.key\">{{processDef.name}}</option>\n </select>\n </div>\n <div class=\"col-2\">\n <label for=\"sourceVer\">Source Version</label>\n <select class=\"form-control\" id=\"sourceVer\" [ngModel]=\"fields.source.version\"\n (ngModelChange)=\"loadProcess($event, 'source')\">\n <option [ngValue]=\"null\" selected>- Source Version -</option>\n <option *ngFor=\"let processVer of selectedVersions.source\"\n [ngValue]=\"processVer.id\">{{processVer.version}}</option>\n </select>\n </div>\n <div class=\"col-4\">\n <label for=\"targetDef\">Target Definition</label>\n <select class=\"form-control\" id=\"targetDef\" [ngModel]=\"fields.target.definition\"\n (ngModelChange)=\"loadProcessDefinitionVersions($event, 'target')\">\n <option [ngValue]=\"null\" selected>- Target Definition -</option>\n <option *ngFor=\"let processDef of processDefinitions\" [ngValue]=\"processDef.key\">{{processDef.name}}</option>\n </select>\n </div>\n <div class=\"col-2\">\n <label for=\"targetVer\">Target Version</label>\n <select class=\"form-control\" id=\"targetVer\" [ngModel]=\"fields.target.version\"\n (ngModelChange)=\"loadProcess($event, 'target')\">\n <option [ngValue]=\"null\" selected>- Target Version -</option>\n <option *ngFor=\"let processVer of selectedVersions.target\"\n [ngValue]=\"processVer.id\">{{processVer.version}}</option>\n </select>\n </div>\n </div>\n\n <div class=\"row mb-5\">\n <div class=\"col-6\">\n <valtimo-migration-process-diagram name=\"source\" (loaded)=\"diagramLoaded($event)\"\n #sourceDiagram></valtimo-migration-process-diagram>\n </div>\n <div class=\"col-6\">\n <valtimo-migration-process-diagram name=\"target\" (loaded)=\"diagramLoaded($event)\"\n #targetDiagram></valtimo-migration-process-diagram>\n </div>\n </div>\n <table class=\"table table-striped mb-5\" *ngIf=\"selectedId.source && selectedId.target\">\n <tr *ngFor=\"let node of uniqueFlowNodeMap\">\n <td>{{node.name ? node.name : node.id}}</td>\n <td>\n <select class=\"form-control\" (change)=\"taskMapping[node.id]=$event.target.value\">\n <option [value]=\"null\" disabled selected>- Choose Target -</option>\n <option *ngFor=\"let targetFlowNode of getFilteredTargetFlowNodeMap(node.$type)\"\n [value]=\"targetFlowNode.id\">{{targetFlowNode.name ? targetFlowNode.name : targetFlowNode.id}}</option>\n </select>\n </td>\n </tr>\n </table>\n <hr>\n <div class=\"btn-group mb-5\">\n <button [disabled]=\"(uniqueFlowNodeMap.length !== taskMappingLength && uniqueFlowNodeMap.length > 0) || !loaded.source || !loaded.target\"\n (click)=\"migrateProcess()\"\n class=\"btn btn-primary\">Migrate <span *ngIf=\"processCount !== null\"\n class=\"badge badge-pill badge-secondary\">{{processCount}}</span>\n </button>\n </div>\n </div>\n</div>\n","styles":["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"]}]}],"members":{"sourceDiagram":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":58,"character":3},"arguments":["sourceDiagram"]}]}],"targetDiagram":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":59,"character":3},"arguments":["targetDiagram"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@valtimo/process","name":"ProcessService","line":63,"character":38},{"__symbolic":"reference","module":"ngx-logger","name":"NGXLogger","line":63,"character":70},{"__symbolic":"reference","module":"@valtimo/components","name":"AlertService","line":63,"character":103}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"loadProcessDefinitions":[{"__symbolic":"method"}],"loadProcessDefinitionVersions":[{"__symbolic":"method"}],"loadProcess":[{"__symbolic":"method"}],"clearProcess":[{"__symbolic":"method"}],"loadProcessDefinitionXML":[{"__symbolic":"method"}],"loadProcessCount":[{"__symbolic":"method"}],"setUniqueFlowNodeMap":[{"__symbolic":"method"}],"getFilteredTargetFlowNodeMap":[{"__symbolic":"method"}],"diagramLoaded":[{"__symbolic":"method"}],"migrateProcess":[{"__symbolic":"method"}]}},"MigrationModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":26,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"MigrationComponent"},{"__symbolic":"reference","name":"ɵa"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":29,"character":4},{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":31,"character":4},{"__symbolic":"reference","module":"@valtimo/components","name":"WidgetModule","line":32,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":33,"character":4},{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateModule","line":34,"character":4}],"exports":[{"__symbolic":"reference","name":"MigrationComponent"}]}]}],"members":{}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":21,"character":1},"arguments":[{"selector":"valtimo-migration-process-diagram","template":"<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div #ref class=\"diagram-container\"></div>\n","styles":["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.diagram-container-switch-holder{width:100%;z-index:1000}.diagram-container{height:48vh}"]}]}],"members":{"el":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":31,"character":3},"arguments":["ref"]}]}],"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":32,"character":3}}]}],"loaded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":33,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"ngx-logger","name":"NGXLogger","line":35,"character":30}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"loadXml":[{"__symbolic":"method"}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":32,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":34,"character":4},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":35,"character":4},"member":"forChild"},"arguments":[[{"path":"process-migration","component":{"__symbolic":"reference","name":"MigrationComponent"},"canActivate":[{"__symbolic":"reference","module":"@valtimo/security","name":"AuthGuardService","line":27,"character":18}],"data":{"title":"Process migration","roles":[{"__symbolic":"reference","module":"@valtimo/contract","name":"ROLE_ADMIN","line":28,"character":47}]}}]]}],"exports":[{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":37,"character":12}]}]}],"members":{}}},"origins":{"MigrationService":"./lib/migration.service","MigrationComponent":"./lib/migration.component","MigrationModule":"./lib/migration.module","ɵa":"./lib/migration-process-diagram/migration-process-diagram.component","ɵb":"./lib/migration-routing.module"},"importAs":"@valtimo/migration"}
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"MigrationService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":18,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]},"statics":{"ɵprov":{}}},"MigrationComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":23,"character":1},"arguments":[{"selector":"valtimo-migration","template":"<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"row mb-5\">\n <div class=\"col-12\">\n <div class=\"alert alert-warning pl-2 plr-2\" role=\"alert\">\n <div class=\"icon\"><span class=\"mdi mdi-alert-triangle\"></span></div>\n <div class=\"message\" [innerHTML]=\"'Process migration warning' | translate\"></div>\n </div>\n </div>\n </div>\n <div class=\"row mb-5\">\n <div class=\"col-4\">\n <label for=\"sourceDef\">Source Definition</label>\n <select\n class=\"form-control\"\n id=\"sourceDef\"\n [ngModel]=\"fields.source.definition\"\n (ngModelChange)=\"loadProcessDefinitionVersions($event, 'source')\"\n >\n <option [ngValue]=\"null\" selected>- Source Definition -</option>\n <option *ngFor=\"let processDef of processDefinitions\" [ngValue]=\"processDef.key\">\n {{ processDef.name }}\n </option>\n </select>\n </div>\n <div class=\"col-2\">\n <label for=\"sourceVer\">Source Version</label>\n <select\n class=\"form-control\"\n id=\"sourceVer\"\n [ngModel]=\"fields.source.version\"\n (ngModelChange)=\"loadProcess($event, 'source')\"\n >\n <option [ngValue]=\"null\" selected>- Source Version -</option>\n <option *ngFor=\"let processVer of selectedVersions.source\" [ngValue]=\"processVer.id\">\n {{ processVer.version }}\n </option>\n </select>\n </div>\n <div class=\"col-4\">\n <label for=\"targetDef\">Target Definition</label>\n <select\n class=\"form-control\"\n id=\"targetDef\"\n [ngModel]=\"fields.target.definition\"\n (ngModelChange)=\"loadProcessDefinitionVersions($event, 'target')\"\n >\n <option [ngValue]=\"null\" selected>- Target Definition -</option>\n <option *ngFor=\"let processDef of processDefinitions\" [ngValue]=\"processDef.key\">\n {{ processDef.name }}\n </option>\n </select>\n </div>\n <div class=\"col-2\">\n <label for=\"targetVer\">Target Version</label>\n <select\n class=\"form-control\"\n id=\"targetVer\"\n [ngModel]=\"fields.target.version\"\n (ngModelChange)=\"loadProcess($event, 'target')\"\n >\n <option [ngValue]=\"null\" selected>- Target Version -</option>\n <option *ngFor=\"let processVer of selectedVersions.target\" [ngValue]=\"processVer.id\">\n {{ processVer.version }}\n </option>\n </select>\n </div>\n </div>\n\n <div class=\"row mb-5\">\n <div class=\"col-6\">\n <valtimo-migration-process-diagram\n name=\"source\"\n (loaded)=\"diagramLoaded($event)\"\n #sourceDiagram\n ></valtimo-migration-process-diagram>\n </div>\n <div class=\"col-6\">\n <valtimo-migration-process-diagram\n name=\"target\"\n (loaded)=\"diagramLoaded($event)\"\n #targetDiagram\n ></valtimo-migration-process-diagram>\n </div>\n </div>\n <table class=\"table table-striped mb-5\" *ngIf=\"selectedId.source && selectedId.target\">\n <tr *ngFor=\"let node of uniqueFlowNodeMap\">\n <td>{{ node.name ? node.name : node.id }}</td>\n <td>\n <select class=\"form-control\" (change)=\"taskMapping[node.id] = $event.target.value\">\n <option [value]=\"null\" disabled selected>- Choose Target -</option>\n <option\n *ngFor=\"let targetFlowNode of getFilteredTargetFlowNodeMap(node.$type)\"\n [value]=\"targetFlowNode.id\"\n >\n {{ targetFlowNode.name ? targetFlowNode.name : targetFlowNode.id }}\n </option>\n </select>\n </td>\n </tr>\n </table>\n <hr />\n <div class=\"btn-group mb-5\">\n <button\n [disabled]=\"\n (uniqueFlowNodeMap.length !== taskMappingLength && uniqueFlowNodeMap.length > 0) ||\n !loaded.source ||\n !loaded.target\n \"\n (click)=\"migrateProcess()\"\n class=\"btn btn-primary\"\n >\n Migrate\n <span *ngIf=\"processCount !== null\" class=\"badge badge-pill badge-secondary\">{{\n processCount\n }}</span>\n </button>\n </div>\n </div>\n</div>\n","styles":["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"]}]}],"members":{"sourceDiagram":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":57,"character":3},"arguments":["sourceDiagram"]}]}],"targetDiagram":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":58,"character":3},"arguments":["targetDiagram"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@valtimo/process","name":"ProcessService","line":63,"character":28},{"__symbolic":"reference","module":"ngx-logger","name":"NGXLogger","line":64,"character":20},{"__symbolic":"reference","module":"@valtimo/components","name":"AlertService","line":65,"character":26}]}],"ngOnInit":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"loadProcessDefinitions":[{"__symbolic":"method"}],"loadProcessDefinitionVersions":[{"__symbolic":"method"}],"loadProcess":[{"__symbolic":"method"}],"clearProcess":[{"__symbolic":"method"}],"loadProcessDefinitionXML":[{"__symbolic":"method"}],"loadProcessCount":[{"__symbolic":"method"}],"setUniqueFlowNodeMap":[{"__symbolic":"method"}],"getFilteredTargetFlowNodeMap":[{"__symbolic":"method"}],"diagramLoaded":[{"__symbolic":"method"}],"migrateProcess":[{"__symbolic":"method"}]}},"MigrationModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":25,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"MigrationComponent"},{"__symbolic":"reference","name":"ɵa"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":28,"character":4},{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","module":"@angular/forms","name":"ReactiveFormsModule","line":30,"character":4},{"__symbolic":"reference","module":"@valtimo/components","name":"WidgetModule","line":31,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":32,"character":4},{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateModule","line":33,"character":4}],"exports":[{"__symbolic":"reference","name":"MigrationComponent"}]}]}],"members":{}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":30,"character":1},"arguments":[{"selector":"valtimo-migration-process-diagram","template":"<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div #ref class=\"diagram-container\"></div>\n","styles":["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.diagram-container-switch-holder{width:100%;z-index:1000}.diagram-container{height:48vh}"]}]}],"members":{"el":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":39,"character":3},"arguments":["ref"]}]}],"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":3}}]}],"loaded":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":41,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"ngx-logger","name":"NGXLogger","line":43,"character":30}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"loadXml":[{"__symbolic":"method"}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":32,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":33,"character":12},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":33,"character":26},"member":"forChild"},"arguments":[[{"path":"process-migration","component":{"__symbolic":"reference","name":"MigrationComponent"},"canActivate":[{"__symbolic":"reference","module":"@valtimo/security","name":"AuthGuardService","line":27,"character":18}],"data":{"title":"Process migration","roles":[{"__symbolic":"reference","module":"@valtimo/contract","name":"ROLE_ADMIN","line":28,"character":47}]}}]]}],"exports":[{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":34,"character":12}]}]}],"members":{}}},"origins":{"MigrationService":"./lib/migration.service","MigrationComponent":"./lib/migration.component","MigrationModule":"./lib/migration.module","ɵa":"./lib/migration-process-diagram/migration-process-diagram.component","ɵb":"./lib/migration-routing.module"},"importAs":"@valtimo/migration"}
|