@acorex/modules 20.6.0-next.2 → 20.6.0-next.3
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/common/index.d.ts +85 -3
- package/fesm2022/acorex-modules-common.mjs +1 -1
- package/fesm2022/acorex-modules-common.mjs.map +1 -1
- package/fesm2022/acorex-modules-content-management-acorex-modules-content-management-DUEmt_c7.mjs.map +1 -1
- package/fesm2022/{acorex-modules-document-management-acorex-modules-document-management-D6A8nh4E.mjs → acorex-modules-document-management-acorex-modules-document-management-Cx45oj-N.mjs} +77 -72
- package/fesm2022/{acorex-modules-document-management-acorex-modules-document-management-D6A8nh4E.mjs.map → acorex-modules-document-management-acorex-modules-document-management-Cx45oj-N.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-attachment-widget.component-RnnszRLs.mjs → acorex-modules-document-management-attachment-widget.component-D-f5Ml7b.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-attachment-widget.component-RnnszRLs.mjs.map → acorex-modules-document-management-attachment-widget.component-D-f5Ml7b.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-details-view.component-Cos2NG-O.mjs → acorex-modules-document-management-details-view.component-BQmpQhlZ.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-details-view.component-Cos2NG-O.mjs.map → acorex-modules-document-management-details-view.component-BQmpQhlZ.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-document-signature-popup.component-CuYgvv2m.mjs → acorex-modules-document-management-document-signature-popup.component-Dz1uKKIr.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-document-signature-popup.component-CuYgvv2m.mjs.map → acorex-modules-document-management-document-signature-popup.component-Dz1uKKIr.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-drive-choose.component-Cmc5lK1T.mjs → acorex-modules-document-management-drive-choose.component-Bh245lBa.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-drive-choose.component-Cmc5lK1T.mjs.map → acorex-modules-document-management-drive-choose.component-Bh245lBa.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-drive.component-NubvqosJ.mjs → acorex-modules-document-management-drive.component-BrSRKQ23.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-drive.component-NubvqosJ.mjs.map → acorex-modules-document-management-drive.component-BrSRKQ23.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-large-icons-view.component-3EMonsWT.mjs → acorex-modules-document-management-large-icons-view.component-C1FegGr_.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-large-icons-view.component-3EMonsWT.mjs.map → acorex-modules-document-management-large-icons-view.component-C1FegGr_.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-Chnjms53.mjs → acorex-modules-document-management-large-tiles-view.component-r-zzDobG.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-large-tiles-view.component-Chnjms53.mjs.map → acorex-modules-document-management-large-tiles-view.component-r-zzDobG.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-list-view.component-CITeGX_Y.mjs → acorex-modules-document-management-list-view.component-GuPa6IEy.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-list-view.component-CITeGX_Y.mjs.map → acorex-modules-document-management-list-view.component-GuPa6IEy.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-permission-definition.provider-bUtjrzBL.mjs → acorex-modules-document-management-permission-definition.provider-yjgChROd.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-permission-definition.provider-bUtjrzBL.mjs.map → acorex-modules-document-management-permission-definition.provider-yjgChROd.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-small-icons-view.component-DLW4iBWa.mjs → acorex-modules-document-management-small-icons-view.component-CF5IIGwk.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-small-icons-view.component-DLW4iBWa.mjs.map → acorex-modules-document-management-small-icons-view.component-CF5IIGwk.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-CUrf4NNl.mjs → acorex-modules-document-management-small-tiles-view.component-DqXs1Z9m.mjs} +2 -2
- package/fesm2022/{acorex-modules-document-management-small-tiles-view.component-CUrf4NNl.mjs.map → acorex-modules-document-management-small-tiles-view.component-DqXs1Z9m.mjs.map} +1 -1
- package/fesm2022/acorex-modules-document-management.mjs +1 -1
- package/fesm2022/acorex-modules-workflow-management.mjs +591 -11
- package/fesm2022/acorex-modules-workflow-management.mjs.map +1 -1
- package/package.json +2 -2
- package/workflow-management/index.d.ts +148 -6
|
@@ -1,21 +1,106 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Injector, Injectable, runInInjectionContext, NgModule } from '@angular/core';
|
|
3
|
+
import { AXPSessionService, AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex/platform/auth';
|
|
4
|
+
import { AXPEntityService, ensureListActions, actionExists, AXMEntityCrudServiceImpl, AXP_ENTITY_ACTION_PLUGIN, AXPEntityDefinitionRegistryService, entityMasterDeleteAction, AXP_ENTITY_DEFINITION_LOADER, entityMasterCrudActions, entityMasterRecordActions } from '@acorex/platform/layout/entity';
|
|
5
|
+
import { firstValueFrom } from 'rxjs';
|
|
1
6
|
import { AXMCalendarManagementModule } from '@acorex/modules/calendar-management';
|
|
2
7
|
import { AXPEntityCommandScope, createAllQueryView, AXPEntityQueryType, AXP_MENU_PROVIDER } from '@acorex/platform/common';
|
|
3
|
-
import {
|
|
4
|
-
import * as i0 from '@angular/core';
|
|
5
|
-
import { inject, Injector, runInInjectionContext, Injectable, NgModule } from '@angular/core';
|
|
6
|
-
import { ensureListActions, actionExists, AXMEntityCrudServiceImpl, AXP_ENTITY_ACTION_PLUGIN, AXPEntityDefinitionRegistryService, entityMasterDeleteAction, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
|
|
8
|
+
import { AXPCommandExecutor, provideCommandSetups } from '@acorex/platform/runtime';
|
|
7
9
|
import * as i2 from '@acorex/platform/layout/widget-core';
|
|
8
10
|
import { AXPWidgetGroupEnum, AXP_WIDGETS_LAYOUT_CATEGORY, AXPWidgetCoreModule, AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';
|
|
9
11
|
import * as i1 from '@acorex/platform/workflow';
|
|
10
|
-
import { AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
12
|
+
import { AXPWorkflowAction, AXPWorkflowModule, WorkflowCoordinator } from '@acorex/platform/workflow';
|
|
11
13
|
import { AXTranslationService } from '@acorex/core/translation';
|
|
12
14
|
import { AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
|
|
13
15
|
import { AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY } from '@acorex/platform/layout/widgets';
|
|
14
16
|
import { AXPWorkflowTaskProvider, AXP_WORKFLOW_TASK_PROVIDER } from '@acorex/modules/task-management';
|
|
15
|
-
import {
|
|
17
|
+
import { AXToastService } from '@acorex/components/toast';
|
|
18
|
+
import { AXPWidgetsList } from '@acorex/modules/common';
|
|
19
|
+
|
|
20
|
+
const config = {
|
|
21
|
+
i18n: 'workflow-management',
|
|
22
|
+
module: 'WorkflowManagement',
|
|
23
|
+
};
|
|
24
|
+
const RootConfig = {
|
|
25
|
+
config,
|
|
26
|
+
module: {
|
|
27
|
+
route: 'workflow-management',
|
|
28
|
+
name: config.module,
|
|
29
|
+
title: '@workflow-management:module.title',
|
|
30
|
+
icon: 'fa-light fa-diagram-project',
|
|
31
|
+
},
|
|
32
|
+
entities: {
|
|
33
|
+
workflowDefinition: {
|
|
34
|
+
name: 'WorkflowDefinition',
|
|
35
|
+
source: `${config.module}.WorkflowDefinition`,
|
|
36
|
+
title: '@workflow-management:workflow-definitions.entities.workflow-definition.title',
|
|
37
|
+
titlePlural: '@workflow-management:workflow-definitions.entities.workflow-definition.plural',
|
|
38
|
+
icon: 'fa-light fa-diagram-project',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
class AXMWorkflowManagementModuleEntityProvider {
|
|
44
|
+
constructor() {
|
|
45
|
+
this.injector = inject(Injector);
|
|
46
|
+
}
|
|
47
|
+
preload() {
|
|
48
|
+
const module = RootConfig.module.name;
|
|
49
|
+
return Array.from(Object.values(RootConfig.entities)).map((entity) => ({
|
|
50
|
+
module: module,
|
|
51
|
+
entity: entity.name,
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
async get(moduleName, entityName) {
|
|
55
|
+
if (moduleName === RootConfig.module.name) {
|
|
56
|
+
switch (entityName) {
|
|
57
|
+
case RootConfig.entities.workflowDefinition.name:
|
|
58
|
+
return (await Promise.resolve().then(function () { return workflowDefinition_entity; })).factory(this.injector);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AXMWorkflowManagementModuleEntityProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
64
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AXMWorkflowManagementModuleEntityProvider }); }
|
|
65
|
+
}
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AXMWorkflowManagementModuleEntityProvider, decorators: [{
|
|
67
|
+
type: Injectable
|
|
68
|
+
}] });
|
|
69
|
+
|
|
70
|
+
const AXPWorkflowManagementMenuKeys = {
|
|
71
|
+
Root: 'workflow-management:menu',
|
|
72
|
+
WorkflowDefinitions: 'workflow-management:workflow-definitions',
|
|
73
|
+
};
|
|
16
74
|
|
|
17
75
|
class AXMMenuProvider {
|
|
18
|
-
|
|
76
|
+
constructor() {
|
|
77
|
+
this.entityService = inject(AXPEntityService);
|
|
78
|
+
this.sessionService = inject(AXPSessionService);
|
|
79
|
+
}
|
|
80
|
+
async provide(context) {
|
|
81
|
+
const isAuthorized = await firstValueFrom(this.sessionService.isAuthorized$);
|
|
82
|
+
if (!isAuthorized) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const module = RootConfig.module;
|
|
86
|
+
context.addItems([
|
|
87
|
+
{
|
|
88
|
+
name: AXPWorkflowManagementMenuKeys.Root,
|
|
89
|
+
priority: 9500,
|
|
90
|
+
text: '@workflow-management:module.menus.root.title',
|
|
91
|
+
icon: module.icon,
|
|
92
|
+
children: [
|
|
93
|
+
{
|
|
94
|
+
name: AXPWorkflowManagementMenuKeys.WorkflowDefinitions,
|
|
95
|
+
text: '@workflow-management:workflow-definitions.menus.workflow-definitions.title',
|
|
96
|
+
path: this.entityService.createPath(module.name, RootConfig.entities.workflowDefinition.name),
|
|
97
|
+
priority: 10,
|
|
98
|
+
icon: RootConfig.entities.workflowDefinition.icon,
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
]);
|
|
103
|
+
}
|
|
19
104
|
}
|
|
20
105
|
|
|
21
106
|
const signPlugin = {
|
|
@@ -970,10 +1055,481 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
970
1055
|
}]
|
|
971
1056
|
}] });
|
|
972
1057
|
|
|
1058
|
+
class AXMWorkflowManagementWorkflowDefinitionEntityService extends AXMEntityCrudServiceImpl {
|
|
1059
|
+
}
|
|
1060
|
+
class AXMWorkflowManagementWorkflowDefinitionEntityServiceImpl extends AXMWorkflowManagementWorkflowDefinitionEntityService {
|
|
1061
|
+
constructor() {
|
|
1062
|
+
super(`${RootConfig.module.name}.${RootConfig.entities.workflowDefinition.name}`);
|
|
1063
|
+
}
|
|
1064
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AXMWorkflowManagementWorkflowDefinitionEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1065
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AXMWorkflowManagementWorkflowDefinitionEntityServiceImpl }); }
|
|
1066
|
+
}
|
|
1067
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AXMWorkflowManagementWorkflowDefinitionEntityServiceImpl, decorators: [{
|
|
1068
|
+
type: Injectable
|
|
1069
|
+
}], ctorParameters: () => [] });
|
|
1070
|
+
|
|
1071
|
+
class AXMWorkflowManagementWorkflowDefinitionEntityModule {
|
|
1072
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AXMWorkflowManagementWorkflowDefinitionEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1073
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.10", ngImport: i0, type: AXMWorkflowManagementWorkflowDefinitionEntityModule }); }
|
|
1074
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AXMWorkflowManagementWorkflowDefinitionEntityModule, providers: [
|
|
1075
|
+
{
|
|
1076
|
+
provide: AXMWorkflowManagementWorkflowDefinitionEntityService,
|
|
1077
|
+
useClass: AXMWorkflowManagementWorkflowDefinitionEntityServiceImpl,
|
|
1078
|
+
},
|
|
1079
|
+
] }); }
|
|
1080
|
+
}
|
|
1081
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AXMWorkflowManagementWorkflowDefinitionEntityModule, decorators: [{
|
|
1082
|
+
type: NgModule,
|
|
1083
|
+
args: [{
|
|
1084
|
+
imports: [],
|
|
1085
|
+
exports: [],
|
|
1086
|
+
declarations: [],
|
|
1087
|
+
providers: [
|
|
1088
|
+
{
|
|
1089
|
+
provide: AXMWorkflowManagementWorkflowDefinitionEntityService,
|
|
1090
|
+
useClass: AXMWorkflowManagementWorkflowDefinitionEntityServiceImpl,
|
|
1091
|
+
},
|
|
1092
|
+
],
|
|
1093
|
+
}]
|
|
1094
|
+
}] });
|
|
1095
|
+
|
|
1096
|
+
//#endregion
|
|
1097
|
+
/**
|
|
1098
|
+
* Execute Workflow Command
|
|
1099
|
+
*
|
|
1100
|
+
* Starts and manages workflow execution from entity list.
|
|
1101
|
+
* Handles the complete workflow lifecycle including frontend/backend activities.
|
|
1102
|
+
*/
|
|
1103
|
+
class ExecuteWorkflowCommand {
|
|
1104
|
+
constructor() {
|
|
1105
|
+
//#region ---- Services ----
|
|
1106
|
+
this.workflowCoordinator = inject(WorkflowCoordinator);
|
|
1107
|
+
this.toastService = inject(AXToastService);
|
|
1108
|
+
}
|
|
1109
|
+
//#endregion
|
|
1110
|
+
//#region ---- Command Implementation ----
|
|
1111
|
+
async execute(input) {
|
|
1112
|
+
try {
|
|
1113
|
+
console.log(`[ExecuteWorkflowCommand] Starting workflow: ${input.definitionId}`);
|
|
1114
|
+
// Start workflow execution
|
|
1115
|
+
const result = await this.workflowCoordinator.startWorkflow(input.definitionId, input.input || {});
|
|
1116
|
+
if (!result.success) {
|
|
1117
|
+
this.toastService.show({
|
|
1118
|
+
color: 'danger',
|
|
1119
|
+
title: 'Workflow Execution Failed',
|
|
1120
|
+
content: result.error || 'Unknown error',
|
|
1121
|
+
closeButton: true,
|
|
1122
|
+
timeOut: 5000,
|
|
1123
|
+
});
|
|
1124
|
+
return {
|
|
1125
|
+
executionId: result.executionId || '',
|
|
1126
|
+
output: null,
|
|
1127
|
+
success: false,
|
|
1128
|
+
};
|
|
1129
|
+
}
|
|
1130
|
+
// Handle workflow execution loop
|
|
1131
|
+
let currentResult = result;
|
|
1132
|
+
while (currentResult.nextTask) {
|
|
1133
|
+
const task = currentResult.nextTask;
|
|
1134
|
+
console.log(`[ExecuteWorkflowCommand] Executing frontend task: ${task.activityType}`);
|
|
1135
|
+
// Execute frontend task
|
|
1136
|
+
const { output, outcome } = await this.workflowCoordinator.executeTask(task);
|
|
1137
|
+
// Complete task and get next
|
|
1138
|
+
currentResult = await this.workflowCoordinator.completeTask(currentResult.executionId, task, outcome, output);
|
|
1139
|
+
if (!currentResult.success) {
|
|
1140
|
+
this.toastService.show({
|
|
1141
|
+
color: 'danger',
|
|
1142
|
+
title: 'Workflow Execution Failed',
|
|
1143
|
+
content: currentResult.error || 'Unknown error',
|
|
1144
|
+
closeButton: true,
|
|
1145
|
+
timeOut: 5000,
|
|
1146
|
+
});
|
|
1147
|
+
return {
|
|
1148
|
+
executionId: currentResult.executionId || '',
|
|
1149
|
+
output: null,
|
|
1150
|
+
success: false,
|
|
1151
|
+
};
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
// Workflow completed successfully
|
|
1155
|
+
console.log(`[ExecuteWorkflowCommand] Workflow completed:`, currentResult.state?.output);
|
|
1156
|
+
this.toastService.show({
|
|
1157
|
+
color: 'success',
|
|
1158
|
+
title: 'Workflow Completed',
|
|
1159
|
+
content: 'Workflow executed successfully',
|
|
1160
|
+
closeButton: true,
|
|
1161
|
+
timeOut: 3000,
|
|
1162
|
+
});
|
|
1163
|
+
return {
|
|
1164
|
+
executionId: currentResult.executionId,
|
|
1165
|
+
output: currentResult.state?.output,
|
|
1166
|
+
success: true,
|
|
1167
|
+
};
|
|
1168
|
+
}
|
|
1169
|
+
catch (error) {
|
|
1170
|
+
console.error(`[ExecuteWorkflowCommand] Error:`, error);
|
|
1171
|
+
this.toastService.show({
|
|
1172
|
+
color: 'danger',
|
|
1173
|
+
title: 'Workflow Execution Error',
|
|
1174
|
+
content: error.message || 'Unknown error',
|
|
1175
|
+
closeButton: true,
|
|
1176
|
+
timeOut: 5000,
|
|
1177
|
+
});
|
|
1178
|
+
return {
|
|
1179
|
+
executionId: '',
|
|
1180
|
+
output: null,
|
|
1181
|
+
success: false,
|
|
1182
|
+
};
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ExecuteWorkflowCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1186
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ExecuteWorkflowCommand }); }
|
|
1187
|
+
}
|
|
1188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: ExecuteWorkflowCommand, decorators: [{
|
|
1189
|
+
type: Injectable
|
|
1190
|
+
}] });
|
|
1191
|
+
|
|
1192
|
+
var index = /*#__PURE__*/Object.freeze({
|
|
1193
|
+
__proto__: null,
|
|
1194
|
+
ExecuteWorkflowCommand: ExecuteWorkflowCommand
|
|
1195
|
+
});
|
|
1196
|
+
|
|
1197
|
+
async function factory(injector) {
|
|
1198
|
+
const dataService = injector.get(AXMWorkflowManagementWorkflowDefinitionEntityService);
|
|
1199
|
+
const entityDef = {
|
|
1200
|
+
module: RootConfig.module.name,
|
|
1201
|
+
name: RootConfig.entities.workflowDefinition.name,
|
|
1202
|
+
title: RootConfig.entities.workflowDefinition.title,
|
|
1203
|
+
icon: RootConfig.entities.workflowDefinition.icon,
|
|
1204
|
+
formats: {
|
|
1205
|
+
individual: RootConfig.entities.workflowDefinition.title,
|
|
1206
|
+
plural: RootConfig.entities.workflowDefinition.titlePlural,
|
|
1207
|
+
displayName: '{{ name }}',
|
|
1208
|
+
searchResult: {
|
|
1209
|
+
title: '{{ name }}',
|
|
1210
|
+
description: '{{ description }}',
|
|
1211
|
+
},
|
|
1212
|
+
},
|
|
1213
|
+
plugins: [
|
|
1214
|
+
{ name: 'history' },
|
|
1215
|
+
{ name: 'lock' },
|
|
1216
|
+
{ name: 'archive' },
|
|
1217
|
+
],
|
|
1218
|
+
groups: [
|
|
1219
|
+
{
|
|
1220
|
+
id: 'basicInfo',
|
|
1221
|
+
title: '@workflow-management:workflow-definitions.entities.workflow-definition.groups.basic-info',
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
id: 'configuration',
|
|
1225
|
+
title: '@workflow-management:workflow-definitions.entities.workflow-definition.groups.configuration',
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
id: 'metadata',
|
|
1229
|
+
title: '@workflow-management:workflow-definitions.entities.workflow-definition.groups.metadata',
|
|
1230
|
+
},
|
|
1231
|
+
],
|
|
1232
|
+
properties: [
|
|
1233
|
+
{
|
|
1234
|
+
name: 'id',
|
|
1235
|
+
title: 'ID',
|
|
1236
|
+
groupId: 'metadata',
|
|
1237
|
+
schema: {
|
|
1238
|
+
dataType: 'uuid',
|
|
1239
|
+
hidden: true,
|
|
1240
|
+
nullable: false,
|
|
1241
|
+
readonly: true,
|
|
1242
|
+
unique: { enabled: true },
|
|
1243
|
+
},
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
name: 'definitionId',
|
|
1247
|
+
title: '@workflow-management:workflow-definitions.entities.workflow-definition.fields.definition-id.title',
|
|
1248
|
+
groupId: 'basicInfo',
|
|
1249
|
+
schema: {
|
|
1250
|
+
dataType: 'string',
|
|
1251
|
+
interface: {
|
|
1252
|
+
type: AXPWidgetsCatalog.text,
|
|
1253
|
+
options: {
|
|
1254
|
+
placeholder: '@workflow-management:workflow-definitions.entities.workflow-definition.fields.definition-id.placeholder',
|
|
1255
|
+
},
|
|
1256
|
+
},
|
|
1257
|
+
},
|
|
1258
|
+
options: {
|
|
1259
|
+
sort: { enabled: true },
|
|
1260
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
1261
|
+
},
|
|
1262
|
+
validations: [{ rule: 'required' }],
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
name: 'name',
|
|
1266
|
+
title: '@workflow-management:workflow-definitions.entities.workflow-definition.fields.name.title',
|
|
1267
|
+
groupId: 'basicInfo',
|
|
1268
|
+
schema: {
|
|
1269
|
+
dataType: 'string',
|
|
1270
|
+
interface: {
|
|
1271
|
+
type: AXPWidgetsCatalog.text,
|
|
1272
|
+
options: {
|
|
1273
|
+
placeholder: '@workflow-management:workflow-definitions.entities.workflow-definition.fields.name.placeholder',
|
|
1274
|
+
},
|
|
1275
|
+
},
|
|
1276
|
+
},
|
|
1277
|
+
options: {
|
|
1278
|
+
sort: { enabled: true },
|
|
1279
|
+
filter: { advance: { enabled: true }, inline: { enabled: true } },
|
|
1280
|
+
},
|
|
1281
|
+
validations: [{ rule: 'required' }],
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
name: 'description',
|
|
1285
|
+
title: '@workflow-management:workflow-definitions.entities.workflow-definition.fields.description.title',
|
|
1286
|
+
groupId: 'basicInfo',
|
|
1287
|
+
schema: {
|
|
1288
|
+
dataType: 'string',
|
|
1289
|
+
interface: {
|
|
1290
|
+
type: AXPWidgetsList.Editors.LargeTextBox,
|
|
1291
|
+
options: {
|
|
1292
|
+
rows: 3,
|
|
1293
|
+
placeholder: '@workflow-management:workflow-definitions.entities.workflow-definition.fields.description.placeholder',
|
|
1294
|
+
},
|
|
1295
|
+
},
|
|
1296
|
+
},
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
name: 'version',
|
|
1300
|
+
title: '@workflow-management:workflow-definitions.entities.workflow-definition.fields.version.title',
|
|
1301
|
+
groupId: 'metadata',
|
|
1302
|
+
schema: {
|
|
1303
|
+
dataType: 'number',
|
|
1304
|
+
interface: {
|
|
1305
|
+
type: AXPWidgetsCatalog.number,
|
|
1306
|
+
},
|
|
1307
|
+
readonly: true,
|
|
1308
|
+
},
|
|
1309
|
+
options: {
|
|
1310
|
+
sort: { enabled: true },
|
|
1311
|
+
filter: { advance: { enabled: true } },
|
|
1312
|
+
},
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
name: 'isLatest',
|
|
1316
|
+
title: '@workflow-management:workflow-definitions.entities.workflow-definition.fields.is-latest.title',
|
|
1317
|
+
groupId: 'metadata',
|
|
1318
|
+
schema: {
|
|
1319
|
+
dataType: 'boolean',
|
|
1320
|
+
interface: {
|
|
1321
|
+
type: AXPWidgetsCatalog.toggle,
|
|
1322
|
+
},
|
|
1323
|
+
readonly: true,
|
|
1324
|
+
},
|
|
1325
|
+
options: {
|
|
1326
|
+
filter: { inline: { enabled: true } },
|
|
1327
|
+
},
|
|
1328
|
+
},
|
|
1329
|
+
{
|
|
1330
|
+
name: 'isPublished',
|
|
1331
|
+
title: '@workflow-management:workflow-definitions.entities.workflow-definition.fields.is-published.title',
|
|
1332
|
+
groupId: 'configuration',
|
|
1333
|
+
schema: {
|
|
1334
|
+
dataType: 'boolean',
|
|
1335
|
+
interface: {
|
|
1336
|
+
type: AXPWidgetsCatalog.toggle,
|
|
1337
|
+
},
|
|
1338
|
+
},
|
|
1339
|
+
options: {
|
|
1340
|
+
filter: { inline: { enabled: true } },
|
|
1341
|
+
},
|
|
1342
|
+
},
|
|
1343
|
+
{
|
|
1344
|
+
name: 'isReadonly',
|
|
1345
|
+
title: '@workflow-management:workflow-definitions.entities.workflow-definition.fields.is-readonly.title',
|
|
1346
|
+
groupId: 'configuration',
|
|
1347
|
+
schema: {
|
|
1348
|
+
dataType: 'boolean',
|
|
1349
|
+
interface: {
|
|
1350
|
+
type: AXPWidgetsCatalog.toggle,
|
|
1351
|
+
},
|
|
1352
|
+
},
|
|
1353
|
+
},
|
|
1354
|
+
{
|
|
1355
|
+
name: 'isSystem',
|
|
1356
|
+
title: '@workflow-management:workflow-definitions.entities.workflow-definition.fields.is-system.title',
|
|
1357
|
+
groupId: 'configuration',
|
|
1358
|
+
schema: {
|
|
1359
|
+
dataType: 'boolean',
|
|
1360
|
+
interface: {
|
|
1361
|
+
type: AXPWidgetsCatalog.toggle,
|
|
1362
|
+
},
|
|
1363
|
+
readonly: true,
|
|
1364
|
+
},
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
name: 'createdAt',
|
|
1368
|
+
title: '@workflow-management:workflow-definitions.entities.workflow-definition.fields.created-at.title',
|
|
1369
|
+
groupId: 'metadata',
|
|
1370
|
+
schema: {
|
|
1371
|
+
dataType: 'date',
|
|
1372
|
+
interface: {
|
|
1373
|
+
type: AXPWidgetsCatalog.dateTime,
|
|
1374
|
+
},
|
|
1375
|
+
readonly: true,
|
|
1376
|
+
},
|
|
1377
|
+
options: {
|
|
1378
|
+
sort: { enabled: true },
|
|
1379
|
+
filter: { advance: { enabled: true } },
|
|
1380
|
+
},
|
|
1381
|
+
},
|
|
1382
|
+
],
|
|
1383
|
+
columns: [
|
|
1384
|
+
{
|
|
1385
|
+
name: 'name',
|
|
1386
|
+
title: '@workflow-management:workflow-definitions.entities.workflow-definition.fields.name.title',
|
|
1387
|
+
showAs: { type: AXPWidgetsCatalog.text },
|
|
1388
|
+
},
|
|
1389
|
+
{
|
|
1390
|
+
name: 'definitionId',
|
|
1391
|
+
title: '@workflow-management:workflow-definitions.entities.workflow-definition.fields.definition-id.title',
|
|
1392
|
+
showAs: { type: AXPWidgetsCatalog.text },
|
|
1393
|
+
},
|
|
1394
|
+
{
|
|
1395
|
+
name: 'version',
|
|
1396
|
+
title: '@workflow-management:workflow-definitions.entities.workflow-definition.fields.version.title',
|
|
1397
|
+
showAs: { type: AXPWidgetsCatalog.number },
|
|
1398
|
+
options: { width: '100px' },
|
|
1399
|
+
},
|
|
1400
|
+
{
|
|
1401
|
+
name: 'isLatest',
|
|
1402
|
+
title: '@workflow-management:workflow-definitions.entities.workflow-definition.fields.is-latest.title',
|
|
1403
|
+
showAs: { type: AXPWidgetsCatalog.toggle, options: { trueText: 'Latest', falseText: '-' } },
|
|
1404
|
+
options: { width: '100px' },
|
|
1405
|
+
},
|
|
1406
|
+
{
|
|
1407
|
+
name: 'isPublished',
|
|
1408
|
+
title: '@workflow-management:workflow-definitions.entities.workflow-definition.fields.is-published.title',
|
|
1409
|
+
showAs: { type: AXPWidgetsCatalog.toggle },
|
|
1410
|
+
options: { width: '120px' },
|
|
1411
|
+
},
|
|
1412
|
+
{
|
|
1413
|
+
name: 'createdAt',
|
|
1414
|
+
title: '@workflow-management:workflow-definitions.entities.workflow-definition.fields.created-at.title',
|
|
1415
|
+
showAs: { type: AXPWidgetsCatalog.dateTime },
|
|
1416
|
+
options: { width: '180px' },
|
|
1417
|
+
},
|
|
1418
|
+
],
|
|
1419
|
+
commands: {
|
|
1420
|
+
create: {
|
|
1421
|
+
execute: async (data) => ({ id: await dataService.insertOne(data) }),
|
|
1422
|
+
},
|
|
1423
|
+
delete: {
|
|
1424
|
+
execute: async (id) => await dataService.deleteOne(id),
|
|
1425
|
+
},
|
|
1426
|
+
update: {
|
|
1427
|
+
execute: async (data) => await dataService.updateOne(data.id, data),
|
|
1428
|
+
},
|
|
1429
|
+
},
|
|
1430
|
+
queries: {
|
|
1431
|
+
byKey: {
|
|
1432
|
+
execute: async (id) => {
|
|
1433
|
+
const item = await dataService.getOne(id);
|
|
1434
|
+
return item;
|
|
1435
|
+
},
|
|
1436
|
+
type: AXPEntityQueryType.Single,
|
|
1437
|
+
},
|
|
1438
|
+
list: {
|
|
1439
|
+
execute: async (e) => {
|
|
1440
|
+
return await dataService.query(e);
|
|
1441
|
+
},
|
|
1442
|
+
type: AXPEntityQueryType.List,
|
|
1443
|
+
},
|
|
1444
|
+
},
|
|
1445
|
+
interfaces: {
|
|
1446
|
+
master: {
|
|
1447
|
+
create: {
|
|
1448
|
+
sections: [{ id: 'basicInfo' }, { id: 'configuration' }],
|
|
1449
|
+
properties: [
|
|
1450
|
+
{ name: 'definitionId', layout: { positions: { lg: { colSpan: 6 } } } },
|
|
1451
|
+
{ name: 'name', layout: { positions: { lg: { colSpan: 6 } } } },
|
|
1452
|
+
{ name: 'description', layout: { positions: { lg: { colSpan: 12 } } } },
|
|
1453
|
+
{ name: 'isPublished', layout: { positions: { lg: { colSpan: 4 } } } },
|
|
1454
|
+
{ name: 'isReadonly', layout: { positions: { lg: { colSpan: 4 } } } },
|
|
1455
|
+
],
|
|
1456
|
+
},
|
|
1457
|
+
update: {
|
|
1458
|
+
sections: [{ id: 'basicInfo' }, { id: 'configuration' }],
|
|
1459
|
+
properties: [
|
|
1460
|
+
{ name: 'definitionId', layout: { positions: { lg: { colSpan: 6 } } } },
|
|
1461
|
+
{ name: 'name', layout: { positions: { lg: { colSpan: 6 } } } },
|
|
1462
|
+
{ name: 'description', layout: { positions: { lg: { colSpan: 12 } } } },
|
|
1463
|
+
{ name: 'isPublished', layout: { positions: { lg: { colSpan: 4 } } } },
|
|
1464
|
+
{ name: 'isReadonly', layout: { positions: { lg: { colSpan: 4 } } } },
|
|
1465
|
+
],
|
|
1466
|
+
},
|
|
1467
|
+
single: {
|
|
1468
|
+
title: '{{ name }}',
|
|
1469
|
+
sections: [
|
|
1470
|
+
{ id: 'basicInfo', order: 1, layout: { positions: { lg: { colSpan: 12 } } } },
|
|
1471
|
+
{ id: 'configuration', order: 2, layout: { positions: { lg: { colSpan: 6 } } } },
|
|
1472
|
+
{ id: 'metadata', order: 3, layout: { positions: { lg: { colSpan: 6 } } } },
|
|
1473
|
+
],
|
|
1474
|
+
properties: [
|
|
1475
|
+
{ name: 'definitionId', layout: { positions: { lg: { colSpan: 6 } } } },
|
|
1476
|
+
{ name: 'name', layout: { positions: { lg: { colSpan: 6 } } } },
|
|
1477
|
+
{ name: 'description', layout: { positions: { lg: { colSpan: 12 } } } },
|
|
1478
|
+
{ name: 'version', layout: { positions: { lg: { colSpan: 6 } } } },
|
|
1479
|
+
{ name: 'isLatest', layout: { positions: { lg: { colSpan: 6 } } } },
|
|
1480
|
+
{ name: 'isPublished', layout: { positions: { lg: { colSpan: 6 } } } },
|
|
1481
|
+
{ name: 'isReadonly', layout: { positions: { lg: { colSpan: 6 } } } },
|
|
1482
|
+
{ name: 'isSystem', layout: { positions: { lg: { colSpan: 6 } } } },
|
|
1483
|
+
{ name: 'createdAt', layout: { positions: { lg: { colSpan: 6 } } } },
|
|
1484
|
+
],
|
|
1485
|
+
actions: [...entityMasterRecordActions()],
|
|
1486
|
+
},
|
|
1487
|
+
list: {
|
|
1488
|
+
actions: [
|
|
1489
|
+
...entityMasterCrudActions(),
|
|
1490
|
+
{
|
|
1491
|
+
title: '@workflow-management:workflow-definitions.actions.execute.title',
|
|
1492
|
+
name: 'execute-workflow',
|
|
1493
|
+
command: {
|
|
1494
|
+
name: 'WorkflowManagement.WorkflowDefinition:Execute',
|
|
1495
|
+
options: {
|
|
1496
|
+
definitionId: '{{ context.eval("definitionId") }}',
|
|
1497
|
+
input: {},
|
|
1498
|
+
},
|
|
1499
|
+
},
|
|
1500
|
+
icon: 'fa-light fa-play',
|
|
1501
|
+
color: 'success',
|
|
1502
|
+
priority: 'primary',
|
|
1503
|
+
type: 'execute',
|
|
1504
|
+
scope: AXPEntityCommandScope.Individual,
|
|
1505
|
+
},
|
|
1506
|
+
],
|
|
1507
|
+
views: [createAllQueryView({ sorts: [{ name: 'createdAt', dir: 'desc' }] })],
|
|
1508
|
+
},
|
|
1509
|
+
},
|
|
1510
|
+
},
|
|
1511
|
+
};
|
|
1512
|
+
return entityDef;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
var workflowDefinition_entity = /*#__PURE__*/Object.freeze({
|
|
1516
|
+
__proto__: null,
|
|
1517
|
+
factory: factory
|
|
1518
|
+
});
|
|
1519
|
+
|
|
973
1520
|
class AXMWorkflowManagementModule {
|
|
974
1521
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AXMWorkflowManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
975
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.10", ngImport: i0, type: AXMWorkflowManagementModule, imports: [AXMCalendarManagementModule,
|
|
1522
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.10", ngImport: i0, type: AXMWorkflowManagementModule, imports: [AXMCalendarManagementModule,
|
|
1523
|
+
AXMSignPluginModule,
|
|
1524
|
+
AXPDistributionPluginModule,
|
|
1525
|
+
AXMWorkflowManagementWorkflowDefinitionEntityModule] }); }
|
|
976
1526
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AXMWorkflowManagementModule, providers: [
|
|
1527
|
+
provideCommandSetups([
|
|
1528
|
+
{
|
|
1529
|
+
key: 'WorkflowManagement.WorkflowDefinition:Execute',
|
|
1530
|
+
command: () => Promise.resolve().then(function () { return index; }).then((c) => c.ExecuteWorkflowCommand),
|
|
1531
|
+
},
|
|
1532
|
+
]),
|
|
977
1533
|
{
|
|
978
1534
|
provide: AXP_MENU_PROVIDER,
|
|
979
1535
|
useClass: AXMMenuProvider,
|
|
@@ -987,13 +1543,32 @@ class AXMWorkflowManagementModule {
|
|
|
987
1543
|
},
|
|
988
1544
|
multi: true,
|
|
989
1545
|
},
|
|
990
|
-
|
|
1546
|
+
{
|
|
1547
|
+
provide: AXP_ENTITY_DEFINITION_LOADER,
|
|
1548
|
+
useClass: AXMWorkflowManagementModuleEntityProvider,
|
|
1549
|
+
multi: true,
|
|
1550
|
+
},
|
|
1551
|
+
], imports: [AXMCalendarManagementModule,
|
|
1552
|
+
AXMSignPluginModule,
|
|
1553
|
+
AXPDistributionPluginModule,
|
|
1554
|
+
AXMWorkflowManagementWorkflowDefinitionEntityModule] }); }
|
|
991
1555
|
}
|
|
992
1556
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: AXMWorkflowManagementModule, decorators: [{
|
|
993
1557
|
type: NgModule,
|
|
994
1558
|
args: [{
|
|
995
|
-
imports: [
|
|
1559
|
+
imports: [
|
|
1560
|
+
AXMCalendarManagementModule,
|
|
1561
|
+
AXMSignPluginModule,
|
|
1562
|
+
AXPDistributionPluginModule,
|
|
1563
|
+
AXMWorkflowManagementWorkflowDefinitionEntityModule,
|
|
1564
|
+
],
|
|
996
1565
|
providers: [
|
|
1566
|
+
provideCommandSetups([
|
|
1567
|
+
{
|
|
1568
|
+
key: 'WorkflowManagement.WorkflowDefinition:Execute',
|
|
1569
|
+
command: () => Promise.resolve().then(function () { return index; }).then((c) => c.ExecuteWorkflowCommand),
|
|
1570
|
+
},
|
|
1571
|
+
]),
|
|
997
1572
|
{
|
|
998
1573
|
provide: AXP_MENU_PROVIDER,
|
|
999
1574
|
useClass: AXMMenuProvider,
|
|
@@ -1007,6 +1582,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
1007
1582
|
},
|
|
1008
1583
|
multi: true,
|
|
1009
1584
|
},
|
|
1585
|
+
{
|
|
1586
|
+
provide: AXP_ENTITY_DEFINITION_LOADER,
|
|
1587
|
+
useClass: AXMWorkflowManagementModuleEntityProvider,
|
|
1588
|
+
multi: true,
|
|
1589
|
+
},
|
|
1010
1590
|
],
|
|
1011
1591
|
}]
|
|
1012
1592
|
}] });
|
|
@@ -1015,5 +1595,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
1015
1595
|
* Generated bundle index. Do not edit.
|
|
1016
1596
|
*/
|
|
1017
1597
|
|
|
1018
|
-
export { AXMCommonCreateDistributionRecordsAction, AXMCommonDistributionPopupAction, AXMCommonDistributionWorkflow, AXMMenuProvider, AXMSignPluginModule, AXMSignPopupAction, AXMSignWorkflow, AXMWorkflowManagementModule, AXPDistributionPluginModule, distributionPlugin, signPlugin };
|
|
1598
|
+
export { AXMCommonCreateDistributionRecordsAction, AXMCommonDistributionPopupAction, AXMCommonDistributionWorkflow, AXMMenuProvider, AXMSignPluginModule, AXMSignPopupAction, AXMSignWorkflow, AXMWorkflowManagementModule, AXMWorkflowManagementModuleEntityProvider, AXMWorkflowManagementWorkflowDefinitionEntityModule, AXMWorkflowManagementWorkflowDefinitionEntityService, AXMWorkflowManagementWorkflowDefinitionEntityServiceImpl, AXPDistributionPluginModule, ExecuteWorkflowCommand, RootConfig, distributionPlugin, signPlugin, factory as workflowDefinitionEntityFactory };
|
|
1019
1599
|
//# sourceMappingURL=acorex-modules-workflow-management.mjs.map
|