@acorex/platform 20.8.5 → 21.0.0-beta.1
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 +121 -27
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/{acorex-platform-common-common-settings.provider-41RhWqb4.mjs → acorex-platform-common-common-settings.provider-G9XcXXOG.mjs} +4 -4
- package/fesm2022/acorex-platform-common-common-settings.provider-G9XcXXOG.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +669 -268
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +333 -140
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +557 -826
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +539 -110
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-components-binding-expression-editor-popup.component-CSxCnzwU.mjs → acorex-platform-layout-components-binding-expression-editor-popup.component-CWV4XD36.mjs} +15 -15
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CWV4XD36.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-components.mjs +3285 -1035
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +488 -284
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +15955 -11978
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +410 -170
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +548 -474
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-CPBzE96V.mjs → acorex-platform-layout-widgets-button-widget-designer.component-fLjWiSFE.mjs} +11 -11
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-fLjWiSFE.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-Dtv6U3df.mjs → acorex-platform-layout-widgets-file-list-popup.component-3oRAKxTo.mjs} +22 -77
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-3oRAKxTo.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-image-preview.popup-QxJfswhK.mjs → acorex-platform-layout-widgets-image-preview.popup-CazpERbX.mjs} +8 -9
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-CazpERbX.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-CVdssZBD.mjs → acorex-platform-layout-widgets-page-widget-designer.component-BQ4G6aYf.mjs} +17 -17
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-BQ4G6aYf.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-DWuWxUF_.mjs +116 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-DWuWxUF_.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-DVaZN9QN.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-fV94u3t2.mjs} +25 -19
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-fV94u3t2.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-DPGHgXa6.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-DyuvQhgN.mjs} +9 -9
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-DyuvQhgN.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-CdiNW691.mjs → acorex-platform-layout-widgets-text-block-widget-designer.component-EJMMdpIs.mjs} +7 -7
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-EJMMdpIs.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +6396 -4058
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-native.mjs +8 -7
- package/fesm2022/acorex-platform-native.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +328 -166
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-CkptOSO3.mjs +160 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-CkptOSO3.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DXC2qtvK.mjs +120 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DXC2qtvK.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-rGsMVAZj.mjs → acorex-platform-themes-default-entity-master-single-view.component-DYyunzKZ.mjs} +16 -23
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-DYyunzKZ.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-401.component-C5lQECDP.mjs +31 -0
- package/fesm2022/acorex-platform-themes-default-error-401.component-C5lQECDP.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-404.component-D5wBXAB-.mjs +25 -0
- package/fesm2022/acorex-platform-themes-default-error-404.component-D5wBXAB-.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-AhDiY3DI.mjs +19 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-AhDiY3DI.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +1687 -69
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-column.component-TJ9PWHMY.mjs → acorex-platform-themes-shared-icon-chooser-column.component-QL2-ZUVg.mjs} +8 -8
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-QL2-ZUVg.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-BHcKkIx0.mjs → acorex-platform-themes-shared-icon-chooser-view.component-BXydqPt_.mjs} +8 -8
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BXydqPt_.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs → acorex-platform-themes-shared-settings.provider-D13QB3Hr.mjs} +2 -2
- package/fesm2022/acorex-platform-themes-shared-settings.provider-D13QB3Hr.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-Cb9iY6k9.mjs +88 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-Cb9iY6k9.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-KP4-BND5.mjs +80 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-KP4-BND5.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +572 -465
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +276 -98
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/fesm2022/acorex-platform.mjs.map +1 -1
- package/package.json +38 -38
- package/{auth/index.d.ts → types/acorex-platform-auth.d.ts} +14 -2
- package/{common/index.d.ts → types/acorex-platform-common.d.ts} +261 -24
- package/{core/index.d.ts → types/acorex-platform-core.d.ts} +163 -42
- package/{domain/index.d.ts → types/acorex-platform-domain.d.ts} +744 -412
- package/{layout/builder/index.d.ts → types/acorex-platform-layout-builder.d.ts} +137 -38
- package/{layout/components/index.d.ts → types/acorex-platform-layout-components.d.ts} +808 -131
- package/{layout/designer/index.d.ts → types/acorex-platform-layout-designer.d.ts} +96 -18
- package/{layout/entity/index.d.ts → types/acorex-platform-layout-entity.d.ts} +686 -61
- package/{layout/views/index.d.ts → types/acorex-platform-layout-views.d.ts} +80 -47
- package/{layout/widget-core/index.d.ts → types/acorex-platform-layout-widget-core.d.ts} +274 -197
- package/{layout/widgets/index.d.ts → types/acorex-platform-layout-widgets.d.ts} +583 -104
- package/{native/index.d.ts → types/acorex-platform-native.d.ts} +0 -7
- package/types/acorex-platform-runtime.d.ts +565 -0
- package/{themes/default/index.d.ts → types/acorex-platform-themes-default.d.ts} +105 -4
- package/{themes/shared/index.d.ts → types/acorex-platform-themes-shared.d.ts} +14 -5
- package/{workflow/index.d.ts → types/acorex-platform-workflow.d.ts} +96 -81
- package/fesm2022/acorex-platform-common-common-settings.provider-41RhWqb4.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CSxCnzwU.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-CPBzE96V.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-Dtv6U3df.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-QxJfswhK.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-CVdssZBD.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BCxE0RTB.mjs +0 -111
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BCxE0RTB.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DVaZN9QN.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-DPGHgXa6.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-CdiNW691.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-D4hU2SCE.mjs +0 -160
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-D4hU2SCE.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CLDoygoI.mjs +0 -1610
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CLDoygoI.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BVTklnzs.mjs +0 -120
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BVTklnzs.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-rGsMVAZj.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-401.component-53VB-PS_.mjs +0 -31
- package/fesm2022/acorex-platform-themes-default-error-401.component-53VB-PS_.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-404.component-DVF9soT5.mjs +0 -25
- package/fesm2022/acorex-platform-themes-default-error-404.component-DVF9soT5.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-offline.component-CwNNHzZn.mjs +0 -19
- package/fesm2022/acorex-platform-themes-default-error-offline.component-CwNNHzZn.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-TJ9PWHMY.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BHcKkIx0.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BUPs84MI.mjs +0 -65
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BUPs84MI.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BotknoHn.mjs +0 -64
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BotknoHn.mjs.map +0 -1
- package/runtime/index.d.ts +0 -307
- /package/{index.d.ts → types/acorex-platform.d.ts} +0 -0
|
@@ -3,6 +3,7 @@ import { Injectable, inject, InjectionToken, Optional, Inject, NgModule } from '
|
|
|
3
3
|
import { Subject, filter } from 'rxjs';
|
|
4
4
|
import { cloneDeep, get, set } from 'lodash-es';
|
|
5
5
|
import { setSmart, AXPExpressionEvaluatorService, AXPDataGenerator } from '@acorex/platform/core';
|
|
6
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
6
7
|
import { AXPCommandService } from '@acorex/platform/runtime';
|
|
7
8
|
|
|
8
9
|
class AXPWorkflowError extends Error {
|
|
@@ -23,10 +24,10 @@ class AXPWorkflowEventService {
|
|
|
23
24
|
get events$() {
|
|
24
25
|
return this.eventSubject.asObservable();
|
|
25
26
|
}
|
|
26
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
27
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
27
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
28
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowEventService, providedIn: 'root' }); }
|
|
28
29
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowEventService, decorators: [{
|
|
30
31
|
type: Injectable,
|
|
31
32
|
args: [{
|
|
32
33
|
providedIn: 'root',
|
|
@@ -116,10 +117,10 @@ class AXPWorkflowRegistryService {
|
|
|
116
117
|
});
|
|
117
118
|
}
|
|
118
119
|
}
|
|
119
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
120
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
120
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
121
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowRegistryService, providedIn: 'root' }); }
|
|
121
122
|
}
|
|
122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowRegistryService, decorators: [{
|
|
123
124
|
type: Injectable,
|
|
124
125
|
args: [{
|
|
125
126
|
providedIn: 'root',
|
|
@@ -158,17 +159,17 @@ class AXPWorkflowAction {
|
|
|
158
159
|
dispatch(event) {
|
|
159
160
|
this.eventService.dispatch(event);
|
|
160
161
|
}
|
|
161
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
162
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
162
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowAction, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
163
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowAction }); }
|
|
163
164
|
}
|
|
164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowAction, decorators: [{
|
|
165
166
|
type: Injectable
|
|
166
167
|
}] });
|
|
167
168
|
class AXPWorkflowFunction {
|
|
168
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
169
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
169
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowFunction, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
170
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowFunction }); }
|
|
170
171
|
}
|
|
171
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
172
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowFunction, decorators: [{
|
|
172
173
|
type: Injectable
|
|
173
174
|
}] });
|
|
174
175
|
function createWorkFlowEvent(type) {
|
|
@@ -184,10 +185,10 @@ class AXPWorkflowDecideAction extends AXPWorkflowAction {
|
|
|
184
185
|
async execute(context) {
|
|
185
186
|
// its a fake action
|
|
186
187
|
}
|
|
187
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
188
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
188
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowDecideAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
189
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowDecideAction, providedIn: 'root' }); }
|
|
189
190
|
}
|
|
190
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowDecideAction, decorators: [{
|
|
191
192
|
type: Injectable,
|
|
192
193
|
args: [{
|
|
193
194
|
providedIn: 'root',
|
|
@@ -373,10 +374,10 @@ class AXPWorkflowService {
|
|
|
373
374
|
}
|
|
374
375
|
return this.injector.get(functionType);
|
|
375
376
|
}
|
|
376
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
377
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
377
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowService, deps: [{ token: AXPWorkflowRegistryService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
378
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowService, providedIn: 'root' }); }
|
|
378
379
|
}
|
|
379
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
380
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowService, decorators: [{
|
|
380
381
|
type: Injectable,
|
|
381
382
|
args: [{
|
|
382
383
|
providedIn: 'root',
|
|
@@ -401,10 +402,10 @@ class AXPStartWorkflowAction extends AXPWorkflowAction {
|
|
|
401
402
|
throw e;
|
|
402
403
|
}
|
|
403
404
|
}
|
|
404
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
405
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
405
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStartWorkflowAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
406
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStartWorkflowAction, providedIn: 'root' }); }
|
|
406
407
|
}
|
|
407
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
408
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPStartWorkflowAction, decorators: [{
|
|
408
409
|
type: Injectable,
|
|
409
410
|
args: [{
|
|
410
411
|
providedIn: 'root',
|
|
@@ -417,6 +418,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
417
418
|
// Compatible with Elsa backend while using ACoreX naming conventions
|
|
418
419
|
// ============================================
|
|
419
420
|
|
|
421
|
+
// Note:
|
|
422
|
+
// Previous versions defined dedicated activity result/command types here
|
|
423
|
+
// (AXPActivityResult / AXPActivity) that wrapped output and outcome.
|
|
424
|
+
// Activities are now modeled directly as AXPCommand with outcome stored in
|
|
425
|
+
// AXPExecuteCommandResult.metadata.outcome.
|
|
426
|
+
|
|
420
427
|
const AXP_ACTIVITY_PROVIDER = new InjectionToken('AXP_ACTIVITY_PROVIDER', {
|
|
421
428
|
factory: () => [],
|
|
422
429
|
});
|
|
@@ -592,6 +599,19 @@ class AXPActivityDefinitionService {
|
|
|
592
599
|
this.pendingActivityRequests.set(name, requestPromise);
|
|
593
600
|
return requestPromise;
|
|
594
601
|
}
|
|
602
|
+
/**
|
|
603
|
+
* Get all activity definitions (flat list) by loading root categories and their activities.
|
|
604
|
+
* Used by activity selector UIs (e.g. automation command configurator).
|
|
605
|
+
*/
|
|
606
|
+
async getAllActivities() {
|
|
607
|
+
const categories = await this.getCategories(undefined);
|
|
608
|
+
const all = [];
|
|
609
|
+
for (const cat of categories) {
|
|
610
|
+
const activities = await this.getActivitiesByCategoryId(cat.id);
|
|
611
|
+
all.push(...activities);
|
|
612
|
+
}
|
|
613
|
+
return all;
|
|
614
|
+
}
|
|
595
615
|
/**
|
|
596
616
|
* Get category ID containing a specific activity definition
|
|
597
617
|
*
|
|
@@ -609,7 +629,7 @@ class AXPActivityDefinitionService {
|
|
|
609
629
|
if (definition && definition.category) {
|
|
610
630
|
// Try to find category by name/id
|
|
611
631
|
const categories = await this.getCategories();
|
|
612
|
-
const found = categories.find(cat => cat.id === definition.category
|
|
632
|
+
const found = categories.find((cat) => cat.id === definition.category);
|
|
613
633
|
if (found) {
|
|
614
634
|
return found.id;
|
|
615
635
|
}
|
|
@@ -836,10 +856,10 @@ class AXPActivityDefinitionService {
|
|
|
836
856
|
this.pendingActivitiesRequests.clear();
|
|
837
857
|
this.pendingActivityRequests.clear();
|
|
838
858
|
}
|
|
839
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
840
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
859
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPActivityDefinitionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
860
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPActivityDefinitionService, providedIn: 'root' }); }
|
|
841
861
|
}
|
|
842
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
862
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPActivityDefinitionService, decorators: [{
|
|
843
863
|
type: Injectable,
|
|
844
864
|
args: [{
|
|
845
865
|
providedIn: 'root',
|
|
@@ -852,6 +872,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
852
872
|
*/
|
|
853
873
|
const AXP_WORKFLOW_ENGINE = new InjectionToken('AXP_WORKFLOW_ENGINE');
|
|
854
874
|
|
|
875
|
+
/**
|
|
876
|
+
* Activity types that use the task board (suspend until user acts via inbox), not inline interactive execution.
|
|
877
|
+
*/
|
|
878
|
+
const AXP_WORKFLOW_TASK_BOARD_ACTIVITY_TYPES = [
|
|
879
|
+
'workflow-activity:human-task',
|
|
880
|
+
'workflow-activity:cartable',
|
|
881
|
+
];
|
|
882
|
+
function axpIsWorkflowTaskBoardActivityType(activityType) {
|
|
883
|
+
return !!activityType && AXP_WORKFLOW_TASK_BOARD_ACTIVITY_TYPES.includes(activityType);
|
|
884
|
+
}
|
|
885
|
+
|
|
855
886
|
//#endregion
|
|
856
887
|
/**
|
|
857
888
|
* Workflow Expression Scope Service
|
|
@@ -885,6 +916,82 @@ const AXP_WORKFLOW_ENGINE = new InjectionToken('AXP_WORKFLOW_ENGINE');
|
|
|
885
916
|
* ```
|
|
886
917
|
*/
|
|
887
918
|
class WorkflowExpressionScopeService {
|
|
919
|
+
//#region ---- Private Helpers (dot-notation input normalization) ----
|
|
920
|
+
/**
|
|
921
|
+
* Collect dot-notation key-value pairs from nested objects so that e.g.
|
|
922
|
+
* { metadata: { "metadata.questionnaire.id": "x" } } becomes { "metadata.questionnaire.id": "x" } at root.
|
|
923
|
+
* Top-level non-dot keys are kept as-is.
|
|
924
|
+
*/
|
|
925
|
+
flattenDotKeysFromTree(obj) {
|
|
926
|
+
if (obj === null || typeof obj !== 'object')
|
|
927
|
+
return obj;
|
|
928
|
+
const result = {};
|
|
929
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
930
|
+
if (key.includes('.')) {
|
|
931
|
+
result[key] = value;
|
|
932
|
+
}
|
|
933
|
+
else if (value !== null && typeof value === 'object' && !Array.isArray(value)) {
|
|
934
|
+
for (const [k, v] of Object.entries(value)) {
|
|
935
|
+
if (k.includes('.')) {
|
|
936
|
+
result[k] = v;
|
|
937
|
+
}
|
|
938
|
+
else {
|
|
939
|
+
result[key + '.' + k] = v;
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
else {
|
|
944
|
+
result[key] = value;
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
return result;
|
|
948
|
+
}
|
|
949
|
+
/**
|
|
950
|
+
* Expand flat keys with dots into nested objects.
|
|
951
|
+
* e.g. { "metadata.questionnaire.id": "x" } -> { metadata: { questionnaire: { id: "x" } } }.
|
|
952
|
+
*/
|
|
953
|
+
expandDotKeys(obj) {
|
|
954
|
+
if (obj === null || typeof obj !== 'object')
|
|
955
|
+
return obj;
|
|
956
|
+
const result = {};
|
|
957
|
+
const dotKeys = [];
|
|
958
|
+
const simpleKeys = [];
|
|
959
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
960
|
+
if (key.includes('.')) {
|
|
961
|
+
dotKeys.push([key, value]);
|
|
962
|
+
}
|
|
963
|
+
else {
|
|
964
|
+
simpleKeys.push([key, value]);
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
for (const [key, value] of dotKeys) {
|
|
968
|
+
const parts = key.split('.');
|
|
969
|
+
let current = result;
|
|
970
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
971
|
+
const part = parts[i];
|
|
972
|
+
if (!(part in current) || typeof current[part] !== 'object' || current[part] === null) {
|
|
973
|
+
current[part] = {};
|
|
974
|
+
}
|
|
975
|
+
current = current[part];
|
|
976
|
+
}
|
|
977
|
+
current[parts[parts.length - 1]] = value;
|
|
978
|
+
}
|
|
979
|
+
for (const [key, value] of simpleKeys) {
|
|
980
|
+
result[key] = value;
|
|
981
|
+
}
|
|
982
|
+
return result;
|
|
983
|
+
}
|
|
984
|
+
/**
|
|
985
|
+
* Normalize workflow input so that flat dot-notation keys (e.g. from form schema
|
|
986
|
+
* "metadata.questionnaire.id") become nested for expression access (inputs.metadata.questionnaire.id).
|
|
987
|
+
*/
|
|
988
|
+
normalizeInputs(input) {
|
|
989
|
+
if (!input || typeof input !== 'object')
|
|
990
|
+
return {};
|
|
991
|
+
const flattened = this.flattenDotKeysFromTree(input);
|
|
992
|
+
return this.expandDotKeys(flattened);
|
|
993
|
+
}
|
|
994
|
+
//#endregion
|
|
888
995
|
//#region ---- Public Methods ----
|
|
889
996
|
/**
|
|
890
997
|
* Build expression evaluation scope for workflow activities.
|
|
@@ -914,10 +1021,12 @@ class WorkflowExpressionScopeService {
|
|
|
914
1021
|
* @returns Expression evaluator scope with workflow data and context.eval() function
|
|
915
1022
|
*/
|
|
916
1023
|
buildScope(context) {
|
|
1024
|
+
// Normalize inputs so flat dot-notation keys (e.g. metadata.questionnaire.id from forms) become nested for expressions
|
|
1025
|
+
const inputs = this.normalizeInputs(context.inputs || {});
|
|
917
1026
|
// Build merged workflow data object for context.eval()
|
|
918
1027
|
// This allows expressions like: context.eval("inputs.userName") or context.eval("variables.count")
|
|
919
1028
|
const workflowData = {
|
|
920
|
-
inputs
|
|
1029
|
+
inputs,
|
|
921
1030
|
variables: context.variables || {},
|
|
922
1031
|
vars: context.variables || {}, // Alias for convenience
|
|
923
1032
|
outputs: context.outputs || {},
|
|
@@ -971,21 +1080,32 @@ class WorkflowExpressionScopeService {
|
|
|
971
1080
|
outputs['last'] = state.lastActivityOutput;
|
|
972
1081
|
}
|
|
973
1082
|
return this.buildScope({
|
|
974
|
-
inputs: state.input || {},
|
|
1083
|
+
inputs: this.normalizeInputs((state.input || {})),
|
|
975
1084
|
variables: state.variables || {},
|
|
976
1085
|
outputs: outputs,
|
|
977
1086
|
});
|
|
978
1087
|
}
|
|
979
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
980
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1088
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: WorkflowExpressionScopeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1089
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: WorkflowExpressionScopeService, providedIn: 'root' }); }
|
|
981
1090
|
}
|
|
982
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1091
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: WorkflowExpressionScopeService, decorators: [{
|
|
983
1092
|
type: Injectable,
|
|
984
1093
|
args: [{
|
|
985
1094
|
providedIn: 'root'
|
|
986
1095
|
}]
|
|
987
1096
|
}] });
|
|
988
1097
|
|
|
1098
|
+
//#region ---- Constants ----
|
|
1099
|
+
/**
|
|
1100
|
+
* Activity types handled internally by the workflow engine (e.g. mock backend).
|
|
1101
|
+
* When such an activity is not registered as Command on the client, we skip execution
|
|
1102
|
+
* without warning — the engine will run it when executing the workflow.
|
|
1103
|
+
*/
|
|
1104
|
+
const ENGINE_BUILTIN_ACTIVITY_TYPES = new Set([
|
|
1105
|
+
'workflow-activity:set-variable',
|
|
1106
|
+
'workflow-activity:http-request',
|
|
1107
|
+
'workflow-activity:resolve-employee-user-id',
|
|
1108
|
+
]);
|
|
989
1109
|
//#endregion
|
|
990
1110
|
/**
|
|
991
1111
|
* Activity Executor Service
|
|
@@ -1007,6 +1127,7 @@ class ActivityExecutor {
|
|
|
1007
1127
|
this.commandService = inject(AXPCommandService);
|
|
1008
1128
|
this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
|
|
1009
1129
|
this.expressionScopeService = inject(WorkflowExpressionScopeService);
|
|
1130
|
+
this.translateService = inject(AXTranslationService);
|
|
1010
1131
|
}
|
|
1011
1132
|
//#endregion
|
|
1012
1133
|
//#region ---- Public Methods ----
|
|
@@ -1039,21 +1160,23 @@ class ActivityExecutor {
|
|
|
1039
1160
|
// Check if command exists
|
|
1040
1161
|
const commandExists = this.commandService.exists(activityName);
|
|
1041
1162
|
if (!commandExists) {
|
|
1042
|
-
|
|
1043
|
-
`
|
|
1163
|
+
if (!ENGINE_BUILTIN_ACTIVITY_TYPES.has(activityName)) {
|
|
1164
|
+
console.warn(`[ActivityExecutor] ⚠️ Activity '${activityName}' is not registered as Command. ` +
|
|
1165
|
+
`Skipping execution.`);
|
|
1166
|
+
}
|
|
1044
1167
|
return {
|
|
1045
1168
|
output: null,
|
|
1046
1169
|
outcome: 'Done'
|
|
1047
1170
|
};
|
|
1048
1171
|
}
|
|
1049
|
-
// Flatten properties if nested (
|
|
1172
|
+
// Flatten properties if nested (designer-style nested payload)
|
|
1050
1173
|
let commandInput = evaluatedInputs;
|
|
1051
1174
|
if (commandInput['properties'] && typeof commandInput['properties'] === 'object') {
|
|
1052
1175
|
// Flatten: {properties: {text: "..."}} -> {text: "..."}
|
|
1053
1176
|
commandInput = { ...commandInput['properties'] };
|
|
1054
1177
|
}
|
|
1055
1178
|
// Execute activity via CommandBus
|
|
1056
|
-
// Activities
|
|
1179
|
+
// Activities (AXPActivity) return {output, outcome}; legacy may return {output, outcomes}
|
|
1057
1180
|
const result = await this.commandService.execute(activityName, commandInput);
|
|
1058
1181
|
if (!result) {
|
|
1059
1182
|
return {
|
|
@@ -1064,21 +1187,33 @@ class ActivityExecutor {
|
|
|
1064
1187
|
if (!result.success) {
|
|
1065
1188
|
return {
|
|
1066
1189
|
output: {
|
|
1067
|
-
error: result.message?.text,
|
|
1190
|
+
error: await this.resolveCommandMessageTextForError(result.message?.text),
|
|
1068
1191
|
},
|
|
1069
1192
|
outcome: 'Failed',
|
|
1070
1193
|
};
|
|
1071
1194
|
}
|
|
1072
1195
|
const commandResult = result.data;
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
// Default to 'Done' if no outcomes specified
|
|
1196
|
+
// Prefer unified outcome in result.metadata; fall back to legacy data.outcome/outcomes.
|
|
1197
|
+
const metadataOutcome = result?.metadata?.['outcome'];
|
|
1076
1198
|
let outcome = 'Done';
|
|
1077
|
-
if (
|
|
1078
|
-
outcome =
|
|
1199
|
+
if (typeof metadataOutcome === 'string' && metadataOutcome.length > 0) {
|
|
1200
|
+
outcome = metadataOutcome;
|
|
1079
1201
|
}
|
|
1202
|
+
else if (typeof commandResult?.outcome === 'string' && commandResult.outcome.length > 0) {
|
|
1203
|
+
outcome = commandResult.outcome;
|
|
1204
|
+
}
|
|
1205
|
+
else {
|
|
1206
|
+
const outcomes = (commandResult?.outcomes ?? {});
|
|
1207
|
+
if (outcomes && typeof outcomes === 'object' && Object.keys(outcomes).length > 0) {
|
|
1208
|
+
outcome = outcomes['Done'] ? 'Done' : Object.keys(outcomes)[0] || 'Done';
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
// Prefer output wrapper when present; otherwise treat data itself as output.
|
|
1212
|
+
const output = commandResult && typeof commandResult === 'object' && 'output' in commandResult
|
|
1213
|
+
? commandResult.output
|
|
1214
|
+
: commandResult;
|
|
1080
1215
|
return {
|
|
1081
|
-
output:
|
|
1216
|
+
output: output ?? null,
|
|
1082
1217
|
outcome,
|
|
1083
1218
|
};
|
|
1084
1219
|
}
|
|
@@ -1090,10 +1225,22 @@ class ActivityExecutor {
|
|
|
1090
1225
|
};
|
|
1091
1226
|
}
|
|
1092
1227
|
}
|
|
1093
|
-
|
|
1094
|
-
|
|
1228
|
+
/**
|
|
1229
|
+
* Resolves command failure message text for workflow output: `@` keys via translate, MLS maps via resolve.
|
|
1230
|
+
*/
|
|
1231
|
+
async resolveCommandMessageTextForError(value) {
|
|
1232
|
+
if (value == null) {
|
|
1233
|
+
return '';
|
|
1234
|
+
}
|
|
1235
|
+
if (typeof value === 'string') {
|
|
1236
|
+
return value.startsWith('@') ? await this.translateService.translateAsync(value) : value;
|
|
1237
|
+
}
|
|
1238
|
+
return this.translateService.resolve(value);
|
|
1239
|
+
}
|
|
1240
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ActivityExecutor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1241
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ActivityExecutor, providedIn: 'root' }); }
|
|
1095
1242
|
}
|
|
1096
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ActivityExecutor, decorators: [{
|
|
1097
1244
|
type: Injectable,
|
|
1098
1245
|
args: [{
|
|
1099
1246
|
providedIn: 'root'
|
|
@@ -1141,23 +1288,19 @@ class AXPWorkflowManager {
|
|
|
1141
1288
|
//#endregion
|
|
1142
1289
|
//#region ---- Public Methods ----
|
|
1143
1290
|
/**
|
|
1144
|
-
* Execute frontend activities interactively until reaching human-task or completion.
|
|
1291
|
+
* Execute frontend activities interactively until reaching workflow-activity:human-task or completion.
|
|
1145
1292
|
*
|
|
1146
|
-
*
|
|
1147
|
-
*
|
|
1148
|
-
*
|
|
1149
|
-
* 3. If backend returns nextTask (frontend activity), repeats the process
|
|
1150
|
-
* 4. Continues until workflow completes or reaches human-task
|
|
1293
|
+
* Interactive = show form/popup immediately (user sees and acts). Only workflow-activity:human-task
|
|
1294
|
+
* is not interactive (goes to task board). Other frontend activities (show-layout-popup, show-toast, etc.)
|
|
1295
|
+
* even with taskType human-task in definition are executed here.
|
|
1151
1296
|
*
|
|
1152
1297
|
* @param instanceId - Workflow instance ID
|
|
1153
1298
|
* @param task - Current task to execute
|
|
1154
1299
|
* @param state - Current workflow state
|
|
1155
1300
|
* @param lastActivityOutput - Last activity output (for expression evaluation)
|
|
1156
|
-
* @returns Final result with nextTask (if human-task) or completion status
|
|
1301
|
+
* @returns Final result with nextTask (if workflow-activity:human-task) or completion status
|
|
1157
1302
|
*/
|
|
1158
1303
|
async executeInteractiveFlow(instanceId, task, state, activityOutputs) {
|
|
1159
|
-
// Backend decides what to execute - frontend only executes ui-activity with frontend/both executionMode
|
|
1160
|
-
// If backend returns a task that's not executable here, return it as-is
|
|
1161
1304
|
let currentTask = task;
|
|
1162
1305
|
let currentState = state;
|
|
1163
1306
|
let currentActivityOutputs = {
|
|
@@ -1168,10 +1311,10 @@ class AXPWorkflowManager {
|
|
|
1168
1311
|
let iterationCount = 0;
|
|
1169
1312
|
while (currentTask && iterationCount < maxIterations) {
|
|
1170
1313
|
iterationCount++;
|
|
1171
|
-
//
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1314
|
+
// Interactive = frontend executionMode and NOT task-board activities (human-task, cartable)
|
|
1315
|
+
const isInteractive = (currentTask.executionMode === 'frontend' || currentTask.executionMode === 'both') &&
|
|
1316
|
+
!axpIsWorkflowTaskBoardActivityType(currentTask.activityType);
|
|
1317
|
+
if (isInteractive) {
|
|
1175
1318
|
// Execute frontend activity
|
|
1176
1319
|
const execResult = await this.activityExecutor.execute(currentTask, currentState, currentActivityOutputs);
|
|
1177
1320
|
// Track outputs locally (backend should also persist and return them)
|
|
@@ -1208,20 +1351,20 @@ class AXPWorkflowManager {
|
|
|
1208
1351
|
output: completeResponse.output,
|
|
1209
1352
|
};
|
|
1210
1353
|
}
|
|
1211
|
-
// Backend decides: if nextTask is not
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1354
|
+
// Backend decides: if nextTask is task-board activity or not frontend, return it (task board or done)
|
|
1355
|
+
const nextInteractive = (completeResponse.nextTask.executionMode === 'frontend' || completeResponse.nextTask.executionMode === 'both') &&
|
|
1356
|
+
!axpIsWorkflowTaskBoardActivityType(completeResponse.nextTask.activityType);
|
|
1357
|
+
if (!nextInteractive) {
|
|
1215
1358
|
return {
|
|
1216
1359
|
nextTask: completeResponse.nextTask,
|
|
1217
1360
|
state: currentState,
|
|
1218
1361
|
};
|
|
1219
1362
|
}
|
|
1220
|
-
// Continue with next
|
|
1363
|
+
// Continue with next interactive frontend task
|
|
1221
1364
|
currentTask = completeResponse.nextTask;
|
|
1222
1365
|
}
|
|
1223
1366
|
else {
|
|
1224
|
-
// Not
|
|
1367
|
+
// Not interactive (e.g. human-task / cartable) - return as-is for task board
|
|
1225
1368
|
return {
|
|
1226
1369
|
nextTask: currentTask,
|
|
1227
1370
|
state: currentState,
|
|
@@ -1272,15 +1415,14 @@ class AXPWorkflowManager {
|
|
|
1272
1415
|
startNormalizedState.lastUpdated = new Date(startNormalizedState.lastUpdated);
|
|
1273
1416
|
}
|
|
1274
1417
|
this.stateCache.set(response.instanceId, startNormalizedState);
|
|
1275
|
-
// 🎯 Interactive flow: Execute frontend activities
|
|
1276
|
-
// Backend decides what to execute - if pendingTask is executable (ui-activity with frontend/both), execute it
|
|
1418
|
+
// 🎯 Interactive flow: Execute frontend activities that are NOT task-board types (those go to task board)
|
|
1277
1419
|
let finalNextTask = response.pendingTask || null;
|
|
1278
1420
|
let finalOutput = startNormalizedState.output;
|
|
1279
|
-
|
|
1280
|
-
if (
|
|
1281
|
-
|
|
1282
|
-
(
|
|
1283
|
-
const interactiveResult = await this.executeInteractiveFlow(response.instanceId,
|
|
1421
|
+
const pendingTask = response.pendingTask;
|
|
1422
|
+
if (pendingTask &&
|
|
1423
|
+
(pendingTask.executionMode === 'frontend' || pendingTask.executionMode === 'both') &&
|
|
1424
|
+
!axpIsWorkflowTaskBoardActivityType(pendingTask.activityType)) {
|
|
1425
|
+
const interactiveResult = await this.executeInteractiveFlow(response.instanceId, pendingTask, startNormalizedState, response.activityOutputs || response.state.activityOutputs);
|
|
1284
1426
|
finalNextTask = interactiveResult.nextTask;
|
|
1285
1427
|
startNormalizedState = interactiveResult.state;
|
|
1286
1428
|
if (interactiveResult.output !== undefined) {
|
|
@@ -1342,15 +1484,14 @@ class AXPWorkflowManager {
|
|
|
1342
1484
|
if (normalizedState) {
|
|
1343
1485
|
this.stateCache.set(instanceId, normalizedState);
|
|
1344
1486
|
}
|
|
1345
|
-
// 🎯 Interactive flow: Execute frontend activities
|
|
1346
|
-
// Backend decides what to execute - if nextTask is executable (ui-activity with frontend/both), execute it
|
|
1487
|
+
// 🎯 Interactive flow: Execute frontend activities that are NOT task-board types (those go to task board)
|
|
1347
1488
|
let finalNextTask = response.nextTask || null;
|
|
1348
1489
|
let finalOutput = response.output;
|
|
1349
|
-
|
|
1350
|
-
if (
|
|
1351
|
-
|
|
1352
|
-
(
|
|
1353
|
-
const interactiveResult = await this.executeInteractiveFlow(instanceId,
|
|
1490
|
+
const nextTask = response.nextTask;
|
|
1491
|
+
if (nextTask &&
|
|
1492
|
+
(nextTask.executionMode === 'frontend' || nextTask.executionMode === 'both') &&
|
|
1493
|
+
!axpIsWorkflowTaskBoardActivityType(nextTask.activityType)) {
|
|
1494
|
+
const interactiveResult = await this.executeInteractiveFlow(instanceId, nextTask, normalizedState, normalizedState?.activityOutputs);
|
|
1354
1495
|
finalNextTask = interactiveResult.nextTask;
|
|
1355
1496
|
normalizedState = interactiveResult.state;
|
|
1356
1497
|
if (interactiveResult.output !== undefined) {
|
|
@@ -1420,10 +1561,39 @@ class AXPWorkflowManager {
|
|
|
1420
1561
|
return null;
|
|
1421
1562
|
}
|
|
1422
1563
|
}
|
|
1423
|
-
|
|
1424
|
-
|
|
1564
|
+
/**
|
|
1565
|
+
* Claim a pooled workflow task (assign current user on the bookmark without advancing the workflow).
|
|
1566
|
+
* Supported only when the injected workflow engine implements {@link AXPWorkflowEngine.claimTask}.
|
|
1567
|
+
*/
|
|
1568
|
+
async claimTask(instanceId, bookmarkId, stepId) {
|
|
1569
|
+
const claim = this.workflowEngine.claimTask?.bind(this.workflowEngine);
|
|
1570
|
+
if (!claim) {
|
|
1571
|
+
return {
|
|
1572
|
+
success: false,
|
|
1573
|
+
instanceId,
|
|
1574
|
+
error: 'Claim task is not supported by this workflow engine',
|
|
1575
|
+
};
|
|
1576
|
+
}
|
|
1577
|
+
try {
|
|
1578
|
+
const result = await claim({ instanceId, bookmarkId, stepId });
|
|
1579
|
+
return {
|
|
1580
|
+
success: result.success,
|
|
1581
|
+
instanceId,
|
|
1582
|
+
error: result.error,
|
|
1583
|
+
};
|
|
1584
|
+
}
|
|
1585
|
+
catch (error) {
|
|
1586
|
+
return {
|
|
1587
|
+
success: false,
|
|
1588
|
+
instanceId,
|
|
1589
|
+
error: error instanceof Error ? error.message : 'Failed to claim task',
|
|
1590
|
+
};
|
|
1591
|
+
}
|
|
1592
|
+
}
|
|
1593
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1594
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowManager, providedIn: 'root' }); }
|
|
1425
1595
|
}
|
|
1426
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1596
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowManager, decorators: [{
|
|
1427
1597
|
type: Injectable,
|
|
1428
1598
|
args: [{
|
|
1429
1599
|
providedIn: 'root',
|
|
@@ -1458,6 +1628,7 @@ class AXPWorkflowLocalEngine {
|
|
|
1458
1628
|
//#region ---- Services & Dependencies ----
|
|
1459
1629
|
this.activityDefinitionService = inject(AXPActivityDefinitionService);
|
|
1460
1630
|
this.workflowProviders = inject(AXP_WORKFLOW_PROVIDER, { optional: true }) || [];
|
|
1631
|
+
this.multiLanguageResolver = inject(AXTranslationService);
|
|
1461
1632
|
//#endregion
|
|
1462
1633
|
//#region ---- Instance Storage ----
|
|
1463
1634
|
/**
|
|
@@ -1559,9 +1730,10 @@ class AXPWorkflowLocalEngine {
|
|
|
1559
1730
|
throw new Error(`Workflow instance not found: ${request.instanceId}`);
|
|
1560
1731
|
}
|
|
1561
1732
|
// Store activity result (from external execution)
|
|
1733
|
+
const outcome = request.outcome ?? 'Done';
|
|
1562
1734
|
localState.activityResults.set(request.stepId, {
|
|
1563
1735
|
output: request.userInput || {},
|
|
1564
|
-
outcome
|
|
1736
|
+
outcome,
|
|
1565
1737
|
});
|
|
1566
1738
|
localState.completedActivities.add(request.stepId);
|
|
1567
1739
|
// Store activity output for expression evaluation
|
|
@@ -1577,6 +1749,11 @@ class AXPWorkflowLocalEngine {
|
|
|
1577
1749
|
...(request.userInput || {}),
|
|
1578
1750
|
};
|
|
1579
1751
|
}
|
|
1752
|
+
localState.state.variables = {
|
|
1753
|
+
...localState.state.variables,
|
|
1754
|
+
[`${request.stepId}_outcome`]: outcome,
|
|
1755
|
+
[`${request.stepId}_activityOutput`]: request.userInput || {},
|
|
1756
|
+
};
|
|
1580
1757
|
// Mark activity as completed and continue progression
|
|
1581
1758
|
// Continue progressing workflow steps (skipping backend activities)
|
|
1582
1759
|
const nextTask = await this.executeWorkflowSteps(localState);
|
|
@@ -1589,7 +1766,7 @@ class AXPWorkflowLocalEngine {
|
|
|
1589
1766
|
}
|
|
1590
1767
|
return {
|
|
1591
1768
|
output: request.userInput || {},
|
|
1592
|
-
outcomes: { [
|
|
1769
|
+
outcomes: { [outcome]: true },
|
|
1593
1770
|
state: localState.state,
|
|
1594
1771
|
nextTask: nextTask || null,
|
|
1595
1772
|
};
|
|
@@ -1650,13 +1827,13 @@ class AXPWorkflowLocalEngine {
|
|
|
1650
1827
|
const connections = graph.connections || [];
|
|
1651
1828
|
// Build activity map
|
|
1652
1829
|
const activityMap = new Map();
|
|
1653
|
-
activities.forEach(activity => {
|
|
1830
|
+
activities.forEach((activity) => {
|
|
1654
1831
|
activityMap.set(activity.id, activity);
|
|
1655
1832
|
});
|
|
1656
1833
|
// Build connection graph
|
|
1657
1834
|
const outgoingConnections = new Map();
|
|
1658
1835
|
const incomingConnections = new Map();
|
|
1659
|
-
connections.forEach(conn => {
|
|
1836
|
+
connections.forEach((conn) => {
|
|
1660
1837
|
const sourceId = conn.source.activtyName;
|
|
1661
1838
|
const targetId = conn.target.activtyName;
|
|
1662
1839
|
if (!outgoingConnections.has(sourceId)) {
|
|
@@ -1713,7 +1890,7 @@ class AXPWorkflowLocalEngine {
|
|
|
1713
1890
|
found: !!activityDefinition,
|
|
1714
1891
|
});
|
|
1715
1892
|
const executionMode = activityDefinition?.executionMode || 'frontend';
|
|
1716
|
-
const activityTitle = activityDefinition?.title;
|
|
1893
|
+
const activityTitle = this.multiLanguageResolver.resolve(activityDefinition?.title) || activityDefinition?.name;
|
|
1717
1894
|
// Handle backend activities: skip
|
|
1718
1895
|
if (executionMode === 'backend') {
|
|
1719
1896
|
console.log(`[WorkflowLocalEngine] ⏭️ Skipping backend activity: ${activity.name} (${activity.id})`);
|
|
@@ -1792,9 +1969,10 @@ class AXPWorkflowLocalEngine {
|
|
|
1792
1969
|
throw new Error(`Workflow instance not found: ${request.instanceId}`);
|
|
1793
1970
|
}
|
|
1794
1971
|
// Store activity result
|
|
1972
|
+
const outcome = request.outcome ?? 'Done';
|
|
1795
1973
|
localState.activityResults.set(request.activityNode, {
|
|
1796
1974
|
output: request.output || {},
|
|
1797
|
-
outcome
|
|
1975
|
+
outcome,
|
|
1798
1976
|
});
|
|
1799
1977
|
localState.completedActivities.add(request.activityNode);
|
|
1800
1978
|
// Store outputs for expression evaluation
|
|
@@ -1819,15 +1997,15 @@ class AXPWorkflowLocalEngine {
|
|
|
1819
1997
|
}
|
|
1820
1998
|
return {
|
|
1821
1999
|
output: request.output || {},
|
|
1822
|
-
outcomes: { [
|
|
2000
|
+
outcomes: { [outcome]: true },
|
|
1823
2001
|
nextTask: nextTask || null,
|
|
1824
2002
|
state: localState.state,
|
|
1825
2003
|
};
|
|
1826
2004
|
}
|
|
1827
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1828
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2005
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowLocalEngine, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2006
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowLocalEngine }); }
|
|
1829
2007
|
}
|
|
1830
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2008
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowLocalEngine, decorators: [{
|
|
1831
2009
|
type: Injectable
|
|
1832
2010
|
}] });
|
|
1833
2011
|
|
|
@@ -2248,10 +2426,10 @@ class AXPWorkflowDefinitionService {
|
|
|
2248
2426
|
this.pendingWorkflowsRequests.clear();
|
|
2249
2427
|
this.pendingWorkflowRequests.clear();
|
|
2250
2428
|
}
|
|
2251
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2252
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2429
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowDefinitionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2430
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowDefinitionService, providedIn: 'root' }); }
|
|
2253
2431
|
}
|
|
2254
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2432
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowDefinitionService, decorators: [{
|
|
2255
2433
|
type: Injectable,
|
|
2256
2434
|
args: [{
|
|
2257
2435
|
providedIn: 'root',
|
|
@@ -2343,9 +2521,9 @@ class AXPWorkflowModule {
|
|
|
2343
2521
|
f();
|
|
2344
2522
|
});
|
|
2345
2523
|
}
|
|
2346
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2347
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2348
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2524
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowModule, deps: [{ token: 'AXPWorkflowModuleFactory', optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2525
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowModule }); }
|
|
2526
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowModule, providers: [
|
|
2349
2527
|
AXPWorkflowLocalEngine,
|
|
2350
2528
|
{
|
|
2351
2529
|
provide: AXP_WORKFLOW_ENGINE,
|
|
@@ -2354,7 +2532,7 @@ class AXPWorkflowModule {
|
|
|
2354
2532
|
AXPWorkflowManager,
|
|
2355
2533
|
] }); }
|
|
2356
2534
|
}
|
|
2357
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2535
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowModule, decorators: [{
|
|
2358
2536
|
type: NgModule,
|
|
2359
2537
|
args: [{
|
|
2360
2538
|
imports: [],
|
|
@@ -2380,5 +2558,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
2380
2558
|
* Generated bundle index. Do not edit.
|
|
2381
2559
|
*/
|
|
2382
2560
|
|
|
2383
|
-
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, ActivityExecutor, WorkflowExpressionScopeService, createWorkFlowEvent, ofType };
|
|
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 };
|
|
2384
2562
|
//# sourceMappingURL=acorex-platform-workflow.mjs.map
|