@valtimo/migration 0.0.0

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.
@@ -0,0 +1,397 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, EventEmitter, Output, Input, ViewChild, Component, NgModule } from '@angular/core';
3
+ import * as i1$1 from '@valtimo/process';
4
+ import * as i1 from 'ngx-logger';
5
+ import * as i3 from '@valtimo/components';
6
+ import { WidgetModule } from '@valtimo/components';
7
+ import * as i4 from '@angular/common';
8
+ import { CommonModule } from '@angular/common';
9
+ import * as i5 from '@angular/forms';
10
+ import { ReactiveFormsModule, FormsModule } from '@angular/forms';
11
+ import NavigatedViewer from 'bpmn-js/lib/NavigatedViewer';
12
+ import { from, take } from 'rxjs';
13
+ import * as i7 from '@ngx-translate/core';
14
+ import { TranslateModule } from '@ngx-translate/core';
15
+ import * as i1$2 from '@angular/router';
16
+ import { RouterModule } from '@angular/router';
17
+ import { AuthGuardService } from '@valtimo/security';
18
+ import { ROLE_ADMIN } from '@valtimo/shared';
19
+
20
+ /*
21
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
22
+ *
23
+ * Licensed under EUPL, Version 1.2 (the "License");
24
+ * you may not use this file except in compliance with the License.
25
+ * You may obtain a copy of the License at
26
+ *
27
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" basis,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+ class MigrationService {
36
+ constructor() { }
37
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MigrationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
38
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MigrationService, providedIn: 'root' }); }
39
+ }
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MigrationService, decorators: [{
41
+ type: Injectable,
42
+ args: [{
43
+ providedIn: 'root',
44
+ }]
45
+ }], ctorParameters: () => [] });
46
+
47
+ /*
48
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
49
+ *
50
+ * Licensed under EUPL, Version 1.2 (the "License");
51
+ * you may not use this file except in compliance with the License.
52
+ * You may obtain a copy of the License at
53
+ *
54
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
55
+ *
56
+ * Unless required by applicable law or agreed to in writing, software
57
+ * distributed under the License is distributed on an "AS IS" basis,
58
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
59
+ * See the License for the specific language governing permissions and
60
+ * limitations under the License.
61
+ */
62
+ class MigrationProcessDiagramComponent {
63
+ constructor(logger) {
64
+ this.logger = logger;
65
+ this.flowNodeMap = null;
66
+ this.loaded = new EventEmitter();
67
+ }
68
+ ngAfterViewInit() {
69
+ this.bpmnViewer = new NavigatedViewer();
70
+ this.bpmnViewer.attachTo(this.el.nativeElement);
71
+ this.bpmnViewer.on('import.done', ({ error }) => {
72
+ if (!error) {
73
+ const canvas = this.bpmnViewer.get('canvas');
74
+ canvas.zoom('fit-viewport', 'auto');
75
+ }
76
+ });
77
+ }
78
+ ngOnDestroy() {
79
+ if (this.bpmnViewer) {
80
+ this.bpmnViewer.destroy();
81
+ }
82
+ }
83
+ clear() {
84
+ this.bpmnViewer.clear();
85
+ }
86
+ loadXml(xml) {
87
+ this.bpmnViewer.attachTo(this.el.nativeElement);
88
+ from(this.bpmnViewer.importXML(xml))
89
+ .pipe(take(1))
90
+ .subscribe({
91
+ next: () => {
92
+ const processElements = this.bpmnViewer
93
+ .getDefinitions()
94
+ .rootElements.filter(function (element) {
95
+ return element.isExecutable;
96
+ });
97
+ this.flowNodeMap = processElements[0].flowElements.filter(function (element) {
98
+ if (element.name === null || element.name === '') {
99
+ element.name = element.id;
100
+ }
101
+ return element.$type !== 'bpmn:SequenceFlow';
102
+ });
103
+ this.loaded.emit(this.name);
104
+ },
105
+ error: error => {
106
+ this.logger.debug(error);
107
+ },
108
+ });
109
+ }
110
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MigrationProcessDiagramComponent, deps: [{ token: i1.NGXLogger }], target: i0.ɵɵFactoryTarget.Component }); }
111
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: MigrationProcessDiagramComponent, isStandalone: false, selector: "valtimo-migration-process-diagram", inputs: { name: "name" }, outputs: { loaded: "loaded" }, viewQueries: [{ propertyName: "el", first: true, predicate: ["ref"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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: [".diagram-container-switch-holder{width:100%;z-index:1000}.diagram-container{height:48vh}\n/*!\n * Copyright 2015-2025 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"] }); }
112
+ }
113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MigrationProcessDiagramComponent, decorators: [{
114
+ type: Component,
115
+ args: [{ standalone: false, selector: 'valtimo-migration-process-diagram', template: "<!--\n ~ Copyright 2015-2025 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: [".diagram-container-switch-holder{width:100%;z-index:1000}.diagram-container{height:48vh}\n/*!\n * Copyright 2015-2025 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"] }]
116
+ }], ctorParameters: () => [{ type: i1.NGXLogger }], propDecorators: { el: [{
117
+ type: ViewChild,
118
+ args: ['ref']
119
+ }], name: [{
120
+ type: Input
121
+ }], loaded: [{
122
+ type: Output
123
+ }] } });
124
+
125
+ /*
126
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
127
+ *
128
+ * Licensed under EUPL, Version 1.2 (the "License");
129
+ * you may not use this file except in compliance with the License.
130
+ * You may obtain a copy of the License at
131
+ *
132
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
133
+ *
134
+ * Unless required by applicable law or agreed to in writing, software
135
+ * distributed under the License is distributed on an "AS IS" basis,
136
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
137
+ * See the License for the specific language governing permissions and
138
+ * limitations under the License.
139
+ */
140
+ class MigrationComponent {
141
+ constructor(processService, logger, alertService) {
142
+ this.processService = processService;
143
+ this.logger = logger;
144
+ this.alertService = alertService;
145
+ this.processDefinitions = [];
146
+ this.selectedVersions = {
147
+ source: [],
148
+ target: [],
149
+ };
150
+ this.selectedId = {
151
+ source: null,
152
+ target: null,
153
+ };
154
+ this.loaded = {
155
+ source: false,
156
+ target: false,
157
+ };
158
+ this.fields = {
159
+ source: {
160
+ definition: null,
161
+ version: null,
162
+ },
163
+ target: {
164
+ definition: null,
165
+ version: null,
166
+ },
167
+ };
168
+ this.processCount = null;
169
+ this.uniqueFlowNodeMap = [];
170
+ this.taskMapping = {};
171
+ this.diagram = null;
172
+ }
173
+ ngAfterViewInit() {
174
+ this.diagram = {
175
+ source: this.sourceDiagram,
176
+ target: this.targetDiagram,
177
+ };
178
+ this.loadProcessDefinitions();
179
+ }
180
+ get taskMappingLength() {
181
+ return Object.keys(this.taskMapping).length;
182
+ }
183
+ loadProcessDefinitions() {
184
+ this.processService
185
+ .getProcessDefinitions()
186
+ .subscribe((processDefinitions) => {
187
+ this.processDefinitions = processDefinitions;
188
+ });
189
+ }
190
+ loadProcessDefinitionVersions(key, type) {
191
+ this.fields[type].definition = key;
192
+ this.selectedVersions[type] = [];
193
+ this.clearProcess(type);
194
+ if (key) {
195
+ this.processService
196
+ .getProcessDefinitionVersions(key)
197
+ .subscribe((processDefinitionVersions) => {
198
+ this.selectedVersions[type] = processDefinitionVersions;
199
+ });
200
+ }
201
+ }
202
+ loadProcess(id, type) {
203
+ this.fields[type].version = id;
204
+ this.clearProcess(type);
205
+ if (id) {
206
+ this.loadProcessDefinitionXML(id, type);
207
+ if (type === 'source') {
208
+ this.loadProcessCount(id);
209
+ }
210
+ }
211
+ }
212
+ clearProcess(type) {
213
+ this.loaded[type] = false;
214
+ this.selectedId[type] = null;
215
+ this.diagram[type].clear();
216
+ if (type === 'source') {
217
+ this.processCount = null;
218
+ }
219
+ }
220
+ loadProcessDefinitionXML(id, type) {
221
+ this.processService.getProcessDefinitionXml(id).subscribe(xml => {
222
+ if (!xml.bpmn20Xml)
223
+ return;
224
+ this.diagram[type].loadXml(xml['bpmn20Xml']);
225
+ this.selectedId[type] = id;
226
+ });
227
+ }
228
+ loadProcessCount(id) {
229
+ this.processService.getProcessCount(id).subscribe(response => {
230
+ this.processCount = response.count;
231
+ });
232
+ }
233
+ setUniqueFlowNodeMap() {
234
+ this.uniqueFlowNodeMap = [];
235
+ const sourceFlowNodeMap = this.sourceDiagram.flowNodeMap;
236
+ const targetFlowNodeMap = this.targetDiagram.flowNodeMap;
237
+ if (sourceFlowNodeMap != null && targetFlowNodeMap != null) {
238
+ this.uniqueFlowNodeMap = sourceFlowNodeMap.filter(sourceFlowNode => !targetFlowNodeMap.some(targetFlowNode => sourceFlowNode.id === targetFlowNode.id &&
239
+ sourceFlowNode.$type === targetFlowNode.$type));
240
+ }
241
+ }
242
+ getFilteredTargetFlowNodeMap(flowNodeType) {
243
+ const targetFlowNodeMap = this.targetDiagram.flowNodeMap;
244
+ return targetFlowNodeMap.filter(function (flowNode) {
245
+ return flowNode.$type === flowNodeType;
246
+ });
247
+ }
248
+ diagramLoaded(diagramName) {
249
+ this.loaded[diagramName] = true;
250
+ if (this.loaded.source && this.loaded.target) {
251
+ this.taskMapping = {};
252
+ this.setUniqueFlowNodeMap();
253
+ }
254
+ }
255
+ migrateProcess() {
256
+ this.processService
257
+ .migrateProcess(this.selectedId.source, this.selectedId.target, this.taskMapping)
258
+ .subscribe(res => {
259
+ this.alertService.success('Process successfully migrated!');
260
+ this.clearProcess('source');
261
+ this.clearProcess('target');
262
+ this.fields = {
263
+ source: {
264
+ definition: null,
265
+ version: null,
266
+ },
267
+ target: {
268
+ definition: null,
269
+ version: null,
270
+ },
271
+ };
272
+ }, err => {
273
+ this.alertService.error('Process migration failed!');
274
+ this.logger.debug(err);
275
+ });
276
+ }
277
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MigrationComponent, deps: [{ token: i1$1.ProcessService }, { token: i1.NGXLogger }, { token: i3.AlertService }], target: i0.ɵɵFactoryTarget.Component }); }
278
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: MigrationComponent, isStandalone: false, selector: "valtimo-migration", viewQueries: [{ propertyName: "sourceDiagram", first: true, predicate: ["sourceDiagram"], descendants: true }, { propertyName: "targetDiagram", first: true, predicate: ["targetDiagram"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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-2025 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"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i5.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MigrationProcessDiagramComponent, selector: "valtimo-migration-process-diagram", inputs: ["name"], outputs: ["loaded"] }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] }); }
279
+ }
280
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MigrationComponent, decorators: [{
281
+ type: Component,
282
+ args: [{ standalone: false, selector: 'valtimo-migration', template: "<!--\n ~ Copyright 2015-2025 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-2025 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"] }]
283
+ }], ctorParameters: () => [{ type: i1$1.ProcessService }, { type: i1.NGXLogger }, { type: i3.AlertService }], propDecorators: { sourceDiagram: [{
284
+ type: ViewChild,
285
+ args: ['sourceDiagram']
286
+ }], targetDiagram: [{
287
+ type: ViewChild,
288
+ args: ['targetDiagram']
289
+ }] } });
290
+
291
+ /*
292
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
293
+ *
294
+ * Licensed under EUPL, Version 1.2 (the "License");
295
+ * you may not use this file except in compliance with the License.
296
+ * You may obtain a copy of the License at
297
+ *
298
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
299
+ *
300
+ * Unless required by applicable law or agreed to in writing, software
301
+ * distributed under the License is distributed on an "AS IS" basis,
302
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
303
+ * See the License for the specific language governing permissions and
304
+ * limitations under the License.
305
+ */
306
+ const routes = [
307
+ {
308
+ path: 'process-migration',
309
+ component: MigrationComponent,
310
+ canActivate: [AuthGuardService],
311
+ data: { title: 'Process migration', roles: [ROLE_ADMIN] },
312
+ },
313
+ ];
314
+ class MigrationRoutingModule {
315
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MigrationRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
316
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: MigrationRoutingModule, imports: [CommonModule, i1$2.RouterModule], exports: [RouterModule] }); }
317
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MigrationRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] }); }
318
+ }
319
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MigrationRoutingModule, decorators: [{
320
+ type: NgModule,
321
+ args: [{
322
+ imports: [CommonModule, RouterModule.forChild(routes)],
323
+ exports: [RouterModule],
324
+ }]
325
+ }] });
326
+
327
+ /*
328
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
329
+ *
330
+ * Licensed under EUPL, Version 1.2 (the "License");
331
+ * you may not use this file except in compliance with the License.
332
+ * You may obtain a copy of the License at
333
+ *
334
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
335
+ *
336
+ * Unless required by applicable law or agreed to in writing, software
337
+ * distributed under the License is distributed on an "AS IS" basis,
338
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
339
+ * See the License for the specific language governing permissions and
340
+ * limitations under the License.
341
+ */
342
+ class MigrationModule {
343
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MigrationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
344
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: MigrationModule, declarations: [MigrationComponent, MigrationProcessDiagramComponent], imports: [CommonModule,
345
+ MigrationRoutingModule,
346
+ ReactiveFormsModule,
347
+ WidgetModule,
348
+ FormsModule,
349
+ TranslateModule], exports: [MigrationComponent] }); }
350
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MigrationModule, imports: [CommonModule,
351
+ MigrationRoutingModule,
352
+ ReactiveFormsModule,
353
+ WidgetModule,
354
+ FormsModule,
355
+ TranslateModule] }); }
356
+ }
357
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MigrationModule, decorators: [{
358
+ type: NgModule,
359
+ args: [{
360
+ declarations: [MigrationComponent, MigrationProcessDiagramComponent],
361
+ imports: [
362
+ CommonModule,
363
+ MigrationRoutingModule,
364
+ ReactiveFormsModule,
365
+ WidgetModule,
366
+ FormsModule,
367
+ TranslateModule,
368
+ ],
369
+ exports: [MigrationComponent],
370
+ }]
371
+ }] });
372
+
373
+ /*
374
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
375
+ *
376
+ * Licensed under EUPL, Version 1.2 (the "License");
377
+ * you may not use this file except in compliance with the License.
378
+ * You may obtain a copy of the License at
379
+ *
380
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
381
+ *
382
+ * Unless required by applicable law or agreed to in writing, software
383
+ * distributed under the License is distributed on an "AS IS" basis,
384
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
385
+ * See the License for the specific language governing permissions and
386
+ * limitations under the License.
387
+ */
388
+ /*
389
+ * Public API Surface of migration
390
+ */
391
+
392
+ /**
393
+ * Generated bundle index. Do not edit.
394
+ */
395
+
396
+ export { MigrationComponent, MigrationModule, MigrationService };
397
+ //# sourceMappingURL=valtimo-migration.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valtimo-migration.mjs","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-process-diagram/migration-process-diagram.component.html","../../../../projects/valtimo/migration/src/lib/migration.component.ts","../../../../projects/valtimo/migration/src/lib/migration.component.html","../../../../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-2025 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-2025 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 AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n ViewChild,\n} from '@angular/core';\n\nimport NavigatedViewer from 'bpmn-js/lib/NavigatedViewer';\nimport {NGXLogger} from 'ngx-logger';\nimport {from, take} from 'rxjs';\n\n@Component({\n standalone: false,\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 AfterViewInit, OnDestroy {\n private bpmnViewer: NavigatedViewer;\n public flowNodeMap: any = null;\n\n @ViewChild('ref') public readonly el: ElementRef;\n @Input() public readonly name: string;\n @Output() public readonly loaded = new EventEmitter();\n\n constructor(private readonly logger: NGXLogger) {}\n\n public ngAfterViewInit(): void {\n this.bpmnViewer = new NavigatedViewer();\n this.bpmnViewer.attachTo(this.el.nativeElement);\n this.bpmnViewer.on('import.done', ({error}: any) => {\n if (!error) {\n const canvas = this.bpmnViewer.get('canvas') as any;\n canvas.zoom('fit-viewport', 'auto');\n }\n });\n }\n\n public ngOnDestroy(): void {\n if (this.bpmnViewer) {\n this.bpmnViewer.destroy();\n }\n }\n\n public clear(): void {\n this.bpmnViewer.clear();\n }\n\n public loadXml(xml: string): void {\n this.bpmnViewer.attachTo(this.el.nativeElement);\n\n from(this.bpmnViewer.importXML(xml))\n .pipe(take(1))\n .subscribe({\n next: () => {\n const processElements = this.bpmnViewer\n .getDefinitions()\n .rootElements.filter(function (element) {\n return element.isExecutable;\n });\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\n this.loaded.emit(this.name);\n },\n error: error => {\n this.logger.debug(error);\n },\n });\n }\n}\n","<!--\n ~ Copyright 2015-2025 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","/*\n * Copyright 2015-2025 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, ViewChild} from '@angular/core';\nimport {ProcessDefinition, ProcessService} from '@valtimo/process';\nimport {MigrationProcessDiagramComponent} from './migration-process-diagram/migration-process-diagram.component';\nimport {NGXLogger} from 'ngx-logger';\nimport {AlertService} from '@valtimo/components';\n\n@Component({\n standalone: false,\n selector: 'valtimo-migration',\n templateUrl: './migration.component.html',\n styleUrls: ['./migration.component.scss'],\n})\nexport class MigrationComponent implements AfterViewInit, 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 ngAfterViewInit() {\n this.diagram = {\n source: this.sourceDiagram,\n target: this.targetDiagram,\n };\n this.loadProcessDefinitions();\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 if (!xml.bpmn20Xml) return;\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-2025 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","/*\n * Copyright 2015-2025 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/shared';\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-2025 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-2025 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"],"names":["i1","i2","i6.MigrationProcessDiagramComponent"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;MAOU,gBAAgB,CAAA;AAC3B,IAAA,WAAA,GAAA;+G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,sBAAsB;YACtB,mBAAmB;YACnB,YAAY;YACZ,WAAW;AACX,YAAA,eAAe,aAEP,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAEjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YATxB,YAAY;YACZ,sBAAsB;YACtB,mBAAmB;YACnB,YAAY;YACZ,WAAW;YACX,eAAe,CAAA,EAAA,CAAA,CAAA;;4FAIN,eAAe,EAAA,UAAA,EAAA,CAAA;kBAZ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,gCAAgC,CAAC;AACpE,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,sBAAsB;wBACtB,mBAAmB;wBACnB,YAAY;wBACZ,WAAW;wBACX,eAAe;AAChB,qBAAA;oBACD,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAC9B,iBAAA;;;ACpCD;;;;;;;;;;;;;;AAcG;AAEH;;AAEG;;AClBH;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@valtimo/migration" />
5
+ export * from './public-api';
6
+ //# sourceMappingURL=valtimo-migration.d.ts.map
@@ -0,0 +1,19 @@
1
+ import { AfterViewInit, ElementRef, EventEmitter, OnDestroy } from '@angular/core';
2
+ import { NGXLogger } from 'ngx-logger';
3
+ import * as i0 from "@angular/core";
4
+ export declare class MigrationProcessDiagramComponent implements AfterViewInit, OnDestroy {
5
+ private readonly logger;
6
+ private bpmnViewer;
7
+ flowNodeMap: any;
8
+ readonly el: ElementRef;
9
+ readonly name: string;
10
+ readonly loaded: EventEmitter<any>;
11
+ constructor(logger: NGXLogger);
12
+ ngAfterViewInit(): void;
13
+ ngOnDestroy(): void;
14
+ clear(): void;
15
+ loadXml(xml: string): void;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<MigrationProcessDiagramComponent, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<MigrationProcessDiagramComponent, "valtimo-migration-process-diagram", never, { "name": { "alias": "name"; "required": false; }; }, { "loaded": "loaded"; }, never, never, false, never>;
18
+ }
19
+ //# sourceMappingURL=migration-process-diagram.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-process-diagram.component.d.ts","sourceRoot":"","sources":["../../../../../projects/valtimo/migration/src/lib/migration-process-diagram/migration-process-diagram.component.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,aAAa,EAEb,UAAU,EACV,YAAY,EAEZ,SAAS,EAGV,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;;AAGrC,qBAMa,gCAAiC,YAAW,aAAa,EAAE,SAAS;IAQnE,OAAO,CAAC,QAAQ,CAAC,MAAM;IAPnC,OAAO,CAAC,UAAU,CAAkB;IAC7B,WAAW,EAAE,GAAG,CAAQ;IAE/B,SAAkC,EAAE,EAAE,UAAU,CAAC;IACjD,SAAyB,IAAI,EAAE,MAAM,CAAC;IACtC,SAA0B,MAAM,oBAAsB;gBAEzB,MAAM,EAAE,SAAS;IAEvC,eAAe,IAAI,IAAI;IAWvB,WAAW,IAAI,IAAI;IAMnB,KAAK,IAAI,IAAI;IAIb,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;yCA/BtB,gCAAgC;2CAAhC,gCAAgC;CA0D5C"}
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@angular/common";
3
+ import * as i2 from "@angular/router";
4
+ export declare class MigrationRoutingModule {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<MigrationRoutingModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MigrationRoutingModule, never, [typeof i1.CommonModule, typeof i2.RouterModule], [typeof i2.RouterModule]>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<MigrationRoutingModule>;
8
+ }
9
+ //# sourceMappingURL=migration-routing.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-routing.module.d.ts","sourceRoot":"","sources":["../../../../projects/valtimo/migration/src/lib/migration-routing.module.ts"],"names":[],"mappings":";;;AAgCA,qBAIa,sBAAsB;yCAAtB,sBAAsB;0CAAtB,sBAAsB;0CAAtB,sBAAsB;CAAG"}
@@ -0,0 +1,56 @@
1
+ import { AfterViewInit } from '@angular/core';
2
+ import { ProcessDefinition, ProcessService } from '@valtimo/process';
3
+ import { MigrationProcessDiagramComponent } from './migration-process-diagram/migration-process-diagram.component';
4
+ import { NGXLogger } from 'ngx-logger';
5
+ import { AlertService } from '@valtimo/components';
6
+ import * as i0 from "@angular/core";
7
+ export declare class MigrationComponent implements AfterViewInit, AfterViewInit {
8
+ private processService;
9
+ private logger;
10
+ private alertService;
11
+ processDefinitions: ProcessDefinition[];
12
+ selectedVersions: {
13
+ source: any[];
14
+ target: any[];
15
+ };
16
+ selectedId: {
17
+ source: any;
18
+ target: any;
19
+ };
20
+ loaded: {
21
+ source: boolean;
22
+ target: boolean;
23
+ };
24
+ fields: {
25
+ source: {
26
+ definition: any;
27
+ version: any;
28
+ };
29
+ target: {
30
+ definition: any;
31
+ version: any;
32
+ };
33
+ };
34
+ processCount: number | null;
35
+ uniqueFlowNodeMap: any[];
36
+ taskMapping: any;
37
+ sourceDiagram: MigrationProcessDiagramComponent;
38
+ targetDiagram: MigrationProcessDiagramComponent;
39
+ diagram: any;
40
+ constructor(processService: ProcessService, logger: NGXLogger, alertService: AlertService);
41
+ ngAfterViewInit(): void;
42
+ get taskMappingLength(): number;
43
+ loadProcessDefinitions(): void;
44
+ loadProcessDefinitionVersions(key: string | null, type: string): void;
45
+ loadProcess(id: string | null, type: string): void;
46
+ private clearProcess;
47
+ loadProcessDefinitionXML(id: string, type: string): void;
48
+ loadProcessCount(id: string): void;
49
+ setUniqueFlowNodeMap(): void;
50
+ getFilteredTargetFlowNodeMap(flowNodeType: any): any;
51
+ diagramLoaded(diagramName: string): void;
52
+ migrateProcess(): void;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<MigrationComponent, never>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<MigrationComponent, "valtimo-migration", never, {}, {}, never, never, false, never>;
55
+ }
56
+ //# sourceMappingURL=migration.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration.component.d.ts","sourceRoot":"","sources":["../../../../projects/valtimo/migration/src/lib/migration.component.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAC,aAAa,EAAuB,MAAM,eAAe,CAAC;AAClE,OAAO,EAAC,iBAAiB,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAC,gCAAgC,EAAC,MAAM,iEAAiE,CAAC;AACjH,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,YAAY,EAAC,MAAM,qBAAqB,CAAC;;AAEjD,qBAMa,kBAAmB,YAAW,aAAa,EAAE,aAAa;IAmCnE,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,YAAY;IApCf,kBAAkB,EAAE,iBAAiB,EAAE,CAAM;IAC7C,gBAAgB;;;MAGrB;IACK,UAAU;;;MAGf;IACK,MAAM;;;MAGX;IACK,MAAM;;;;;;;;;MASX;IAEK,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;IACnC,iBAAiB,EAAE,GAAG,EAAE,CAAM;IAC9B,WAAW,EAAE,GAAG,CAAM;IAED,aAAa,EAAE,gCAAgC,CAAC;IAChD,aAAa,EAAE,gCAAgC,CAAC;IAErE,OAAO,EAAE,GAAG,CAAQ;gBAGjB,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,SAAS,EACjB,YAAY,EAAE,YAAY;IAGpC,eAAe;IAQf,IAAW,iBAAiB,WAE3B;IAED,sBAAsB;IAQtB,6BAA6B,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM;IAa9D,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM;IAW3C,OAAO,CAAC,YAAY;IASpB,wBAAwB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAQjD,gBAAgB,CAAC,EAAE,EAAE,MAAM;IAM3B,oBAAoB;IAiBpB,4BAA4B,CAAC,YAAY,KAAA;IAOzC,aAAa,CAAC,WAAW,EAAE,MAAM;IAQjC,cAAc;yCA3IH,kBAAkB;2CAAlB,kBAAkB;CAoK9B"}
@@ -0,0 +1,14 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./migration.component";
3
+ import * as i2 from "./migration-process-diagram/migration-process-diagram.component";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "./migration-routing.module";
6
+ import * as i5 from "@angular/forms";
7
+ import * as i6 from "@valtimo/components";
8
+ import * as i7 from "@ngx-translate/core";
9
+ export declare class MigrationModule {
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<MigrationModule, never>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MigrationModule, [typeof i1.MigrationComponent, typeof i2.MigrationProcessDiagramComponent], [typeof i3.CommonModule, typeof i4.MigrationRoutingModule, typeof i5.ReactiveFormsModule, typeof i6.WidgetModule, typeof i5.FormsModule, typeof i7.TranslateModule], [typeof i1.MigrationComponent]>;
12
+ static ɵinj: i0.ɵɵInjectorDeclaration<MigrationModule>;
13
+ }
14
+ //# sourceMappingURL=migration.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration.module.d.ts","sourceRoot":"","sources":["../../../../projects/valtimo/migration/src/lib/migration.module.ts"],"names":[],"mappings":";;;;;;;;AAyBA,qBAYa,eAAe;yCAAf,eAAe;0CAAf,eAAe;0CAAf,eAAe;CAAG"}
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class MigrationService {
3
+ constructor();
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<MigrationService, never>;
5
+ static ɵprov: i0.ɵɵInjectableDeclaration<MigrationService>;
6
+ }
7
+ //# sourceMappingURL=migration.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration.service.d.ts","sourceRoot":"","sources":["../../../../projects/valtimo/migration/src/lib/migration.service.ts"],"names":[],"mappings":";AAkBA,qBAGa,gBAAgB;;yCAAhB,gBAAgB;6CAAhB,gBAAgB;CAE5B"}
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@valtimo/migration",
3
+ "license": "EUPL-1.2",
4
+ "version": "0.0.0",
5
+ "peerDependencies": {
6
+ "@angular/common": "^19.2.8",
7
+ "@angular/core": "^19.2.8"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "2.8.1",
11
+ "bpmn-js": "18.6.1"
12
+ },
13
+ "module": "fesm2022/valtimo-migration.mjs",
14
+ "typings": "index.d.ts",
15
+ "exports": {
16
+ "./package.json": {
17
+ "default": "./package.json"
18
+ },
19
+ ".": {
20
+ "types": "./index.d.ts",
21
+ "default": "./fesm2022/valtimo-migration.mjs"
22
+ }
23
+ },
24
+ "sideEffects": false
25
+ }
@@ -0,0 +1,4 @@
1
+ export * from './lib/migration.service';
2
+ export * from './lib/migration.component';
3
+ export * from './lib/migration.module';
4
+ //# sourceMappingURL=public-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../../projects/valtimo/migration/src/public-api.ts"],"names":[],"mappings":"AAoBA,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valtimo-migration.d.ts","sourceRoot":"","sources":["../../../projects/valtimo/migration/src/valtimo-migration.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}