@acorex/platform 21.0.0-beta.1 → 21.0.0-beta.11
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/fesm2022/acorex-platform-auth.mjs +4 -0
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/{acorex-platform-common-common-settings.provider-G9XcXXOG.mjs → acorex-platform-common-common-settings.provider-Bi1RYif5.mjs} +58 -22
- package/fesm2022/acorex-platform-common-common-settings.provider-Bi1RYif5.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +275 -130
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +106 -5
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +104 -13
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +224 -6
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +37 -2
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +1107 -72
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +7 -5
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +72 -6
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +181 -158
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +65 -2
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +121 -15
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-settings.provider-D13QB3Hr.mjs → acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs} +23 -24
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +2 -2
- package/fesm2022/acorex-platform-workflow.mjs +85 -4
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/package.json +7 -9
- package/types/acorex-platform-common.d.ts +105 -52
- package/types/acorex-platform-core.d.ts +26 -3
- package/types/acorex-platform-layout-builder.d.ts +26 -3
- package/types/acorex-platform-layout-components.d.ts +52 -1
- package/types/acorex-platform-layout-entity.d.ts +262 -8
- package/types/acorex-platform-layout-widget-core.d.ts +15 -0
- package/types/acorex-platform-layout-widgets.d.ts +33 -23
- package/types/acorex-platform-runtime.d.ts +6 -0
- package/types/acorex-platform-themes-default.d.ts +8 -0
- package/types/acorex-platform-workflow.d.ts +68 -2
- package/fesm2022/acorex-platform-common-common-settings.provider-G9XcXXOG.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-settings.provider-D13QB3Hr.mjs.map +0 -1
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { AXPThemeMode, AXPThemeLayoutSetting } from './acorex-platform-themes-shared.mjs';
|
|
2
|
-
import { AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';
|
|
3
1
|
import { objectKeyValueTransforms, AXPPlatformScope } from '@acorex/platform/core';
|
|
4
|
-
import {
|
|
2
|
+
import { AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';
|
|
3
|
+
import { AXPThemeMode, AXPThemeLayoutSetting } from './acorex-platform-themes-shared.mjs';
|
|
5
4
|
|
|
5
|
+
const I18N = '@layout:settings.appearance';
|
|
6
6
|
class AXPThemeSettingProvider {
|
|
7
|
-
constructor(
|
|
8
|
-
this.
|
|
9
|
-
this.translateService = this.injector.get(AXTranslationService);
|
|
7
|
+
constructor(_injector) {
|
|
8
|
+
this._injector = _injector;
|
|
10
9
|
}
|
|
11
10
|
async provide(context) {
|
|
12
|
-
const trans = async (key) => await this.translateService.translateAsync(`@layout:settings.appearance.${key}`);
|
|
13
11
|
// Define the 'Appearance Settings' group
|
|
14
|
-
context
|
|
12
|
+
context
|
|
13
|
+
.addGroup('appearance', `${I18N}.nav-title`, `${I18N}.description`, 'fa-light fa-palette', `${I18N}.title`)
|
|
15
14
|
// Add the 'Brightness & Color' section
|
|
16
|
-
.addSection('color',
|
|
15
|
+
.addSection('color', `${I18N}.items.color.title`, `${I18N}.items.color.description`)
|
|
17
16
|
// Add the 'Theme Mode' setting
|
|
18
17
|
.addSetting({
|
|
19
18
|
key: AXPThemeLayoutSetting.Mode,
|
|
20
|
-
title:
|
|
19
|
+
title: `${I18N}.items.color.mode.title`,
|
|
21
20
|
scope: AXPPlatformScope.User,
|
|
22
21
|
isInherited: true,
|
|
23
22
|
defaultValue: AXPThemeMode.Light,
|
|
@@ -35,11 +34,11 @@ class AXPThemeSettingProvider {
|
|
|
35
34
|
},
|
|
36
35
|
},
|
|
37
36
|
},
|
|
38
|
-
description:
|
|
37
|
+
description: `${I18N}.items.color.mode.description`,
|
|
39
38
|
})
|
|
40
39
|
.addSetting({
|
|
41
40
|
key: AXPThemeLayoutSetting.Palette,
|
|
42
|
-
title:
|
|
41
|
+
title: `${I18N}.items.color.palette.title`,
|
|
43
42
|
scope: AXPPlatformScope.User,
|
|
44
43
|
isInherited: true,
|
|
45
44
|
defaultValue: 'default',
|
|
@@ -57,16 +56,16 @@ class AXPThemeSettingProvider {
|
|
|
57
56
|
},
|
|
58
57
|
},
|
|
59
58
|
},
|
|
60
|
-
description:
|
|
59
|
+
description: `${I18N}.items.color.palette.description`,
|
|
61
60
|
})
|
|
62
61
|
// End the 'Brightness & Color' section
|
|
63
62
|
.endSection()
|
|
64
63
|
// Add the 'Root Menu' section
|
|
65
|
-
.addSection('root-menu',
|
|
64
|
+
.addSection('root-menu', `${I18N}.items.root-menu.title`, `${I18N}.items.root-menu.description`)
|
|
66
65
|
// Add the 'Menu Orientation' setting
|
|
67
66
|
.addSetting({
|
|
68
67
|
key: AXPThemeLayoutSetting.MenuOrientation,
|
|
69
|
-
title:
|
|
68
|
+
title: `${I18N}.items.root-menu.title`,
|
|
70
69
|
scope: AXPPlatformScope.User,
|
|
71
70
|
isInherited: true,
|
|
72
71
|
defaultValue: 'vertical',
|
|
@@ -84,12 +83,12 @@ class AXPThemeSettingProvider {
|
|
|
84
83
|
},
|
|
85
84
|
},
|
|
86
85
|
},
|
|
87
|
-
description:
|
|
86
|
+
description: `${I18N}.items.root-menu.description`,
|
|
88
87
|
})
|
|
89
88
|
// Add the 'Menu Badge Visibility' setting
|
|
90
89
|
.addSetting({
|
|
91
90
|
key: AXPThemeLayoutSetting.MenuBadgeVisible,
|
|
92
|
-
title:
|
|
91
|
+
title: `${I18N}.items.root-menu.badge.title`,
|
|
93
92
|
scope: AXPPlatformScope.User,
|
|
94
93
|
isInherited: true,
|
|
95
94
|
defaultValue: true,
|
|
@@ -106,15 +105,15 @@ class AXPThemeSettingProvider {
|
|
|
106
105
|
},
|
|
107
106
|
},
|
|
108
107
|
},
|
|
109
|
-
description:
|
|
108
|
+
description: `${I18N}.items.root-menu.badge.description`,
|
|
110
109
|
})
|
|
111
110
|
.endSection()
|
|
112
111
|
// Add the 'Scale & Layout' section
|
|
113
|
-
.addSection('layout',
|
|
112
|
+
.addSection('layout', `${I18N}.items.layout.title`, `${I18N}.items.layout.description`)
|
|
114
113
|
// Add the 'Font Style' setting
|
|
115
114
|
.addSetting({
|
|
116
115
|
key: AXPThemeLayoutSetting.Font,
|
|
117
|
-
title:
|
|
116
|
+
title: `${I18N}.items.layout.font.title`,
|
|
118
117
|
scope: AXPPlatformScope.User,
|
|
119
118
|
isInherited: true,
|
|
120
119
|
defaultValue: 'system-ui',
|
|
@@ -132,12 +131,12 @@ class AXPThemeSettingProvider {
|
|
|
132
131
|
},
|
|
133
132
|
},
|
|
134
133
|
},
|
|
135
|
-
description:
|
|
134
|
+
description: `${I18N}.items.layout.font.description`,
|
|
136
135
|
})
|
|
137
136
|
// Add the 'Font Size' setting
|
|
138
137
|
.addSetting({
|
|
139
138
|
key: AXPThemeLayoutSetting.FontSize,
|
|
140
|
-
title:
|
|
139
|
+
title: `${I18N}.items.layout.size.title`,
|
|
141
140
|
scope: AXPPlatformScope.User,
|
|
142
141
|
isInherited: true,
|
|
143
142
|
defaultValue: 'medium',
|
|
@@ -155,7 +154,7 @@ class AXPThemeSettingProvider {
|
|
|
155
154
|
},
|
|
156
155
|
},
|
|
157
156
|
},
|
|
158
|
-
description:
|
|
157
|
+
description: `${I18N}.items.layout.size.description`,
|
|
159
158
|
})
|
|
160
159
|
// End the 'Scale & Layout' section
|
|
161
160
|
.endSection()
|
|
@@ -165,4 +164,4 @@ class AXPThemeSettingProvider {
|
|
|
165
164
|
}
|
|
166
165
|
|
|
167
166
|
export { AXPThemeSettingProvider };
|
|
168
|
-
//# sourceMappingURL=acorex-platform-themes-shared-settings.provider-
|
|
167
|
+
//# sourceMappingURL=acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs","sources":["../../../../libs/platform/themes/shared/src/lib/settings.provider.ts"],"sourcesContent":["import { Injector } from '@angular/core';\nimport { AXPSettingDefinitionProvider, AXPSettingDefinitionProviderContext } from '@acorex/platform/common';\nimport { AXPPlatformScope, objectKeyValueTransforms } from '@acorex/platform/core';\nimport { AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';\nimport { AXPThemeLayoutSetting } from './settings.keys';\nimport { AXPThemeMode } from './theme.types';\n\nconst I18N = '@layout:settings.appearance';\n\nexport class AXPThemeSettingProvider implements AXPSettingDefinitionProvider {\n constructor(private _injector: Injector) {}\n\n async provide(context: AXPSettingDefinitionProviderContext): Promise<void> {\n // Define the 'Appearance Settings' group\n context\n .addGroup(\n 'appearance',\n `${I18N}.nav-title`,\n `${I18N}.description`,\n 'fa-light fa-palette',\n `${I18N}.title`,\n )\n\n // Add the 'Brightness & Color' section\n .addSection('color', `${I18N}.items.color.title`, `${I18N}.items.color.description`)\n\n // Add the 'Theme Mode' setting\n .addSetting({\n key: AXPThemeLayoutSetting.Mode,\n title: `${I18N}.items.color.mode.title`,\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: AXPThemeMode.Light,\n valueTransforms: objectKeyValueTransforms('id'),\n widget: {\n type: AXPWidgetsCatalog.themeModeChooser,\n layout: {\n positions: {\n sm: {\n colSpan: 12,\n },\n md: {\n colSpan: 6,\n },\n },\n },\n },\n description: `${I18N}.items.color.mode.description`,\n })\n\n .addSetting({\n key: AXPThemeLayoutSetting.Palette,\n title: `${I18N}.items.color.palette.title`,\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: 'default',\n valueTransforms: objectKeyValueTransforms('name'),\n widget: {\n type: 'theme-palette-chooser',\n layout: {\n positions: {\n sm: {\n colSpan: 12,\n },\n xxl: {\n colSpan: 9,\n },\n },\n },\n },\n description: `${I18N}.items.color.palette.description`,\n })\n\n // End the 'Brightness & Color' section\n .endSection()\n\n // Add the 'Root Menu' section\n .addSection('root-menu', `${I18N}.items.root-menu.title`, `${I18N}.items.root-menu.description`)\n\n // Add the 'Menu Orientation' setting\n .addSetting({\n key: AXPThemeLayoutSetting.MenuOrientation,\n title: `${I18N}.items.root-menu.title`,\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: 'vertical',\n valueTransforms: objectKeyValueTransforms('id'),\n widget: {\n type: AXPWidgetsCatalog.menuOrientationChooser,\n layout: {\n positions: {\n sm: {\n colSpan: 12,\n },\n md: {\n colSpan: 6,\n },\n },\n },\n },\n description: `${I18N}.items.root-menu.description`,\n })\n\n // Add the 'Menu Badge Visibility' setting\n .addSetting({\n key: AXPThemeLayoutSetting.MenuBadgeVisible,\n title: `${I18N}.items.root-menu.badge.title`,\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: true,\n widget: {\n type: AXPWidgetsCatalog.toggle,\n layout: {\n positions: {\n sm: {\n colSpan: 12,\n },\n md: {\n colSpan: 6,\n },\n },\n },\n },\n description: `${I18N}.items.root-menu.badge.description`,\n })\n .endSection()\n\n // Add the 'Scale & Layout' section\n .addSection('layout', `${I18N}.items.layout.title`, `${I18N}.items.layout.description`)\n\n // Add the 'Font Style' setting\n .addSetting({\n key: AXPThemeLayoutSetting.Font,\n title: `${I18N}.items.layout.font.title`,\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: 'system-ui',\n valueTransforms: objectKeyValueTransforms('id'),\n widget: {\n type: AXPWidgetsCatalog.fontStyleChooser,\n layout: {\n positions: {\n sm: {\n colSpan: 12,\n },\n md: {\n colSpan: 6,\n },\n },\n },\n },\n description: `${I18N}.items.layout.font.description`,\n })\n\n // Add the 'Font Size' setting\n .addSetting({\n key: AXPThemeLayoutSetting.FontSize,\n title: `${I18N}.items.layout.size.title`,\n scope: AXPPlatformScope.User,\n isInherited: true,\n defaultValue: 'medium',\n valueTransforms: objectKeyValueTransforms('id'),\n widget: {\n type: AXPWidgetsCatalog.fontSizeChooser,\n layout: {\n positions: {\n sm: {\n colSpan: 12,\n },\n md: {\n colSpan: 6,\n },\n },\n },\n },\n description: `${I18N}.items.layout.size.description`,\n })\n\n // End the 'Scale & Layout' section\n .endSection()\n\n // End the 'Appearance Settings' group\n .endGroup();\n }\n}\n"],"names":[],"mappings":";;;;AAOA,MAAM,IAAI,GAAG,6BAA6B;MAE7B,uBAAuB,CAAA;AAClC,IAAA,WAAA,CAAoB,SAAmB,EAAA;QAAnB,IAAA,CAAA,SAAS,GAAT,SAAS;IAAa;IAE1C,MAAM,OAAO,CAAC,OAA4C,EAAA;;QAExD;AACG,aAAA,QAAQ,CACP,YAAY,EACZ,CAAA,EAAG,IAAI,YAAY,EACnB,CAAA,EAAG,IAAI,CAAA,YAAA,CAAc,EACrB,qBAAqB,EACrB,CAAA,EAAG,IAAI,QAAQ;;aAIhB,UAAU,CAAC,OAAO,EAAE,CAAA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AAE;AACN,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,EAAE;AACF,4BAAA,OAAO,EAAE,EAAE;AACZ,yBAAA;AACD,wBAAA,EAAE,EAAE;AACF,4BAAA,OAAO,EAAE,CAAC;AACX,yBAAA;AACF,qBAAA;AACF,iBAAA;AACF,aAAA;YACD,WAAW,EAAE,CAAA,EAAG,IAAI,CAAA,8BAAA,CAAgC;SACrD;;AAGA,aAAA,UAAU;;AAGV,aAAA,QAAQ,EAAE;IACf;AACD;;;;"}
|
|
@@ -2170,7 +2170,7 @@ class AXPThemesSharedModule {
|
|
|
2170
2170
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
|
2171
2171
|
useFactory: async () => {
|
|
2172
2172
|
const injector = inject(Injector);
|
|
2173
|
-
const provider = (await import('./acorex-platform-themes-shared-settings.provider-
|
|
2173
|
+
const provider = (await import('./acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs')).AXPThemeSettingProvider;
|
|
2174
2174
|
return new provider(injector);
|
|
2175
2175
|
},
|
|
2176
2176
|
multi: true,
|
|
@@ -2210,7 +2210,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2210
2210
|
provide: AXP_SETTING_DEFINITION_PROVIDER,
|
|
2211
2211
|
useFactory: async () => {
|
|
2212
2212
|
const injector = inject(Injector);
|
|
2213
|
-
const provider = (await import('./acorex-platform-themes-shared-settings.provider-
|
|
2213
|
+
const provider = (await import('./acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs')).AXPThemeSettingProvider;
|
|
2214
2214
|
return new provider(injector);
|
|
2215
2215
|
},
|
|
2216
2216
|
multi: true,
|
|
@@ -872,6 +872,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
872
872
|
*/
|
|
873
873
|
const AXP_WORKFLOW_ENGINE = new InjectionToken('AXP_WORKFLOW_ENGINE');
|
|
874
874
|
|
|
875
|
+
//#region ---- Error Codes ----
|
|
876
|
+
/**
|
|
877
|
+
* Stable workflow engine error codes for UI branching (toasts, take-over flow, etc.).
|
|
878
|
+
*/
|
|
879
|
+
const AXP_WORKFLOW_ERROR_CODES = {
|
|
880
|
+
TASK_NOT_ASSIGNEE: 'WORKFLOW_TASK_NOT_ASSIGNEE',
|
|
881
|
+
CLAIM_REQUIRED: 'WORKFLOW_CLAIM_REQUIRED',
|
|
882
|
+
REASSIGN_NOT_ALLOWED: 'WORKFLOW_REASSIGN_NOT_ALLOWED',
|
|
883
|
+
};
|
|
884
|
+
//#endregion
|
|
885
|
+
//#region ---- Engine Error ----
|
|
886
|
+
/**
|
|
887
|
+
* Business-rule failure from {@link AXPWorkflowEngine} (expected, user-facing).
|
|
888
|
+
*/
|
|
889
|
+
class AXPWorkflowEngineError extends Error {
|
|
890
|
+
constructor(message, code, details) {
|
|
891
|
+
super(message);
|
|
892
|
+
this.code = code;
|
|
893
|
+
this.details = details;
|
|
894
|
+
this.name = 'AXPWorkflowEngineError';
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
/**
|
|
898
|
+
* Resolves a stable error code from an unknown thrown value.
|
|
899
|
+
*/
|
|
900
|
+
function getWorkflowEngineErrorCode(error) {
|
|
901
|
+
if (error instanceof AXPWorkflowEngineError) {
|
|
902
|
+
return error.code;
|
|
903
|
+
}
|
|
904
|
+
return undefined;
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
* Resolves a user-facing message and optional code from an unknown thrown value.
|
|
908
|
+
*/
|
|
909
|
+
function getWorkflowEngineErrorInfo(error) {
|
|
910
|
+
if (error instanceof AXPWorkflowEngineError) {
|
|
911
|
+
return { message: error.message, code: error.code };
|
|
912
|
+
}
|
|
913
|
+
if (error instanceof Error) {
|
|
914
|
+
return { message: error.message };
|
|
915
|
+
}
|
|
916
|
+
return { message: 'An unexpected workflow error occurred' };
|
|
917
|
+
}
|
|
918
|
+
//#endregion
|
|
919
|
+
|
|
875
920
|
/**
|
|
876
921
|
* Activity types that use the task board (suspend until user acts via inbox), not inline interactive execution.
|
|
877
922
|
*/
|
|
@@ -1511,11 +1556,12 @@ class AXPWorkflowManager {
|
|
|
1511
1556
|
};
|
|
1512
1557
|
}
|
|
1513
1558
|
catch (error) {
|
|
1514
|
-
|
|
1559
|
+
const { message, code } = getWorkflowEngineErrorInfo(error);
|
|
1515
1560
|
return {
|
|
1516
1561
|
success: false,
|
|
1517
1562
|
instanceId,
|
|
1518
|
-
error:
|
|
1563
|
+
error: message,
|
|
1564
|
+
errorCode: code,
|
|
1519
1565
|
};
|
|
1520
1566
|
}
|
|
1521
1567
|
}
|
|
@@ -1580,13 +1626,48 @@ class AXPWorkflowManager {
|
|
|
1580
1626
|
success: result.success,
|
|
1581
1627
|
instanceId,
|
|
1582
1628
|
error: result.error,
|
|
1629
|
+
errorCode: result.errorCode,
|
|
1630
|
+
};
|
|
1631
|
+
}
|
|
1632
|
+
catch (error) {
|
|
1633
|
+
const { message, code } = getWorkflowEngineErrorInfo(error);
|
|
1634
|
+
return {
|
|
1635
|
+
success: false,
|
|
1636
|
+
instanceId,
|
|
1637
|
+
error: message,
|
|
1638
|
+
errorCode: code,
|
|
1639
|
+
};
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
/**
|
|
1643
|
+
* Reassign a human-task bookmark to the current user without advancing the workflow.
|
|
1644
|
+
* Supported only when the injected workflow engine implements {@link AXPWorkflowEngine.reassignTaskToSelf}.
|
|
1645
|
+
*/
|
|
1646
|
+
async reassignTaskToSelf(instanceId, bookmarkId, stepId) {
|
|
1647
|
+
const reassign = this.workflowEngine.reassignTaskToSelf?.bind(this.workflowEngine);
|
|
1648
|
+
if (!reassign) {
|
|
1649
|
+
return {
|
|
1650
|
+
success: false,
|
|
1651
|
+
instanceId,
|
|
1652
|
+
error: 'Reassign task is not supported by this workflow engine',
|
|
1653
|
+
};
|
|
1654
|
+
}
|
|
1655
|
+
try {
|
|
1656
|
+
const result = await reassign({ instanceId, bookmarkId, stepId });
|
|
1657
|
+
return {
|
|
1658
|
+
success: result.success,
|
|
1659
|
+
instanceId,
|
|
1660
|
+
error: result.error,
|
|
1661
|
+
errorCode: result.errorCode,
|
|
1583
1662
|
};
|
|
1584
1663
|
}
|
|
1585
1664
|
catch (error) {
|
|
1665
|
+
const { message, code } = getWorkflowEngineErrorInfo(error);
|
|
1586
1666
|
return {
|
|
1587
1667
|
success: false,
|
|
1588
1668
|
instanceId,
|
|
1589
|
-
error:
|
|
1669
|
+
error: message,
|
|
1670
|
+
errorCode: code,
|
|
1590
1671
|
};
|
|
1591
1672
|
}
|
|
1592
1673
|
}
|
|
@@ -2558,5 +2639,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
2558
2639
|
* Generated bundle index. Do not edit.
|
|
2559
2640
|
*/
|
|
2560
2641
|
|
|
2561
|
-
export { AXPActivityDefinitionService, AXPWorkflowAction, AXPWorkflowContext, AXPWorkflowDefinitionService, AXPWorkflowError, AXPWorkflowEventService, AXPWorkflowFunction, AXPWorkflowLocalEngine, AXPWorkflowManager, AXPWorkflowModule, AXPWorkflowRegistryService, AXPWorkflowService, AXP_ACTIVITY_CATEGORY_PROVIDER, AXP_ACTIVITY_PROVIDER, AXP_WORKFLOW_CATEGORY_PROVIDER, AXP_WORKFLOW_ENGINE, AXP_WORKFLOW_PROVIDER, AXP_WORKFLOW_TASK_BOARD_ACTIVITY_TYPES, ActivityExecutor, WorkflowExpressionScopeService, axpIsWorkflowTaskBoardActivityType, createWorkFlowEvent, ofType };
|
|
2642
|
+
export { AXPActivityDefinitionService, AXPWorkflowAction, AXPWorkflowContext, AXPWorkflowDefinitionService, AXPWorkflowEngineError, AXPWorkflowError, AXPWorkflowEventService, AXPWorkflowFunction, AXPWorkflowLocalEngine, AXPWorkflowManager, AXPWorkflowModule, AXPWorkflowRegistryService, AXPWorkflowService, AXP_ACTIVITY_CATEGORY_PROVIDER, AXP_ACTIVITY_PROVIDER, AXP_WORKFLOW_CATEGORY_PROVIDER, AXP_WORKFLOW_ENGINE, AXP_WORKFLOW_ERROR_CODES, AXP_WORKFLOW_PROVIDER, AXP_WORKFLOW_TASK_BOARD_ACTIVITY_TYPES, ActivityExecutor, WorkflowExpressionScopeService, axpIsWorkflowTaskBoardActivityType, createWorkFlowEvent, getWorkflowEngineErrorCode, getWorkflowEngineErrorInfo, ofType };
|
|
2562
2643
|
//# sourceMappingURL=acorex-platform-workflow.mjs.map
|