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