@valtimo/process-management 4.15.2-next-main.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/bundles/valtimo-process-management.umd.js +776 -0
- package/bundles/valtimo-process-management.umd.js.map +1 -0
- package/bundles/valtimo-process-management.umd.min.js +2 -0
- package/bundles/valtimo-process-management.umd.min.js.map +1 -0
- package/esm2015/lib/process-management-builder/process-management-builder.component.js +165 -0
- package/esm2015/lib/process-management-list/process-management-list.component.js +52 -0
- package/esm2015/lib/process-management-routing.js +57 -0
- package/esm2015/lib/process-management-upload/process-management-upload.component.js +59 -0
- package/esm2015/lib/process-management.component.js +35 -0
- package/esm2015/lib/process-management.module.js +47 -0
- package/esm2015/lib/process-management.service.js +46 -0
- package/esm2015/public-api.js +21 -0
- package/esm2015/valtimo-process-management.js +10 -0
- package/fesm2015/valtimo-process-management.js +458 -0
- package/fesm2015/valtimo-process-management.js.map +1 -0
- package/lib/process-management-builder/process-management-builder.component.d.ts +34 -0
- package/lib/process-management-list/process-management-list.component.d.ts +17 -0
- package/lib/process-management-routing.d.ts +2 -0
- package/lib/process-management-upload/process-management-upload.component.d.ts +14 -0
- package/lib/process-management.component.d.ts +7 -0
- package/lib/process-management.module.d.ts +2 -0
- package/lib/process-management.service.d.ts +10 -0
- package/package.json +24 -0
- package/public-api.d.ts +2 -0
- package/valtimo-process-management.d.ts +9 -0
- package/valtimo-process-management.metadata.json +1 -0
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
import { Component, ViewChild, ViewEncapsulation, NgModule, ɵɵdefineInjectable, ɵɵinject, Injectable, EventEmitter, Output } from '@angular/core';
|
|
2
|
+
import { ProcessService } from '@valtimo/process';
|
|
3
|
+
import { Router, ActivatedRoute, RouterModule } from '@angular/router';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import { AuthGuardService } from '@valtimo/security';
|
|
6
|
+
import { HttpClient } from '@angular/common/http';
|
|
7
|
+
import { AlertService, WidgetModule, ListModule } from '@valtimo/components';
|
|
8
|
+
import { forkJoin } from 'rxjs';
|
|
9
|
+
import { LayoutService } from '@valtimo/layout';
|
|
10
|
+
import Modeler from 'bpmn-js/lib/Modeler';
|
|
11
|
+
import PropertiesPanelModule from 'bpmn-js-properties-panel';
|
|
12
|
+
import PropertiesProviderModule from 'bpmn-js-properties-panel/lib/provider/camunda';
|
|
13
|
+
import CamundaExtensionModule from 'camunda-bpmn-moddle/lib';
|
|
14
|
+
import CamundaModdleDescriptor from 'camunda-bpmn-moddle/resources/camunda.json';
|
|
15
|
+
import { ROLE_ADMIN } from '@valtimo/contract';
|
|
16
|
+
import { FormsModule } from '@angular/forms';
|
|
17
|
+
import { ConfigService } from '@valtimo/config';
|
|
18
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
19
|
+
|
|
20
|
+
/*
|
|
21
|
+
* Copyright 2015-2020 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 ProcessManagementListComponent {
|
|
36
|
+
constructor(processService, router) {
|
|
37
|
+
this.processService = processService;
|
|
38
|
+
this.router = router;
|
|
39
|
+
this.processDefinitions = [];
|
|
40
|
+
this.fields = [
|
|
41
|
+
{ key: 'key', label: 'Key' },
|
|
42
|
+
{ key: 'name', label: 'Name' },
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
ngOnInit() {
|
|
46
|
+
this.loadProcessDefinitions();
|
|
47
|
+
}
|
|
48
|
+
loadProcessDefinitions() {
|
|
49
|
+
this.processService.getProcessDefinitions().subscribe((processDefs) => {
|
|
50
|
+
this.processDefinitions = processDefs;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
editProcessDefinition(processDefinition) {
|
|
54
|
+
this.router.navigate(['/processes/process', processDefinition.key]);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
ProcessManagementListComponent.decorators = [
|
|
58
|
+
{ type: Component, args: [{
|
|
59
|
+
selector: 'valtimo-process-management-list',
|
|
60
|
+
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<valtimo-widget>\n <valtimo-list [items]=\"processDefinitions\" [fields]=\"fields\" (rowClicked)=\"editProcessDefinition($event)\"\n [header]=\"true\" [viewMode]=\"true\" [isSearchable]=\"true\">\n <div header>\n <h3 class=\"list-header-title\">{{ 'Processes' | translate }}</h3>\n <h5 class=\"list-header-description\">{{ 'Overview of all Processes' | translate }}</h5>\n </div>\n </valtimo-list>\n</valtimo-widget>\n",
|
|
61
|
+
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 */"]
|
|
62
|
+
},] }
|
|
63
|
+
];
|
|
64
|
+
ProcessManagementListComponent.ctorParameters = () => [
|
|
65
|
+
{ type: ProcessService },
|
|
66
|
+
{ type: Router }
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
/*
|
|
70
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
71
|
+
*
|
|
72
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
73
|
+
* you may not use this file except in compliance with the License.
|
|
74
|
+
* You may obtain a copy of the License at
|
|
75
|
+
*
|
|
76
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
77
|
+
*
|
|
78
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
79
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
80
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
81
|
+
* See the License for the specific language governing permissions and
|
|
82
|
+
* limitations under the License.
|
|
83
|
+
*/
|
|
84
|
+
class ProcessManagementComponent {
|
|
85
|
+
constructor() {
|
|
86
|
+
}
|
|
87
|
+
ngOnInit() {
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
ProcessManagementComponent.decorators = [
|
|
91
|
+
{ type: Component, args: [{
|
|
92
|
+
selector: 'valtimo-process-management',
|
|
93
|
+
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 pt-0\">\n <div class=\"container-fluid\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3\">\n <button class=\"btn btn-primary btn-space\" [routerLink]=\"'create'\"><i class=\"icon mdi mdi-plus\"></i> \n {{ 'Create new Process' | translate }}\n </button>\n <button class=\"btn btn-secondary btn-space mr-0\" data-toggle=\"modal\" data-target=\"#uploadProcess\">\n <i class=\"icon mdi mdi-upload\"></i> \n {{ 'Upload process' | translate }}\n </button>\n </div>\n </div>\n <valtimo-process-management-upload\n (reload)=\"processManagementList.loadProcessDefinitions()\"></valtimo-process-management-upload>\n <valtimo-process-management-list #processManagementList></valtimo-process-management-list>\n </div>\n</div>\n\n",
|
|
94
|
+
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 */"]
|
|
95
|
+
},] }
|
|
96
|
+
];
|
|
97
|
+
ProcessManagementComponent.ctorParameters = () => [];
|
|
98
|
+
ProcessManagementComponent.propDecorators = {
|
|
99
|
+
processManagementList: [{ type: ViewChild, args: ['processManagementList',] }]
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/*
|
|
103
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
104
|
+
*
|
|
105
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
106
|
+
* you may not use this file except in compliance with the License.
|
|
107
|
+
* You may obtain a copy of the License at
|
|
108
|
+
*
|
|
109
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
110
|
+
*
|
|
111
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
112
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
113
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
114
|
+
* See the License for the specific language governing permissions and
|
|
115
|
+
* limitations under the License.
|
|
116
|
+
*/
|
|
117
|
+
class ProcessManagementBuilderComponent {
|
|
118
|
+
constructor(http, processService, layoutService, alertService, route, router) {
|
|
119
|
+
this.http = http;
|
|
120
|
+
this.processService = processService;
|
|
121
|
+
this.layoutService = layoutService;
|
|
122
|
+
this.alertService = alertService;
|
|
123
|
+
this.route = route;
|
|
124
|
+
this.router = router;
|
|
125
|
+
this.processDefinitionVersions = null;
|
|
126
|
+
this.selectedVersion = null;
|
|
127
|
+
this.processKey = null;
|
|
128
|
+
this.elementTemplateFiles = [
|
|
129
|
+
'mailSendTask'
|
|
130
|
+
];
|
|
131
|
+
}
|
|
132
|
+
ngOnInit() {
|
|
133
|
+
this.init();
|
|
134
|
+
}
|
|
135
|
+
init() {
|
|
136
|
+
this.processKey = this.route.snapshot.paramMap.get('key');
|
|
137
|
+
forkJoin(this.getElementTemplates()).subscribe((elementTemplates) => {
|
|
138
|
+
this.bpmnModeler = new Modeler({
|
|
139
|
+
container: '#canvas',
|
|
140
|
+
height: '90vh',
|
|
141
|
+
additionalModules: [
|
|
142
|
+
PropertiesPanelModule,
|
|
143
|
+
PropertiesProviderModule,
|
|
144
|
+
CamundaExtensionModule
|
|
145
|
+
],
|
|
146
|
+
propertiesPanel: {
|
|
147
|
+
parent: '#properties'
|
|
148
|
+
},
|
|
149
|
+
moddleExtensions: {
|
|
150
|
+
camunda: CamundaModdleDescriptor
|
|
151
|
+
},
|
|
152
|
+
elementTemplates: elementTemplates
|
|
153
|
+
});
|
|
154
|
+
if (this.processKey) {
|
|
155
|
+
this.loadProcessVersions(this.processKey);
|
|
156
|
+
this.selectedVersion = null;
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
this.loadEmptyBpmn();
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
deploy() {
|
|
164
|
+
this.bpmnModeler.saveXML((err, xml) => {
|
|
165
|
+
this.processService.deployProcess(xml).subscribe((asd) => {
|
|
166
|
+
if (this.processKey) {
|
|
167
|
+
this.loadProcessVersions(this.processKey);
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
this.router.navigate(['/processes']);
|
|
171
|
+
}
|
|
172
|
+
this.alertService.success('Deployment successful');
|
|
173
|
+
this.selectedVersion = null;
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
reset() {
|
|
178
|
+
this.bpmnModeler.destroy();
|
|
179
|
+
this.init();
|
|
180
|
+
}
|
|
181
|
+
download() {
|
|
182
|
+
this.bpmnModeler.saveXML((err, xml) => {
|
|
183
|
+
const file = new Blob([xml], { type: 'text/xml' });
|
|
184
|
+
const link = document.createElement('a');
|
|
185
|
+
link.download = 'diagram.bpmn';
|
|
186
|
+
link.href = window.URL.createObjectURL(file);
|
|
187
|
+
link.click();
|
|
188
|
+
window.URL.revokeObjectURL(link.href);
|
|
189
|
+
link.remove();
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
loadEmptyBpmn() {
|
|
193
|
+
const url = '/assets/bpmn/initial.bpmn';
|
|
194
|
+
this.http.get(url, {
|
|
195
|
+
headers: { observe: 'response' }, responseType: 'text'
|
|
196
|
+
}).subscribe((xml) => {
|
|
197
|
+
this.bpmnModeler.importXML(xml);
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
getElementTemplates() {
|
|
201
|
+
const templateObs = [];
|
|
202
|
+
for (const file of this.elementTemplateFiles) {
|
|
203
|
+
templateObs.push(this.http.get(`/assets/bpmn/element-templates/${file}.json`, {
|
|
204
|
+
headers: { observe: 'response' },
|
|
205
|
+
responseType: 'json'
|
|
206
|
+
}));
|
|
207
|
+
}
|
|
208
|
+
return templateObs;
|
|
209
|
+
}
|
|
210
|
+
setLatestVersion() {
|
|
211
|
+
this.selectedVersion = this.processDefinitionVersions.reduce((acc, version) => version.version > acc.version ? version : acc);
|
|
212
|
+
this.loadProcessBpmn();
|
|
213
|
+
}
|
|
214
|
+
loadProcessVersions(processDefinitionKey) {
|
|
215
|
+
this.processService.getProcessDefinitionVersions(processDefinitionKey).subscribe((processDefinitionVersions) => {
|
|
216
|
+
this.processDefinitionVersions = processDefinitionVersions;
|
|
217
|
+
this.setLatestVersion();
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
compareProcessDefinitions(pd1, pd2) {
|
|
221
|
+
if (pd1 === null && pd2 === null) {
|
|
222
|
+
return true;
|
|
223
|
+
}
|
|
224
|
+
if (pd1 === null || pd2 === null) {
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
return pd1.id === pd2.id;
|
|
228
|
+
}
|
|
229
|
+
loadProcessBpmn() {
|
|
230
|
+
this.processService.getProcessDefinitionXml(this.selectedVersion.id).subscribe(xml => {
|
|
231
|
+
this.bpmnModeler.importXML(xml['bpmn20Xml']);
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
ngOnDestroy() {
|
|
235
|
+
this.bpmnModeler.destroy();
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
ProcessManagementBuilderComponent.decorators = [
|
|
239
|
+
{ type: Component, args: [{
|
|
240
|
+
selector: 'valtimo-process-management-builder',
|
|
241
|
+
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=\"mb-5\" [ngClass]=\"{'main-content pt-0': !layoutService.isFullscreen}\">\n <div [ngClass]=\"{'container-fluid' : !layoutService.isFullscreen}\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3\" *ngIf=\"(selectedVersion !== null || processKey === null) && !layoutService.isFullscreen\">\n <button class='btn btn-primary btn-space' (click)=\"deploy()\"><i class=\"fa fa-upload\"></i> Deploy</button>\n <button class='btn btn-secondary btn-space' (click)=\"download()\" [ngClass]=\"{'mr-0': selectedVersion !== null}\"><i\n class=\"fa fa-save\"></i> Download\n </button>\n <button *ngIf=\"selectedVersion === null\" class='btn btn-danger btn-space mr-0' (click)=\"reset()\"><i\n class=\"fa fa-trash\"></i> Clear\n </button>\n </div>\n </div>\n\n <div class=\"modeler pl-3 pr-3 mb-3\" [ngClass]=\"{'mt-4' : !layoutService.isFullscreen}\">\n <div class=\"row pt-4 pb-3 bg-light versions\" *ngIf=\"processDefinitionVersions\"\n [ngClass]=\"{'border-bottom-0': selectedVersion !== null}\">\n <div class=\"col-md-2\" *ngIf=\"processDefinitionVersions.length > 0\">\n <h2 class=\"process-title\">\n {{processDefinitionVersions[0].name}}\n </h2>\n </div>\n <div class=\"col-md-1 offset-md-6\">\n <label for=\"processVersion\"><strong>Version</strong></label>\n <select id=\"processVersion\" class=\"form-control w-100\" [(ngModel)]=\"selectedVersion\"\n (change)=\"loadProcessBpmn()\" [compareWith]=\"compareProcessDefinitions\">\n <option [ngValue]=\"null\" disabled selected>Version</option>\n <option *ngFor=\"let processDefinition of processDefinitionVersions\"\n [ngValue]=\"processDefinition\">{{processDefinition.version}}</option>\n </select>\n </div>\n <div class=\"col-md-2 d-flex align-items-end\"\n *ngIf=\"(selectedVersion !== null || processKey === null) && layoutService.isFullscreen\">\n <div class=\"btn-group\">\n <button class='btn btn-primary btn-space' (click)=\"deploy()\"><i class=\"fa fa-upload\"></i> Deploy\n </button>\n <button class='btn btn-secondary btn-space' (click)=\"download()\"><i\n class=\"fa fa-save\"></i> Download\n </button>\n <button *ngIf=\"!selectedVersion\" class='btn btn-danger btn-space' (click)=\"reset()\"><i\n class=\"fa fa-trash\"></i> Clear\n </button>\n </div>\n </div>\n <div *ngIf=\"selectedVersion\" class=\"col-md-1 text-right fullscreen-toggle\"\n [ngClass]=\"{'offset-md-2' : !layoutService.isFullscreen}\">\n <i class=\"fas\"\n [ngClass]=\"{'fa-expand-arrows-alt' : !layoutService.isFullscreen, 'fa-compress-arrows-alt' : layoutService.isFullscreen}\"\n (click)=\"layoutService.toggleFullscreen()\"></i>\n </div>\n </div>\n <div [hidden]=\"!selectedVersion && processKey\" class=\"row bg-white diagram mb-3\">\n <div id=\"canvas\" class=\"col-9\"></div>\n <div id=\"properties\" class=\"col-3 pr-0\"></div>\n </div>\n </div>\n </div>\n</div>\n",
|
|
242
|
+
encapsulation: ViewEncapsulation.None,
|
|
243
|
+
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,.versions{border:1px solid #dee2e6}.process-title{color:#6b6b6b;font-size:1.5rem}.fullscreen-toggle{font-size:2rem}.fullscreen-toggle>i{cursor:pointer}.modeler{height:90vh}#properties{border-left:1px solid #dee2e6;padding-left:0}"]
|
|
244
|
+
},] }
|
|
245
|
+
];
|
|
246
|
+
ProcessManagementBuilderComponent.ctorParameters = () => [
|
|
247
|
+
{ type: HttpClient },
|
|
248
|
+
{ type: ProcessService },
|
|
249
|
+
{ type: LayoutService },
|
|
250
|
+
{ type: AlertService },
|
|
251
|
+
{ type: ActivatedRoute },
|
|
252
|
+
{ type: Router }
|
|
253
|
+
];
|
|
254
|
+
|
|
255
|
+
/*
|
|
256
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
257
|
+
*
|
|
258
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
259
|
+
* you may not use this file except in compliance with the License.
|
|
260
|
+
* You may obtain a copy of the License at
|
|
261
|
+
*
|
|
262
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
263
|
+
*
|
|
264
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
265
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
266
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
267
|
+
* See the License for the specific language governing permissions and
|
|
268
|
+
* limitations under the License.
|
|
269
|
+
*/
|
|
270
|
+
const ɵ0 = { title: 'Processes', roles: [ROLE_ADMIN] }, ɵ1 = { title: 'Create new Process', roles: [ROLE_ADMIN] }, ɵ2 = { title: 'Process details', roles: [ROLE_ADMIN] };
|
|
271
|
+
const routes = [
|
|
272
|
+
{
|
|
273
|
+
path: 'processes',
|
|
274
|
+
component: ProcessManagementComponent,
|
|
275
|
+
canActivate: [AuthGuardService],
|
|
276
|
+
data: ɵ0
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
path: 'processes/create',
|
|
280
|
+
component: ProcessManagementBuilderComponent,
|
|
281
|
+
canActivate: [AuthGuardService],
|
|
282
|
+
data: ɵ1
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
path: 'processes/process/:key',
|
|
286
|
+
component: ProcessManagementBuilderComponent,
|
|
287
|
+
canActivate: [AuthGuardService],
|
|
288
|
+
data: ɵ2
|
|
289
|
+
},
|
|
290
|
+
];
|
|
291
|
+
class ProcessManagementRoutingModule {
|
|
292
|
+
}
|
|
293
|
+
ProcessManagementRoutingModule.decorators = [
|
|
294
|
+
{ type: NgModule, args: [{
|
|
295
|
+
declarations: [],
|
|
296
|
+
imports: [
|
|
297
|
+
CommonModule,
|
|
298
|
+
RouterModule.forChild(routes),
|
|
299
|
+
],
|
|
300
|
+
exports: [RouterModule]
|
|
301
|
+
},] }
|
|
302
|
+
];
|
|
303
|
+
|
|
304
|
+
/*
|
|
305
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
306
|
+
*
|
|
307
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
308
|
+
* you may not use this file except in compliance with the License.
|
|
309
|
+
* You may obtain a copy of the License at
|
|
310
|
+
*
|
|
311
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
312
|
+
*
|
|
313
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
314
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
315
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
316
|
+
* See the License for the specific language governing permissions and
|
|
317
|
+
* limitations under the License.
|
|
318
|
+
*/
|
|
319
|
+
class ProcessManagementService {
|
|
320
|
+
constructor(configService, http) {
|
|
321
|
+
this.configService = configService;
|
|
322
|
+
this.http = http;
|
|
323
|
+
this.valtimoApiConfig = configService.config.valtimoApi;
|
|
324
|
+
}
|
|
325
|
+
deployBpmn(bpmn) {
|
|
326
|
+
const formData = new FormData();
|
|
327
|
+
formData.append('file', bpmn);
|
|
328
|
+
formData.append('deployment-name', 'valtimoConsoleApp');
|
|
329
|
+
formData.append('deployment-source', 'process application');
|
|
330
|
+
return this.http.post(`${this.valtimoApiConfig.endpointUri}camunda-rest/engine/default/deployment/create`, formData);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
ProcessManagementService.ɵprov = ɵɵdefineInjectable({ factory: function ProcessManagementService_Factory() { return new ProcessManagementService(ɵɵinject(ConfigService), ɵɵinject(HttpClient)); }, token: ProcessManagementService, providedIn: "root" });
|
|
334
|
+
ProcessManagementService.decorators = [
|
|
335
|
+
{ type: Injectable, args: [{
|
|
336
|
+
providedIn: 'root'
|
|
337
|
+
},] }
|
|
338
|
+
];
|
|
339
|
+
ProcessManagementService.ctorParameters = () => [
|
|
340
|
+
{ type: ConfigService },
|
|
341
|
+
{ type: HttpClient }
|
|
342
|
+
];
|
|
343
|
+
|
|
344
|
+
/*
|
|
345
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
346
|
+
*
|
|
347
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
348
|
+
* you may not use this file except in compliance with the License.
|
|
349
|
+
* You may obtain a copy of the License at
|
|
350
|
+
*
|
|
351
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
352
|
+
*
|
|
353
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
354
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
355
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
356
|
+
* See the License for the specific language governing permissions and
|
|
357
|
+
* limitations under the License.
|
|
358
|
+
*/
|
|
359
|
+
class ProcessManagementUploadComponent {
|
|
360
|
+
constructor(processManagementService, alertService) {
|
|
361
|
+
this.processManagementService = processManagementService;
|
|
362
|
+
this.alertService = alertService;
|
|
363
|
+
this.bpmn = null;
|
|
364
|
+
this.reload = new EventEmitter();
|
|
365
|
+
}
|
|
366
|
+
ngOnInit() {
|
|
367
|
+
}
|
|
368
|
+
onChange(files) {
|
|
369
|
+
this.bpmn = files.item(0);
|
|
370
|
+
}
|
|
371
|
+
uploadProcessBpmn() {
|
|
372
|
+
this.processManagementService.deployBpmn(this.bpmn).subscribe(() => {
|
|
373
|
+
this.bpmn = null;
|
|
374
|
+
this.bpmnFile.nativeElement.value = '';
|
|
375
|
+
this.alertService.success('Deployment successful');
|
|
376
|
+
this.reload.emit();
|
|
377
|
+
}, error => {
|
|
378
|
+
this.bpmn = null;
|
|
379
|
+
this.bpmnFile.nativeElement.value = '';
|
|
380
|
+
this.alertService.error(`Deployment failed. ${error}`);
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
ProcessManagementUploadComponent.decorators = [
|
|
385
|
+
{ type: Component, args: [{
|
|
386
|
+
selector: 'valtimo-process-management-upload',
|
|
387
|
+
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=\"modal fade\" id=\"uploadProcess\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"uploadProcessLabel\"\n aria-hidden=\"true\">\n <div class=\"modal-dialog modal-dialog-centered\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h3 class=\"modal-title\" id=\"uploadProcessLabel\">Upload process</h3>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <h5>BPMN Model</h5>\n <input #bpmnFile type=\"file\"\n id=\"file\"\n accept=\".bpmn\"\n (change)=\"onChange($event.target.files)\">\n </div>\n <div class=\"modal-footer\">\n <div class=\"btn-group\">\n <button type=\"button\" class=\"btn btn-primary btn-space\" (click)=\"uploadProcessBpmn()\" [disabled]=\"!bpmn\"\n data-dismiss=\"modal\">Upload\n </button>\n </div>\n </div>\n </div>\n </div>\n</div>\n",
|
|
388
|
+
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 */"]
|
|
389
|
+
},] }
|
|
390
|
+
];
|
|
391
|
+
ProcessManagementUploadComponent.ctorParameters = () => [
|
|
392
|
+
{ type: ProcessManagementService },
|
|
393
|
+
{ type: AlertService }
|
|
394
|
+
];
|
|
395
|
+
ProcessManagementUploadComponent.propDecorators = {
|
|
396
|
+
reload: [{ type: Output }],
|
|
397
|
+
bpmnFile: [{ type: ViewChild, args: ['bpmnFile',] }]
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
/*
|
|
401
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
402
|
+
*
|
|
403
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
404
|
+
* you may not use this file except in compliance with the License.
|
|
405
|
+
* You may obtain a copy of the License at
|
|
406
|
+
*
|
|
407
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
408
|
+
*
|
|
409
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
410
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
411
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
412
|
+
* See the License for the specific language governing permissions and
|
|
413
|
+
* limitations under the License.
|
|
414
|
+
*/
|
|
415
|
+
class ProcessManagementModule {
|
|
416
|
+
}
|
|
417
|
+
ProcessManagementModule.decorators = [
|
|
418
|
+
{ type: NgModule, args: [{
|
|
419
|
+
declarations: [
|
|
420
|
+
ProcessManagementComponent,
|
|
421
|
+
ProcessManagementBuilderComponent,
|
|
422
|
+
ProcessManagementListComponent,
|
|
423
|
+
ProcessManagementUploadComponent
|
|
424
|
+
],
|
|
425
|
+
imports: [
|
|
426
|
+
CommonModule,
|
|
427
|
+
ProcessManagementRoutingModule,
|
|
428
|
+
WidgetModule,
|
|
429
|
+
ListModule,
|
|
430
|
+
FormsModule,
|
|
431
|
+
TranslateModule
|
|
432
|
+
],
|
|
433
|
+
exports: [ProcessManagementComponent]
|
|
434
|
+
},] }
|
|
435
|
+
];
|
|
436
|
+
|
|
437
|
+
/*
|
|
438
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
439
|
+
*
|
|
440
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
441
|
+
* you may not use this file except in compliance with the License.
|
|
442
|
+
* You may obtain a copy of the License at
|
|
443
|
+
*
|
|
444
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
445
|
+
*
|
|
446
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
447
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
448
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
449
|
+
* See the License for the specific language governing permissions and
|
|
450
|
+
* limitations under the License.
|
|
451
|
+
*/
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Generated bundle index. Do not edit.
|
|
455
|
+
*/
|
|
456
|
+
|
|
457
|
+
export { ProcessManagementComponent, ProcessManagementModule, ProcessManagementBuilderComponent as ɵa, ProcessManagementListComponent as ɵb, ProcessManagementUploadComponent as ɵc, ProcessManagementService as ɵd, ProcessManagementRoutingModule as ɵe };
|
|
458
|
+
//# sourceMappingURL=valtimo-process-management.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valtimo-process-management.js","sources":["../../../../projects/valtimo/process-management/src/lib/process-management-list/process-management-list.component.ts","../../../../projects/valtimo/process-management/src/lib/process-management.component.ts","../../../../projects/valtimo/process-management/src/lib/process-management-builder/process-management-builder.component.ts","../../../../projects/valtimo/process-management/src/lib/process-management-routing.ts","../../../../projects/valtimo/process-management/src/lib/process-management.service.ts","../../../../projects/valtimo/process-management/src/lib/process-management-upload/process-management-upload.component.ts","../../../../projects/valtimo/process-management/src/lib/process-management.module.ts","../../../../projects/valtimo/process-management/src/public-api.ts","../../../../projects/valtimo/process-management/src/valtimo-process-management.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 {Component, OnInit} from '@angular/core';\nimport {ProcessService} from '@valtimo/process';\nimport {ProcessDefinition} from '@valtimo/contract';\nimport {Router} from '@angular/router';\n\n@Component({\n selector: 'valtimo-process-management-list',\n templateUrl: './process-management-list.component.html',\n styleUrls: ['./process-management-list.component.scss']\n})\nexport class ProcessManagementListComponent implements OnInit {\n\n public processDefinitions: ProcessDefinition[] = [];\n public fields = [\n {key: 'key', label: 'Key'},\n {key: 'name', label: 'Name'},\n ];\n\n constructor(\n private processService: ProcessService,\n private router: Router\n ) {\n }\n\n ngOnInit() {\n this.loadProcessDefinitions();\n }\n\n loadProcessDefinitions() {\n this.processService.getProcessDefinitions().subscribe((processDefs: ProcessDefinition[]) => {\n this.processDefinitions = processDefs;\n });\n }\n\n editProcessDefinition(processDefinition: ProcessDefinition) {\n this.router.navigate(['/processes/process', processDefinition.key]);\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 {Component, OnInit, ViewChild} from '@angular/core';\nimport {ProcessManagementListComponent} from './process-management-list/process-management-list.component';\n\n@Component({\n selector: 'valtimo-process-management',\n templateUrl: './process-management.component.html',\n styleUrls: ['./process-management.component.scss']\n})\nexport class ProcessManagementComponent implements OnInit {\n\n @ViewChild('processManagementList') processManagementList: ProcessManagementListComponent;\n\n constructor() {\n }\n\n ngOnInit() {\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 {Component, OnDestroy, OnInit, ViewEncapsulation} from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {ProcessService} from '@valtimo/process';\nimport {ProcessDefinition} from '@valtimo/contract';\nimport {AlertService} from '@valtimo/components';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {forkJoin, Observable} from 'rxjs';\nimport {LayoutService} from '@valtimo/layout';\nimport Modeler from 'bpmn-js/lib/Modeler';\nimport PropertiesPanelModule from 'bpmn-js-properties-panel';\nimport PropertiesProviderModule from 'bpmn-js-properties-panel/lib/provider/camunda';\nimport CamundaExtensionModule from 'camunda-bpmn-moddle/lib';\nimport CamundaModdleDescriptor from 'camunda-bpmn-moddle/resources/camunda.json';\n\n@Component({\n selector: 'valtimo-process-management-builder',\n templateUrl: './process-management-builder.component.html',\n styleUrls: ['./process-management-builder.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class ProcessManagementBuilderComponent implements OnInit, OnDestroy {\n\n public bpmnModeler;\n public processDefinitionVersions: ProcessDefinition[] | null = null;\n public selectedVersion: ProcessDefinition | null = null;\n public processKey: string | null = null;\n private elementTemplateFiles: string[] = [\n 'mailSendTask'\n ];\n\n constructor(\n private http: HttpClient,\n private processService: ProcessService,\n public layoutService: LayoutService,\n private alertService: AlertService,\n private route: ActivatedRoute,\n private router: Router\n ) {\n }\n\n ngOnInit() {\n this.init();\n }\n\n init() {\n this.processKey = this.route.snapshot.paramMap.get('key');\n forkJoin(this.getElementTemplates()).subscribe((elementTemplates: any[]) => {\n this.bpmnModeler = new Modeler({\n container: '#canvas',\n height: '90vh',\n additionalModules: [\n PropertiesPanelModule,\n PropertiesProviderModule,\n CamundaExtensionModule\n ],\n propertiesPanel: {\n parent: '#properties'\n },\n moddleExtensions: {\n camunda: CamundaModdleDescriptor\n },\n elementTemplates: elementTemplates\n });\n if (this.processKey) {\n this.loadProcessVersions(this.processKey);\n this.selectedVersion = null;\n } else {\n this.loadEmptyBpmn();\n }\n });\n }\n\n deploy(): void {\n this.bpmnModeler.saveXML((err: any, xml: any) => {\n this.processService.deployProcess(xml).subscribe((asd) => {\n if (this.processKey) {\n this.loadProcessVersions(this.processKey);\n } else {\n this.router.navigate(['/processes']);\n }\n this.alertService.success('Deployment successful');\n this.selectedVersion = null;\n });\n });\n }\n\n reset() {\n this.bpmnModeler.destroy();\n this.init();\n }\n\n download() {\n this.bpmnModeler.saveXML((err: any, xml: any) => {\n const file = new Blob([xml], {type: 'text/xml'});\n const link = document.createElement('a');\n link.download = 'diagram.bpmn';\n link.href = window.URL.createObjectURL(file);\n link.click();\n window.URL.revokeObjectURL(link.href);\n link.remove();\n });\n }\n\n loadEmptyBpmn() {\n const url = '/assets/bpmn/initial.bpmn';\n this.http.get(url, {\n headers: {observe: 'response'}, responseType: 'text'\n }).subscribe(\n (xml: any) => {\n this.bpmnModeler.importXML(xml);\n }\n );\n }\n\n getElementTemplates(): Observable<any>[] {\n const templateObs = [];\n for (const file of this.elementTemplateFiles) {\n templateObs.push(this.http.get(`/assets/bpmn/element-templates/${file}.json`, {\n headers: {observe: 'response'},\n responseType: 'json'\n }));\n }\n return templateObs;\n }\n\n private setLatestVersion() {\n this.selectedVersion = this.processDefinitionVersions.reduce((acc, version) =>\n version.version > acc.version ? version : acc\n );\n this.loadProcessBpmn();\n }\n\n loadProcessVersions(processDefinitionKey: string) {\n this.processService.getProcessDefinitionVersions(processDefinitionKey).subscribe((processDefinitionVersions: ProcessDefinition[]) => {\n this.processDefinitionVersions = processDefinitionVersions;\n this.setLatestVersion();\n });\n }\n\n compareProcessDefinitions(pd1: ProcessDefinition, pd2: ProcessDefinition) {\n if (pd1 === null && pd2 === null) {\n return true;\n }\n if (pd1 === null || pd2 === null) {\n return false;\n }\n return pd1.id === pd2.id;\n }\n\n loadProcessBpmn() {\n this.processService.getProcessDefinitionXml(this.selectedVersion.id).subscribe(xml => {\n this.bpmnModeler.importXML(xml['bpmn20Xml']);\n });\n }\n\n ngOnDestroy() {\n this.bpmnModeler.destroy();\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 {ProcessManagementComponent} from './process-management.component';\nimport {ProcessManagementBuilderComponent} from './process-management-builder/process-management-builder.component';\nimport {ROLE_ADMIN} from '@valtimo/contract';\n\nconst routes: Routes = [\n {\n path: 'processes',\n component: ProcessManagementComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Processes', roles: [ROLE_ADMIN]}\n },\n {\n path: 'processes/create',\n component: ProcessManagementBuilderComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Create new Process', roles: [ROLE_ADMIN]}\n },\n {\n path: 'processes/process/:key',\n component: ProcessManagementBuilderComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Process details', roles: [ROLE_ADMIN]}\n },\n];\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n RouterModule.forChild(routes),\n ],\n exports: [RouterModule]\n})\nexport class ProcessManagementRoutingModule {\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 {Injectable} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {HttpClient} from '@angular/common/http';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ProcessManagementService {\n\n private valtimoApiConfig: any;\n\n constructor(\n private configService: ConfigService,\n private http: HttpClient\n ) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n }\n\n deployBpmn(bpmn: File): Observable<any> {\n const formData: FormData = new FormData();\n formData.append('file', bpmn);\n formData.append('deployment-name', 'valtimoConsoleApp');\n formData.append('deployment-source', 'process application');\n return this.http.post<any>(\n `${this.valtimoApiConfig.endpointUri}camunda-rest/engine/default/deployment/create`, formData\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 {Component, ElementRef, EventEmitter, OnInit, Output, ViewChild} from '@angular/core';\nimport {ProcessManagementService} from '../process-management.service';\nimport {AlertService} from '@valtimo/components';\n\n@Component({\n selector: 'valtimo-process-management-upload',\n templateUrl: './process-management-upload.component.html',\n styleUrls: ['./process-management-upload.component.scss']\n})\nexport class ProcessManagementUploadComponent implements OnInit {\n public bpmn: File | null = null;\n @Output() reload = new EventEmitter();\n @ViewChild('bpmnFile') bpmnFile: ElementRef;\n\n constructor(\n private processManagementService: ProcessManagementService,\n private alertService: AlertService\n ) { }\n\n ngOnInit() {\n }\n\n onChange(files: FileList): void {\n this.bpmn = files.item(0);\n }\n\n uploadProcessBpmn() {\n this.processManagementService.deployBpmn(this.bpmn).subscribe(() => {\n this.bpmn = null;\n this.bpmnFile.nativeElement.value = '';\n this.alertService.success('Deployment successful');\n this.reload.emit();\n }, error => {\n this.bpmn = null;\n this.bpmnFile.nativeElement.value = '';\n this.alertService.error(`Deployment failed. ${error}`);\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 {ProcessManagementComponent} from './process-management.component';\nimport {ProcessManagementRoutingModule} from './process-management-routing';\nimport {CommonModule} from '@angular/common';\nimport {ProcessManagementBuilderComponent} from './process-management-builder/process-management-builder.component';\nimport {ProcessManagementListComponent} from './process-management-list/process-management-list.component';\nimport {ListModule, WidgetModule} from '@valtimo/components';\nimport {FormsModule} from '@angular/forms';\nimport {ProcessManagementUploadComponent} from './process-management-upload/process-management-upload.component';\nimport {TranslateModule} from '@ngx-translate/core';\n\n@NgModule({\n declarations: [\n ProcessManagementComponent,\n ProcessManagementBuilderComponent,\n ProcessManagementListComponent,\n ProcessManagementUploadComponent\n ],\n imports: [\n CommonModule,\n ProcessManagementRoutingModule,\n WidgetModule,\n ListModule,\n FormsModule,\n TranslateModule\n ],\n exports: [ProcessManagementComponent]\n})\nexport class ProcessManagementModule {\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\n/*\n * Public API Surface of process-management\n */\n\nexport * from './lib/process-management.module';\nexport * from './lib/process-management.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {ProcessManagementBuilderComponent as ɵa} from './lib/process-management-builder/process-management-builder.component';\nexport {ProcessManagementListComponent as ɵb} from './lib/process-management-list/process-management-list.component';\nexport {ProcessManagementRoutingModule as ɵe} from './lib/process-management-routing';\nexport {ProcessManagementUploadComponent as ɵc} from './lib/process-management-upload/process-management-upload.component';\nexport {ProcessManagementService as ɵd} from './lib/process-management.service';"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;MA0Ba,8BAA8B;IAQzC,YACU,cAA8B,EAC9B,MAAc;QADd,mBAAc,GAAd,cAAc,CAAgB;QAC9B,WAAM,GAAN,MAAM,CAAQ;QARjB,uBAAkB,G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Aa,CAAC,KAAK,GAAG,EAAE,CAAC;YACvC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,sBAAsB,KAAK,EAAE,CAAC,CAAC;SACxD,CAAC,CAAC;KACJ;;;YAjCF,SAAS,SAAC;gBACT,QAAQ,EAAE,mCAAmC;gBAC7C,svDAAyD;;aAE1D;;;YAPO,wBAAwB;YACxB,YAAY;;;qBASjB,MAAM;uBACN,SAAS,SAAC,UAAU;;;AC5BvB;;;;;;;;;;;;;;;MA4Ca,uBAAuB;;;YAjBnC,QAAQ,SAAC;gBACR,YAAY,EAAE;oBACZ,0BAA0B;oBAC1B,iCAAiC;oBACjC,8BAA8B;oBAC9B,gCAAgC;iBACjC;gBACD,OAAO,EAAE;oBACP,YAAY;oBACZ,8BAA8B;oBAC9B,YAAY;oBACZ,UAAU;oBACV,WAAW;oBACX,eAAe;iBAChB;gBACD,OAAO,EAAE,CAAC,0BAA0B,CAAC;aACtC;;;AC3CD;;;;;;;;;;;;;;;;ACAA;;;;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { HttpClient } from '@angular/common/http';
|
|
3
|
+
import { ProcessService } from '@valtimo/process';
|
|
4
|
+
import { ProcessDefinition } from '@valtimo/contract';
|
|
5
|
+
import { AlertService } from '@valtimo/components';
|
|
6
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
7
|
+
import { Observable } from 'rxjs';
|
|
8
|
+
import { LayoutService } from '@valtimo/layout';
|
|
9
|
+
export declare class ProcessManagementBuilderComponent implements OnInit, OnDestroy {
|
|
10
|
+
private http;
|
|
11
|
+
private processService;
|
|
12
|
+
layoutService: LayoutService;
|
|
13
|
+
private alertService;
|
|
14
|
+
private route;
|
|
15
|
+
private router;
|
|
16
|
+
bpmnModeler: any;
|
|
17
|
+
processDefinitionVersions: ProcessDefinition[] | null;
|
|
18
|
+
selectedVersion: ProcessDefinition | null;
|
|
19
|
+
processKey: string | null;
|
|
20
|
+
private elementTemplateFiles;
|
|
21
|
+
constructor(http: HttpClient, processService: ProcessService, layoutService: LayoutService, alertService: AlertService, route: ActivatedRoute, router: Router);
|
|
22
|
+
ngOnInit(): void;
|
|
23
|
+
init(): void;
|
|
24
|
+
deploy(): void;
|
|
25
|
+
reset(): void;
|
|
26
|
+
download(): void;
|
|
27
|
+
loadEmptyBpmn(): void;
|
|
28
|
+
getElementTemplates(): Observable<any>[];
|
|
29
|
+
private setLatestVersion;
|
|
30
|
+
loadProcessVersions(processDefinitionKey: string): void;
|
|
31
|
+
compareProcessDefinitions(pd1: ProcessDefinition, pd2: ProcessDefinition): boolean;
|
|
32
|
+
loadProcessBpmn(): void;
|
|
33
|
+
ngOnDestroy(): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { ProcessService } from '@valtimo/process';
|
|
3
|
+
import { ProcessDefinition } from '@valtimo/contract';
|
|
4
|
+
import { Router } from '@angular/router';
|
|
5
|
+
export declare class ProcessManagementListComponent implements OnInit {
|
|
6
|
+
private processService;
|
|
7
|
+
private router;
|
|
8
|
+
processDefinitions: ProcessDefinition[];
|
|
9
|
+
fields: {
|
|
10
|
+
key: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}[];
|
|
13
|
+
constructor(processService: ProcessService, router: Router);
|
|
14
|
+
ngOnInit(): void;
|
|
15
|
+
loadProcessDefinitions(): void;
|
|
16
|
+
editProcessDefinition(processDefinition: ProcessDefinition): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { ProcessManagementService } from '../process-management.service';
|
|
3
|
+
import { AlertService } from '@valtimo/components';
|
|
4
|
+
export declare class ProcessManagementUploadComponent implements OnInit {
|
|
5
|
+
private processManagementService;
|
|
6
|
+
private alertService;
|
|
7
|
+
bpmn: File | null;
|
|
8
|
+
reload: EventEmitter<any>;
|
|
9
|
+
bpmnFile: ElementRef;
|
|
10
|
+
constructor(processManagementService: ProcessManagementService, alertService: AlertService);
|
|
11
|
+
ngOnInit(): void;
|
|
12
|
+
onChange(files: FileList): void;
|
|
13
|
+
uploadProcessBpmn(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { ProcessManagementListComponent } from './process-management-list/process-management-list.component';
|
|
3
|
+
export declare class ProcessManagementComponent implements OnInit {
|
|
4
|
+
processManagementList: ProcessManagementListComponent;
|
|
5
|
+
constructor();
|
|
6
|
+
ngOnInit(): void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { HttpClient } from '@angular/common/http';
|
|
3
|
+
import { ConfigService } from '@valtimo/config';
|
|
4
|
+
export declare class ProcessManagementService {
|
|
5
|
+
private configService;
|
|
6
|
+
private http;
|
|
7
|
+
private valtimoApiConfig;
|
|
8
|
+
constructor(configService: ConfigService, http: HttpClient);
|
|
9
|
+
deployBpmn(bpmn: File): Observable<any>;
|
|
10
|
+
}
|