@acorex/platform 20.6.0-next.0 → 20.6.0-next.10
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 +7 -2
- package/core/index.d.ts +444 -4
- package/fesm2022/acorex-platform-auth.mjs +19 -19
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/{acorex-platform-common-common-settings.provider-9OHien_H.mjs → acorex-platform-common-common-settings.provider-zhqNP3xb.mjs} +28 -4
- package/fesm2022/acorex-platform-common-common-settings.provider-zhqNP3xb.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +105 -104
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +460 -55
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +37 -38
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +23 -19
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +646 -297
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +84 -84
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-entity-create-entity.command-DyXF9zAh.mjs → acorex-platform-layout-entity-create-entity.command-DGeylNSY.mjs} +4 -4
- package/fesm2022/acorex-platform-layout-entity-create-entity.command-DGeylNSY.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-entity.mjs +442 -291
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +37 -23
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +158 -124
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-C_3IWNkj.mjs → acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs} +4 -4
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-CJltEgut.mjs → acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-fhhZOWul.mjs} +4 -4
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-fhhZOWul.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-pM-TIuk0.mjs → acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-C3Qbs0fz.mjs} +4 -4
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-C3Qbs0fz.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-BqI96-fU.mjs → acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-CngQBUlN.mjs} +4 -4
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-CngQBUlN.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-values-widget-view.component-C-AhenaM.mjs → acorex-platform-layout-widgets-extra-properties-values-widget-view.component-DSNo9e4W.mjs} +4 -4
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-view.component-DSNo9e4W.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-widget-edit.component-DCAya5ne.mjs → acorex-platform-layout-widgets-extra-properties-widget-edit.component-CL0CwEHX.mjs} +4 -4
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-edit.component-CL0CwEHX.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-widget-view.component-D-PnBqLb.mjs → acorex-platform-layout-widgets-extra-properties-widget-view.component-B6Fi0xTw.mjs} +4 -4
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-view.component-B6Fi0xTw.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-CGEHOyKT.mjs → acorex-platform-layout-widgets-file-list-popup.component-D0y-9nE5.mjs} +7 -7
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-D0y-9nE5.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-Bss0xUcu.mjs → acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs} +4 -4
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-Cy9mHnNP.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-C1l2KSDa.mjs} +7 -7
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-C1l2KSDa.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-DznLtuer.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-D-31ej0C.mjs} +4 -4
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-D-31ej0C.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-ndOUSFi9.mjs → acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs} +4 -4
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +2802 -958
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-native.mjs +7 -7
- package/fesm2022/acorex-platform-native.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +49 -42
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-B1PT6FtZ.mjs → acorex-platform-themes-default-entity-master-create-view.component-WbPPqDON.mjs} +5 -5
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-WbPPqDON.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CD7rJIMh.mjs +803 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CD7rJIMh.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-4g19A3eI.mjs → acorex-platform-themes-default-entity-master-modify-view.component-BTA6h7Xd.mjs} +5 -5
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BTA6h7Xd.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-B8gx5cG7.mjs → acorex-platform-themes-default-entity-master-single-view.component-B_P0a5KW.mjs} +8 -8
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-B_P0a5KW.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-401.component-CcvGfdhu.mjs → acorex-platform-themes-default-error-401.component-cfREo88K.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-error-401.component-cfREo88K.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-404.component-4-CaEsnV.mjs → acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs +19 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +39 -39
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-Dc_Txe32.mjs → acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-settings.provider-DY2xFnrv.mjs → acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs} +18 -18
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-column.component-hgWLhhle.mjs → acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-view.component-CY3JZK_W.mjs → acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +58 -58
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +1413 -28
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/builder/index.d.ts +6 -2
- package/layout/components/index.d.ts +32 -2
- package/layout/entity/index.d.ts +25 -10
- package/layout/views/index.d.ts +1 -0
- package/layout/widget-core/index.d.ts +14 -0
- package/layout/widgets/index.d.ts +352 -19
- package/package.json +11 -11
- package/themes/default/index.d.ts +3 -4
- package/workflow/index.d.ts +1987 -3
- package/fesm2022/acorex-platform-common-common-settings.provider-9OHien_H.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-entity-create-entity.command-DyXF9zAh.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-C_3IWNkj.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-CJltEgut.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-pM-TIuk0.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-BqI96-fU.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-view.component-C-AhenaM.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-edit.component-DCAya5ne.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-view.component-D-PnBqLb.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CGEHOyKT.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-Bss0xUcu.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-Cy9mHnNP.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-DznLtuer.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-ndOUSFi9.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-B1PT6FtZ.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-ccqB5ShI.mjs +0 -748
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-ccqB5ShI.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-4g19A3eI.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-B8gx5cG7.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-401.component-CcvGfdhu.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-404.component-4-CaEsnV.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-offline.component-BNecbFEj.mjs +0 -19
- package/fesm2022/acorex-platform-themes-default-error-offline.component-BNecbFEj.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-Dc_Txe32.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DY2xFnrv.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-hgWLhhle.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-CY3JZK_W.mjs.map +0 -1
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, inject, Optional, Inject, NgModule } from '@angular/core';
|
|
2
|
+
import { Injectable, inject, InjectionToken, Optional, SkipSelf, Inject, NgModule } from '@angular/core';
|
|
3
3
|
import { Subject, filter } from 'rxjs';
|
|
4
4
|
import { cloneDeep, get, set } from 'lodash-es';
|
|
5
5
|
import { setSmart } from '@acorex/platform/core';
|
|
6
|
+
import { AXPCommandService, AXPCommandRegistry, AXPQueryService, provideCommandSetups, AXP_COMMAND_SETUP } from '@acorex/platform/runtime';
|
|
7
|
+
import { AXDialogService } from '@acorex/components/dialog';
|
|
8
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
9
|
+
import { AXToastService } from '@acorex/components/toast';
|
|
10
|
+
import { Router } from '@angular/router';
|
|
6
11
|
|
|
7
12
|
class AXPWorkflowError extends Error {
|
|
8
13
|
constructor(message, inner = null) {
|
|
@@ -22,10 +27,10 @@ class AXPWorkflowEventService {
|
|
|
22
27
|
get events$() {
|
|
23
28
|
return this.eventSubject.asObservable();
|
|
24
29
|
}
|
|
25
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
26
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
30
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
31
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowEventService, providedIn: 'root' }); }
|
|
27
32
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowEventService, decorators: [{
|
|
29
34
|
type: Injectable,
|
|
30
35
|
args: [{
|
|
31
36
|
providedIn: 'root',
|
|
@@ -115,10 +120,10 @@ class AXPWorkflowRegistryService {
|
|
|
115
120
|
});
|
|
116
121
|
}
|
|
117
122
|
}
|
|
118
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
119
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
123
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
124
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowRegistryService, providedIn: 'root' }); }
|
|
120
125
|
}
|
|
121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowRegistryService, decorators: [{
|
|
122
127
|
type: Injectable,
|
|
123
128
|
args: [{
|
|
124
129
|
providedIn: 'root',
|
|
@@ -157,17 +162,17 @@ class AXPWorkflowAction {
|
|
|
157
162
|
dispatch(event) {
|
|
158
163
|
this.eventService.dispatch(event);
|
|
159
164
|
}
|
|
160
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
161
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
165
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowAction, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
166
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowAction }); }
|
|
162
167
|
}
|
|
163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowAction, decorators: [{
|
|
164
169
|
type: Injectable
|
|
165
170
|
}] });
|
|
166
171
|
class AXPWorkflowFunction {
|
|
167
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
168
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
172
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowFunction, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
173
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowFunction }); }
|
|
169
174
|
}
|
|
170
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowFunction, decorators: [{
|
|
171
176
|
type: Injectable
|
|
172
177
|
}] });
|
|
173
178
|
function createWorkFlowEvent(type) {
|
|
@@ -183,10 +188,10 @@ class AXPWorkflowDecideAction extends AXPWorkflowAction {
|
|
|
183
188
|
async execute(context) {
|
|
184
189
|
// its a fake action
|
|
185
190
|
}
|
|
186
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
187
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
191
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowDecideAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
192
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowDecideAction, providedIn: 'root' }); }
|
|
188
193
|
}
|
|
189
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowDecideAction, decorators: [{
|
|
190
195
|
type: Injectable,
|
|
191
196
|
args: [{
|
|
192
197
|
providedIn: 'root',
|
|
@@ -372,10 +377,10 @@ class AXPWorkflowService {
|
|
|
372
377
|
}
|
|
373
378
|
return this.injector.get(functionType);
|
|
374
379
|
}
|
|
375
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
376
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
380
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowService, deps: [{ token: AXPWorkflowRegistryService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
381
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowService, providedIn: 'root' }); }
|
|
377
382
|
}
|
|
378
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
383
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowService, decorators: [{
|
|
379
384
|
type: Injectable,
|
|
380
385
|
args: [{
|
|
381
386
|
providedIn: 'root',
|
|
@@ -400,21 +405,1393 @@ class AXPStartWorkflowAction extends AXPWorkflowAction {
|
|
|
400
405
|
throw e;
|
|
401
406
|
}
|
|
402
407
|
}
|
|
403
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
404
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
408
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPStartWorkflowAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
409
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPStartWorkflowAction, providedIn: 'root' }); }
|
|
405
410
|
}
|
|
406
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPStartWorkflowAction, decorators: [{
|
|
407
412
|
type: Injectable,
|
|
408
413
|
args: [{
|
|
409
414
|
providedIn: 'root',
|
|
410
415
|
}]
|
|
411
416
|
}] });
|
|
412
417
|
|
|
418
|
+
// ============================================
|
|
419
|
+
// WORKFLOW INSTANCE v3.0.0 TYPES
|
|
420
|
+
// Based on Elsa Workflow Instance schema: https://elsaworkflows.io/schemas/workflow-instance/v3.0.0/schema.json
|
|
421
|
+
// Compatible with Elsa backend while using ACoreX naming conventions
|
|
422
|
+
// ============================================
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Base abstract class for activities.
|
|
426
|
+
* Extend this to create custom activities.
|
|
427
|
+
*/
|
|
428
|
+
class Activity {
|
|
429
|
+
constructor(type, name) {
|
|
430
|
+
this.type = type;
|
|
431
|
+
this.name = name;
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Helper method that returns Done outcome by default.
|
|
435
|
+
*/
|
|
436
|
+
createResult(output, outcome = 'Done') {
|
|
437
|
+
return {
|
|
438
|
+
output,
|
|
439
|
+
outcomes: { [outcome]: true }
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* Activity registry for registering and creating activities.
|
|
445
|
+
*/
|
|
446
|
+
class ActivityRegistry {
|
|
447
|
+
constructor() {
|
|
448
|
+
this.registry = new Map();
|
|
449
|
+
this.descriptors = new Map();
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Register an activity type.
|
|
453
|
+
*/
|
|
454
|
+
register(type, factory, descriptor) {
|
|
455
|
+
this.registry.set(type, factory);
|
|
456
|
+
this.descriptors.set(type, descriptor);
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Create an activity instance.
|
|
460
|
+
*/
|
|
461
|
+
create(type) {
|
|
462
|
+
const factory = this.registry.get(type);
|
|
463
|
+
if (!factory) {
|
|
464
|
+
throw new Error(`Unknown activity type: ${type}`);
|
|
465
|
+
}
|
|
466
|
+
return factory();
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Get activity descriptor.
|
|
470
|
+
*/
|
|
471
|
+
getDescriptor(type) {
|
|
472
|
+
return this.descriptors.get(type);
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Get all registered types.
|
|
476
|
+
*/
|
|
477
|
+
getTypes() {
|
|
478
|
+
return Array.from(this.registry.keys());
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Get all descriptors.
|
|
482
|
+
*/
|
|
483
|
+
getAllDescriptors() {
|
|
484
|
+
return Array.from(this.descriptors.values());
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Get descriptors by category.
|
|
488
|
+
*/
|
|
489
|
+
getDescriptorsByCategory(category) {
|
|
490
|
+
return this.getAllDescriptors().filter(d => d.category === category);
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Injection token for activity providers.
|
|
496
|
+
*/
|
|
497
|
+
const AXP_ACTIVITY_PROVIDER = new InjectionToken('AXP_ACTIVITY_PROVIDER');
|
|
498
|
+
/**
|
|
499
|
+
* Activity Provider Service.
|
|
500
|
+
* Collects all activity providers and manages activity registration.
|
|
501
|
+
*/
|
|
502
|
+
class AXPActivityProviderService {
|
|
503
|
+
constructor() {
|
|
504
|
+
this.activityDescriptors = new Map();
|
|
505
|
+
this.categories = [];
|
|
506
|
+
this.providers = [];
|
|
507
|
+
this.categoryProviders = [];
|
|
508
|
+
this.initialized = false;
|
|
509
|
+
this.commandService = inject(AXPCommandService);
|
|
510
|
+
this.commandRegistry = inject(AXPCommandRegistry);
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Register an activity provider.
|
|
514
|
+
*/
|
|
515
|
+
registerProvider(provider) {
|
|
516
|
+
this.providers.push(provider);
|
|
517
|
+
if (this.initialized) {
|
|
518
|
+
this.initializeProvider(provider);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Register a category provider.
|
|
523
|
+
*/
|
|
524
|
+
registerCategoryProvider(provider) {
|
|
525
|
+
this.categoryProviders.push(provider);
|
|
526
|
+
if (this.initialized) {
|
|
527
|
+
this.initializeCategoryProvider(provider);
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Initialize all providers.
|
|
532
|
+
*/
|
|
533
|
+
async initialize() {
|
|
534
|
+
if (this.initialized)
|
|
535
|
+
return;
|
|
536
|
+
// Initialize category providers first
|
|
537
|
+
for (const provider of this.categoryProviders) {
|
|
538
|
+
await this.initializeCategoryProvider(provider);
|
|
539
|
+
}
|
|
540
|
+
// Initialize activity providers
|
|
541
|
+
for (const provider of this.providers) {
|
|
542
|
+
await this.initializeProvider(provider);
|
|
543
|
+
}
|
|
544
|
+
this.initialized = true;
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* Get activity descriptor by key.
|
|
548
|
+
*/
|
|
549
|
+
getDescriptor(key) {
|
|
550
|
+
return this.activityDescriptors.get(key);
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Get all activity descriptors.
|
|
554
|
+
*/
|
|
555
|
+
getAllDescriptors() {
|
|
556
|
+
return Array.from(this.activityDescriptors.values());
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Get descriptors by category.
|
|
560
|
+
*/
|
|
561
|
+
getDescriptorsByCategory(category) {
|
|
562
|
+
return this.getAllDescriptors().filter(d => d.category === category);
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Get all categories.
|
|
566
|
+
*/
|
|
567
|
+
getCategories() {
|
|
568
|
+
return [...this.categories].sort((a, b) => (a.order || 999) - (b.order || 999));
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* Create an activity instance by key using AXPCommandService.
|
|
572
|
+
*/
|
|
573
|
+
async createActivity(key) {
|
|
574
|
+
try {
|
|
575
|
+
// Check if command exists
|
|
576
|
+
if (!this.commandService.exists(key)) {
|
|
577
|
+
return null;
|
|
578
|
+
}
|
|
579
|
+
// Get command loader from registry
|
|
580
|
+
const loader = this.commandRegistry.getLoader(key);
|
|
581
|
+
if (!loader) {
|
|
582
|
+
return null;
|
|
583
|
+
}
|
|
584
|
+
// Create command instance
|
|
585
|
+
const command = await loader();
|
|
586
|
+
return command;
|
|
587
|
+
}
|
|
588
|
+
catch (error) {
|
|
589
|
+
return null;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
// ============================================
|
|
593
|
+
// PRIVATE METHODS
|
|
594
|
+
// ============================================
|
|
595
|
+
async initializeProvider(provider) {
|
|
596
|
+
const context = {
|
|
597
|
+
registerActivity: (config) => {
|
|
598
|
+
this.activityDescriptors.set(config.key, config.descriptor);
|
|
599
|
+
}
|
|
600
|
+
};
|
|
601
|
+
await provider.provide(context);
|
|
602
|
+
}
|
|
603
|
+
async initializeCategoryProvider(provider) {
|
|
604
|
+
const context = {
|
|
605
|
+
registerCategories: (categories) => {
|
|
606
|
+
this.categories.push(...categories);
|
|
607
|
+
}
|
|
608
|
+
};
|
|
609
|
+
await provider.provide(context);
|
|
610
|
+
}
|
|
611
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPActivityProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
612
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPActivityProviderService, providedIn: 'root' }); }
|
|
613
|
+
}
|
|
614
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPActivityProviderService, decorators: [{
|
|
615
|
+
type: Injectable,
|
|
616
|
+
args: [{
|
|
617
|
+
providedIn: 'root'
|
|
618
|
+
}]
|
|
619
|
+
}] });
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* Injection token for activity category providers.
|
|
623
|
+
*/
|
|
624
|
+
const AXP_ACTIVITY_CATEGORY_PROVIDER = new InjectionToken('AXP_ACTIVITY_CATEGORY_PROVIDER');
|
|
625
|
+
class AXPActivityCategoryProviderService {
|
|
626
|
+
constructor(parent, providers = []) {
|
|
627
|
+
this.parent = parent;
|
|
628
|
+
this.providers = providers;
|
|
629
|
+
this.categories = new Map();
|
|
630
|
+
this.isInitialized = false;
|
|
631
|
+
if (!parent) {
|
|
632
|
+
this.initialize();
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
async initialize() {
|
|
636
|
+
if (this.isInitialized) {
|
|
637
|
+
return;
|
|
638
|
+
}
|
|
639
|
+
for (const provider of this.providers) {
|
|
640
|
+
await provider.provide({
|
|
641
|
+
registerCategories: (categories) => {
|
|
642
|
+
categories.forEach(cat => this.categories.set(cat.name, cat));
|
|
643
|
+
}
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
this.isInitialized = true;
|
|
647
|
+
}
|
|
648
|
+
getAllCategories() {
|
|
649
|
+
return Array.from(this.categories.values()).sort((a, b) => (a.order || 0) - (b.order || 0));
|
|
650
|
+
}
|
|
651
|
+
getCategory(name) {
|
|
652
|
+
return this.categories.get(name);
|
|
653
|
+
}
|
|
654
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPActivityCategoryProviderService, deps: [{ token: AXPActivityCategoryProviderService, optional: true, skipSelf: true }, { token: AXP_ACTIVITY_CATEGORY_PROVIDER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
655
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPActivityCategoryProviderService, providedIn: 'root' }); }
|
|
656
|
+
}
|
|
657
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPActivityCategoryProviderService, decorators: [{
|
|
658
|
+
type: Injectable,
|
|
659
|
+
args: [{ providedIn: 'root' }]
|
|
660
|
+
}], ctorParameters: () => [{ type: AXPActivityCategoryProviderService, decorators: [{
|
|
661
|
+
type: Optional
|
|
662
|
+
}, {
|
|
663
|
+
type: SkipSelf
|
|
664
|
+
}] }, { type: undefined, decorators: [{
|
|
665
|
+
type: Optional
|
|
666
|
+
}, {
|
|
667
|
+
type: Inject,
|
|
668
|
+
args: [AXP_ACTIVITY_CATEGORY_PROVIDER]
|
|
669
|
+
}] }] });
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* Abstract service for workflow execution operations.
|
|
673
|
+
*
|
|
674
|
+
* This service handles communication with backend for workflow execution.
|
|
675
|
+
*
|
|
676
|
+
* Implementation should be provided in connectivity layer:
|
|
677
|
+
* - Mock implementation: @acorex/connectivity/mock
|
|
678
|
+
* - API implementation: @acorex/connectivity/api
|
|
679
|
+
*
|
|
680
|
+
* @example
|
|
681
|
+
* ```typescript
|
|
682
|
+
* // In connectivity/mock
|
|
683
|
+
* @Injectable()
|
|
684
|
+
* export class AXCWorkflowExecutionService implements AXPWorkflowExecutionService {
|
|
685
|
+
* async startExecution(request: AXPStartWorkflowExecutionRequest): Promise<AXPStartWorkflowExecutionResponse> {
|
|
686
|
+
* // Mock implementation
|
|
687
|
+
* }
|
|
688
|
+
* }
|
|
689
|
+
*
|
|
690
|
+
* // In connectivity/api
|
|
691
|
+
* @Injectable()
|
|
692
|
+
* export class AXCWorkflowExecutionService implements AXPWorkflowExecutionService {
|
|
693
|
+
* constructor(private http: HttpClient) {}
|
|
694
|
+
*
|
|
695
|
+
* async startExecution(request: AXPStartWorkflowExecutionRequest): Promise<AXPStartWorkflowExecutionResponse> {
|
|
696
|
+
* return firstValueFrom(
|
|
697
|
+
* this.http.post<AXPStartWorkflowExecutionResponse>(
|
|
698
|
+
* `${this.config.baseUrl}/api/workflows/${request.workflowId}/start`,
|
|
699
|
+
* { input: request.input }
|
|
700
|
+
* )
|
|
701
|
+
* );
|
|
702
|
+
* }
|
|
703
|
+
* }
|
|
704
|
+
* ```
|
|
705
|
+
*/
|
|
706
|
+
class AXPWorkflowExecutionService {
|
|
707
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowExecutionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
708
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowExecutionService }); }
|
|
709
|
+
}
|
|
710
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowExecutionService, decorators: [{
|
|
711
|
+
type: Injectable
|
|
712
|
+
}] });
|
|
713
|
+
|
|
714
|
+
//#endregion
|
|
715
|
+
/**
|
|
716
|
+
* Production Workflow Coordinator.
|
|
717
|
+
*
|
|
718
|
+
* Separates frontend/backend execution:
|
|
719
|
+
* - Frontend activities: Execute with AXPCommand in browser
|
|
720
|
+
* - Backend activities: Execute via API calls to backend
|
|
721
|
+
* - State caching: Caches workflow state in client for performance
|
|
722
|
+
*
|
|
723
|
+
* ✅ Suitable for production use.
|
|
724
|
+
*/
|
|
725
|
+
class WorkflowCoordinator {
|
|
726
|
+
constructor() {
|
|
727
|
+
//#region ---- Services & Dependencies ----
|
|
728
|
+
this.workflowExecutionService = inject(AXPWorkflowExecutionService);
|
|
729
|
+
this.commandService = inject(AXPCommandService);
|
|
730
|
+
//#endregion
|
|
731
|
+
//#region ---- State Cache (Client-side for Performance) ----
|
|
732
|
+
/**
|
|
733
|
+
* Cache workflow states in memory for quick access.
|
|
734
|
+
* Key: executionId
|
|
735
|
+
* Value: AXPWorkflowExecutionState
|
|
736
|
+
*/
|
|
737
|
+
this.stateCache = new Map();
|
|
738
|
+
}
|
|
739
|
+
//#endregion
|
|
740
|
+
//#region ---- Public Methods ----
|
|
741
|
+
/**
|
|
742
|
+
* Start workflow execution in backend.
|
|
743
|
+
*
|
|
744
|
+
* Backend decides what to do: returns pendingTask or indicates completion.
|
|
745
|
+
* Frontend only calls API - no business logic here.
|
|
746
|
+
*
|
|
747
|
+
* @param workflowId - Workflow ID
|
|
748
|
+
* @param input - Initial input data
|
|
749
|
+
* @returns Execution result with pendingTask (if any)
|
|
750
|
+
*
|
|
751
|
+
* @example
|
|
752
|
+
* ```typescript
|
|
753
|
+
* const result = await coordinator.startWorkflow('my-workflow', { userId: '123' });
|
|
754
|
+
*
|
|
755
|
+
* if (result.pendingTask) {
|
|
756
|
+
* // Execute task if frontend, or wait for backend to complete
|
|
757
|
+
* if (result.pendingTask.executionMode === 'frontend') {
|
|
758
|
+
* await coordinator.executeTask(result.pendingTask);
|
|
759
|
+
* await coordinator.completeTask(result.executionId, result.pendingTask, outcome, output);
|
|
760
|
+
* }
|
|
761
|
+
* }
|
|
762
|
+
* ```
|
|
763
|
+
*/
|
|
764
|
+
async startWorkflow(workflowId, input = {}) {
|
|
765
|
+
try {
|
|
766
|
+
const execution = await this.startWorkflowExecution(workflowId, input);
|
|
767
|
+
return {
|
|
768
|
+
success: true,
|
|
769
|
+
output: execution.state.output,
|
|
770
|
+
nextTask: execution.pendingTask || null,
|
|
771
|
+
executionId: execution.executionId,
|
|
772
|
+
state: execution.state
|
|
773
|
+
};
|
|
774
|
+
}
|
|
775
|
+
catch (error) {
|
|
776
|
+
return {
|
|
777
|
+
success: false,
|
|
778
|
+
error: error.message || 'Failed to start workflow',
|
|
779
|
+
nextTask: null
|
|
780
|
+
};
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Execute a frontend task using AXPCommand.
|
|
785
|
+
*
|
|
786
|
+
* Only executes if task.executionMode is 'frontend' or 'both'.
|
|
787
|
+
* Backend tasks are handled automatically by backend.
|
|
788
|
+
*
|
|
789
|
+
* @param task - Task to execute
|
|
790
|
+
* @returns Execution result with output and outcome
|
|
791
|
+
*/
|
|
792
|
+
async executeTask(task) {
|
|
793
|
+
// Only execute frontend tasks
|
|
794
|
+
if (task.executionMode !== 'frontend' && task.executionMode !== 'both') {
|
|
795
|
+
throw new Error(`Task '${task.activityId}' is not a frontend task. Backend handles it automatically.`);
|
|
796
|
+
}
|
|
797
|
+
return await this.executeFrontendActivity(task);
|
|
798
|
+
}
|
|
799
|
+
/**
|
|
800
|
+
* Complete a task and get next task from backend.
|
|
801
|
+
*
|
|
802
|
+
* Sends task result to backend API.
|
|
803
|
+
* Backend decides: next task, fail, or complete workflow.
|
|
804
|
+
*
|
|
805
|
+
* @param executionId - Execution ID
|
|
806
|
+
* @param task - Completed task
|
|
807
|
+
* @param outcome - Task outcome (e.g., 'Done', 'Confirmed', 'Cancelled')
|
|
808
|
+
* @param output - Task output/result
|
|
809
|
+
* @returns Next task from backend (if any)
|
|
810
|
+
*/
|
|
811
|
+
async completeTask(executionId, task, outcome, output) {
|
|
812
|
+
try {
|
|
813
|
+
// Send result to backend - backend decides next step
|
|
814
|
+
const response = await this.workflowExecutionService.resumeExecution({
|
|
815
|
+
executionId,
|
|
816
|
+
stepId: task.activityId,
|
|
817
|
+
taskToken: task.taskToken,
|
|
818
|
+
outcome,
|
|
819
|
+
userInput: output
|
|
820
|
+
});
|
|
821
|
+
// Update cache
|
|
822
|
+
if (response.state) {
|
|
823
|
+
this.stateCache.set(executionId, response.state);
|
|
824
|
+
}
|
|
825
|
+
return {
|
|
826
|
+
success: true,
|
|
827
|
+
output: response.output,
|
|
828
|
+
nextTask: response.nextTask || null,
|
|
829
|
+
executionId,
|
|
830
|
+
state: response.state
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
catch (error) {
|
|
834
|
+
return {
|
|
835
|
+
success: false,
|
|
836
|
+
error: error.message || 'Failed to complete task',
|
|
837
|
+
nextTask: null
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
/**
|
|
842
|
+
* Execute workflow by ID (backward compatibility).
|
|
843
|
+
*
|
|
844
|
+
* @deprecated Use startWorkflow + executeTask + completeTask pattern instead.
|
|
845
|
+
* This method is kept for backward compatibility but will be removed.
|
|
846
|
+
*/
|
|
847
|
+
async executeWorkflowById(workflowId, input = {}) {
|
|
848
|
+
// Just start workflow - caller should handle task execution
|
|
849
|
+
return await this.startWorkflow(workflowId, input);
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* Resume a suspended workflow (e.g., after user interaction).
|
|
853
|
+
*
|
|
854
|
+
* Backend determines nextStep based on outcome and outcomeConnections.
|
|
855
|
+
* Client only provides executionId, stepId, outcome, and optional userInput.
|
|
856
|
+
*
|
|
857
|
+
* @param executionId - Workflow execution ID
|
|
858
|
+
* @param stepId - Step ID that was waiting for user input
|
|
859
|
+
* @param outcome - User action outcome (e.g., 'Confirmed', 'Cancelled', 'Submitted')
|
|
860
|
+
* @param userInput - Optional user input data
|
|
861
|
+
*/
|
|
862
|
+
async resumeWorkflow(executionId, stepId, outcome, userInput, taskToken) {
|
|
863
|
+
try {
|
|
864
|
+
// Ensure taskToken is provided for secure resumption
|
|
865
|
+
if (!taskToken) {
|
|
866
|
+
throw new Error('Missing taskToken for resumeWorkflow');
|
|
867
|
+
}
|
|
868
|
+
// Backend handles everything: checks outcomeConnections and determines nextStep
|
|
869
|
+
const response = await this.workflowExecutionService.resumeExecution({
|
|
870
|
+
executionId,
|
|
871
|
+
stepId,
|
|
872
|
+
taskToken,
|
|
873
|
+
outcome,
|
|
874
|
+
userInput
|
|
875
|
+
});
|
|
876
|
+
// Update cache with state from backend
|
|
877
|
+
if (response.state) {
|
|
878
|
+
this.stateCache.set(executionId, response.state);
|
|
879
|
+
}
|
|
880
|
+
return {
|
|
881
|
+
success: true,
|
|
882
|
+
output: response.output,
|
|
883
|
+
nextTask: response.nextTask || null, // Backend determines this from outcomeConnections
|
|
884
|
+
executionId,
|
|
885
|
+
state: response.state
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
catch (error) {
|
|
889
|
+
return {
|
|
890
|
+
success: false,
|
|
891
|
+
error: error.message || 'Failed to resume workflow',
|
|
892
|
+
nextTask: null
|
|
893
|
+
};
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* Get workflow execution state (from cache or backend).
|
|
898
|
+
*/
|
|
899
|
+
async getWorkflowState(executionId) {
|
|
900
|
+
// Check cache first
|
|
901
|
+
const cached = this.stateCache.get(executionId);
|
|
902
|
+
if (cached) {
|
|
903
|
+
// Cache is valid for 5 minutes
|
|
904
|
+
const cacheAge = Date.now() - cached.lastUpdated.getTime();
|
|
905
|
+
if (cacheAge < 5 * 60 * 1000) {
|
|
906
|
+
return cached;
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
// Fetch from backend
|
|
910
|
+
try {
|
|
911
|
+
const state = await this.workflowExecutionService.getExecutionState({
|
|
912
|
+
executionId
|
|
913
|
+
});
|
|
914
|
+
// Update cache
|
|
915
|
+
this.stateCache.set(executionId, state);
|
|
916
|
+
return state;
|
|
917
|
+
}
|
|
918
|
+
catch {
|
|
919
|
+
return null;
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
//#endregion
|
|
923
|
+
//#region ---- Private Methods ----
|
|
924
|
+
/**
|
|
925
|
+
* Execute a frontend activity using CommandBus.
|
|
926
|
+
*
|
|
927
|
+
* Frontend activities are executed in the browser using AXPCommandService.
|
|
928
|
+
* Activities can also be executed in both frontend and backend (hybrid mode).
|
|
929
|
+
*
|
|
930
|
+
* @param task - Frontend task to execute
|
|
931
|
+
* @returns Execution result with output and outcome
|
|
932
|
+
*/
|
|
933
|
+
async executeFrontendActivity(task) {
|
|
934
|
+
try {
|
|
935
|
+
// Check if command exists
|
|
936
|
+
if (!this.commandService.exists(task.activityType)) {
|
|
937
|
+
console.warn(`[WorkflowCoordinator] Frontend activity '${task.activityType}' is not registered. Skipping execution.`);
|
|
938
|
+
return {
|
|
939
|
+
output: null,
|
|
940
|
+
outcome: 'Done'
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
// Execute activity via CommandBus
|
|
944
|
+
// Activities registered as AXPCommand return {output, outcomes}
|
|
945
|
+
const result = await this.commandService.execute(task.activityType, task.input || task.config || {});
|
|
946
|
+
// Extract outcome from outcomes (usually 'Done' or first key)
|
|
947
|
+
let outcome = 'Done';
|
|
948
|
+
if (result?.outcomes) {
|
|
949
|
+
// Prefer 'Done' if exists, otherwise use first outcome key
|
|
950
|
+
outcome = result.outcomes['Done'] ? 'Done' : Object.keys(result.outcomes)[0] || 'Done';
|
|
951
|
+
}
|
|
952
|
+
return {
|
|
953
|
+
output: result?.output || result,
|
|
954
|
+
outcome
|
|
955
|
+
};
|
|
956
|
+
}
|
|
957
|
+
catch (error) {
|
|
958
|
+
console.error(`[WorkflowCoordinator] Error executing frontend activity '${task.activityType}':`, error);
|
|
959
|
+
return {
|
|
960
|
+
output: { error: error.message || 'Unknown error' },
|
|
961
|
+
outcome: 'Failed'
|
|
962
|
+
};
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
/**
|
|
966
|
+
* Start workflow execution in backend.
|
|
967
|
+
* Backend returns executionId, initial state, and first task to execute.
|
|
968
|
+
*/
|
|
969
|
+
async startWorkflowExecution(workflowId, input) {
|
|
970
|
+
const response = await this.workflowExecutionService.startExecution({
|
|
971
|
+
workflowId,
|
|
972
|
+
input
|
|
973
|
+
});
|
|
974
|
+
// Cache state
|
|
975
|
+
this.stateCache.set(response.executionId, response.state);
|
|
976
|
+
return {
|
|
977
|
+
executionId: response.executionId,
|
|
978
|
+
state: response.state,
|
|
979
|
+
pendingTask: response.pendingTask
|
|
980
|
+
};
|
|
981
|
+
}
|
|
982
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: WorkflowCoordinator, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
983
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: WorkflowCoordinator, providedIn: 'root' }); }
|
|
984
|
+
}
|
|
985
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: WorkflowCoordinator, decorators: [{
|
|
986
|
+
type: Injectable,
|
|
987
|
+
args: [{
|
|
988
|
+
providedIn: 'root'
|
|
989
|
+
}]
|
|
990
|
+
}] });
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* Types and interfaces for Workflow Execution Service.
|
|
994
|
+
*/
|
|
995
|
+
|
|
996
|
+
// Production Workflow Coordinator (Frontend/Backend Separation)
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* WriteLine Activity - Simple console logging activity.
|
|
1000
|
+
*
|
|
1001
|
+
* Usage:
|
|
1002
|
+
* ```typescript
|
|
1003
|
+
* const activity = new WriteLine();
|
|
1004
|
+
* await activity.execute({ text: 'Hello World' });
|
|
1005
|
+
* ```
|
|
1006
|
+
*/
|
|
1007
|
+
class WriteLine extends Activity {
|
|
1008
|
+
constructor() {
|
|
1009
|
+
super('WriteLine');
|
|
1010
|
+
}
|
|
1011
|
+
async execute(input) {
|
|
1012
|
+
const text = input.text || '';
|
|
1013
|
+
if (text !== undefined && text !== null) {
|
|
1014
|
+
console.log(`[WriteLine] ${text}`);
|
|
1015
|
+
}
|
|
1016
|
+
return this.createResult(undefined, 'Done');
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
var writeLine_activity = /*#__PURE__*/Object.freeze({
|
|
1021
|
+
__proto__: null,
|
|
1022
|
+
WriteLine: WriteLine
|
|
1023
|
+
});
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* Sequence Activity - Executes activities in sequential order.
|
|
1027
|
+
*
|
|
1028
|
+
* Usage:
|
|
1029
|
+
* ```typescript
|
|
1030
|
+
* const sequence = new Sequence();
|
|
1031
|
+
* sequence.activities = [activity1, activity2, activity3];
|
|
1032
|
+
* await sequence.execute({});
|
|
1033
|
+
* ```
|
|
1034
|
+
*/
|
|
1035
|
+
class Sequence extends Activity {
|
|
1036
|
+
constructor() {
|
|
1037
|
+
super('Sequence');
|
|
1038
|
+
/**
|
|
1039
|
+
* Activities to execute in sequence.
|
|
1040
|
+
*/
|
|
1041
|
+
this.activities = [];
|
|
1042
|
+
}
|
|
1043
|
+
async execute(input) {
|
|
1044
|
+
// Execute all activities in sequence
|
|
1045
|
+
for (const activity of this.activities) {
|
|
1046
|
+
await activity.execute(input);
|
|
1047
|
+
}
|
|
1048
|
+
return this.createResult(undefined, 'Done');
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
var sequence_activity = /*#__PURE__*/Object.freeze({
|
|
1053
|
+
__proto__: null,
|
|
1054
|
+
Sequence: Sequence
|
|
1055
|
+
});
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* Show Confirm Dialog Activity - Displays confirmation dialog to user.
|
|
1059
|
+
*
|
|
1060
|
+
* Has two outcomes:
|
|
1061
|
+
* - 'Confirmed': User clicked confirm/yes
|
|
1062
|
+
* - 'Cancelled': User clicked cancel/no
|
|
1063
|
+
*
|
|
1064
|
+
* Usage:
|
|
1065
|
+
* ```typescript
|
|
1066
|
+
* const dialog = new ShowConfirmDialog();
|
|
1067
|
+
* await dialog.execute({
|
|
1068
|
+
* title: 'Confirm Delete',
|
|
1069
|
+
* message: 'Are you sure?',
|
|
1070
|
+
* color: 'danger'
|
|
1071
|
+
* });
|
|
1072
|
+
* ```
|
|
1073
|
+
*/
|
|
1074
|
+
class ShowConfirmDialog extends Activity {
|
|
1075
|
+
//#endregion
|
|
1076
|
+
constructor() {
|
|
1077
|
+
super('ShowConfirmDialog');
|
|
1078
|
+
//#region ---- Services & Dependencies ----
|
|
1079
|
+
this.dialogService = inject(AXDialogService);
|
|
1080
|
+
this.translationService = inject(AXTranslationService);
|
|
1081
|
+
}
|
|
1082
|
+
async execute(input) {
|
|
1083
|
+
const { title = '', message = '', color = 'primary', defaultAction = 'cancel', align = 'horizontal', backdrop = false } = input;
|
|
1084
|
+
// Translate title and message only if they start with '@' (translation key)
|
|
1085
|
+
// Otherwise use the text as-is
|
|
1086
|
+
const translatedTitle = title
|
|
1087
|
+
? (title.startsWith('@')
|
|
1088
|
+
? await this.translationService.translateAsync(title) || title
|
|
1089
|
+
: title)
|
|
1090
|
+
: '';
|
|
1091
|
+
const translatedMessage = message
|
|
1092
|
+
? (message.startsWith('@')
|
|
1093
|
+
? await this.translationService.translateAsync(message) || message
|
|
1094
|
+
: message)
|
|
1095
|
+
: '';
|
|
1096
|
+
try {
|
|
1097
|
+
const confirmResult = await this.dialogService.confirm(translatedTitle, translatedMessage, color, align, backdrop, defaultAction);
|
|
1098
|
+
const result = confirmResult.result;
|
|
1099
|
+
const action = result ? 'confirm' : 'cancel';
|
|
1100
|
+
return this.createResult({
|
|
1101
|
+
result,
|
|
1102
|
+
action
|
|
1103
|
+
}, result ? 'Confirmed' : 'Cancelled');
|
|
1104
|
+
}
|
|
1105
|
+
catch (err) {
|
|
1106
|
+
console.error('[ShowConfirmDialog] Error showing dialog:', err);
|
|
1107
|
+
return this.createResult({
|
|
1108
|
+
result: false,
|
|
1109
|
+
action: 'error'
|
|
1110
|
+
}, 'Cancelled');
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
var showConfirmDialog_activity = /*#__PURE__*/Object.freeze({
|
|
1116
|
+
__proto__: null,
|
|
1117
|
+
ShowConfirmDialog: ShowConfirmDialog
|
|
1118
|
+
});
|
|
1119
|
+
|
|
1120
|
+
/**
|
|
1121
|
+
* Show Alert Dialog Activity - Displays alert dialog to user.
|
|
1122
|
+
*
|
|
1123
|
+
* Has one outcome:
|
|
1124
|
+
* - 'Done': User clicked OK
|
|
1125
|
+
*
|
|
1126
|
+
* Usage:
|
|
1127
|
+
* ```typescript
|
|
1128
|
+
* const dialog = new ShowAlertDialog();
|
|
1129
|
+
* await dialog.execute({
|
|
1130
|
+
* title: 'Alert',
|
|
1131
|
+
* message: 'This is an alert',
|
|
1132
|
+
* color: 'info'
|
|
1133
|
+
* });
|
|
1134
|
+
* ```
|
|
1135
|
+
*/
|
|
1136
|
+
class ShowAlertDialog extends Activity {
|
|
1137
|
+
//#endregion
|
|
1138
|
+
constructor() {
|
|
1139
|
+
super('ShowAlertDialog');
|
|
1140
|
+
//#region ---- Services & Dependencies ----
|
|
1141
|
+
this.dialogService = inject(AXDialogService);
|
|
1142
|
+
this.translationService = inject(AXTranslationService);
|
|
1143
|
+
}
|
|
1144
|
+
async execute(input) {
|
|
1145
|
+
const { title = '', message = '', color = 'primary' } = input;
|
|
1146
|
+
// Translate title and message only if they start with '@' (translation key)
|
|
1147
|
+
// Otherwise use the text as-is
|
|
1148
|
+
const translatedTitle = title
|
|
1149
|
+
? (title.startsWith('@')
|
|
1150
|
+
? await this.translationService.translateAsync(title) || title
|
|
1151
|
+
: title)
|
|
1152
|
+
: '';
|
|
1153
|
+
const translatedMessage = message
|
|
1154
|
+
? (message.startsWith('@')
|
|
1155
|
+
? await this.translationService.translateAsync(message) || message
|
|
1156
|
+
: message)
|
|
1157
|
+
: '';
|
|
1158
|
+
try {
|
|
1159
|
+
await this.dialogService.alert(translatedTitle, translatedMessage, color);
|
|
1160
|
+
return this.createResult({
|
|
1161
|
+
result: true,
|
|
1162
|
+
action: 'ok'
|
|
1163
|
+
}, 'Done');
|
|
1164
|
+
}
|
|
1165
|
+
catch (err) {
|
|
1166
|
+
console.error('[ShowAlertDialog] Error showing dialog:', err);
|
|
1167
|
+
return this.createResult({
|
|
1168
|
+
result: false,
|
|
1169
|
+
action: 'error'
|
|
1170
|
+
}, 'Done');
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
var showAlertDialog_activity = /*#__PURE__*/Object.freeze({
|
|
1176
|
+
__proto__: null,
|
|
1177
|
+
ShowAlertDialog: ShowAlertDialog
|
|
1178
|
+
});
|
|
1179
|
+
|
|
1180
|
+
/**
|
|
1181
|
+
* Show Toast Activity - Displays toast notification to user.
|
|
1182
|
+
*
|
|
1183
|
+
* Usage:
|
|
1184
|
+
* ```typescript
|
|
1185
|
+
* const toast = new ShowToast();
|
|
1186
|
+
* await toast.execute({
|
|
1187
|
+
* color: 'success',
|
|
1188
|
+
* title: 'Success',
|
|
1189
|
+
* message: 'Operation completed successfully!'
|
|
1190
|
+
* });
|
|
1191
|
+
* ```
|
|
1192
|
+
*/
|
|
1193
|
+
class ShowToast extends Activity {
|
|
1194
|
+
constructor() {
|
|
1195
|
+
super('ShowToast');
|
|
1196
|
+
this.toastService = inject(AXToastService);
|
|
1197
|
+
this.translationService = inject(AXTranslationService);
|
|
1198
|
+
}
|
|
1199
|
+
async execute(input) {
|
|
1200
|
+
const { color = 'primary', title = '', message = '', duration = 3000 } = input;
|
|
1201
|
+
// Translate title and message only if they start with '@' (translation key)
|
|
1202
|
+
// Otherwise use the text as-is
|
|
1203
|
+
const translatedTitle = title
|
|
1204
|
+
? (title.startsWith('@')
|
|
1205
|
+
? await this.translationService.translateAsync(title) || title
|
|
1206
|
+
: title)
|
|
1207
|
+
: '';
|
|
1208
|
+
const translatedMessage = message
|
|
1209
|
+
? (message.startsWith('@')
|
|
1210
|
+
? await this.translationService.translateAsync(message) || message
|
|
1211
|
+
: message)
|
|
1212
|
+
: '';
|
|
1213
|
+
try {
|
|
1214
|
+
await this.toastService.show({
|
|
1215
|
+
color: color,
|
|
1216
|
+
title: translatedTitle,
|
|
1217
|
+
content: translatedMessage,
|
|
1218
|
+
closeButton: true,
|
|
1219
|
+
timeOut: duration,
|
|
1220
|
+
timeOutProgress: true,
|
|
1221
|
+
});
|
|
1222
|
+
return this.createResult(undefined, 'Done');
|
|
1223
|
+
}
|
|
1224
|
+
catch (err) {
|
|
1225
|
+
console.error('[ShowToast] Error showing toast:', err);
|
|
1226
|
+
return this.createResult(undefined, 'Error');
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
var showToast_activity = /*#__PURE__*/Object.freeze({
|
|
1232
|
+
__proto__: null,
|
|
1233
|
+
ShowToast: ShowToast
|
|
1234
|
+
});
|
|
1235
|
+
|
|
1236
|
+
/**
|
|
1237
|
+
* Navigate Activity - Navigates to different pages/routes.
|
|
1238
|
+
*
|
|
1239
|
+
* Usage:
|
|
1240
|
+
* ```typescript
|
|
1241
|
+
* const navigate = new Navigate();
|
|
1242
|
+
* await navigate.execute({
|
|
1243
|
+
* mode: 'route',
|
|
1244
|
+
* route: '/users',
|
|
1245
|
+
* params: { id: '123' }
|
|
1246
|
+
* });
|
|
1247
|
+
* ```
|
|
1248
|
+
*/
|
|
1249
|
+
class Navigate extends Activity {
|
|
1250
|
+
constructor() {
|
|
1251
|
+
super('Navigate');
|
|
1252
|
+
this.router = inject(Router);
|
|
1253
|
+
}
|
|
1254
|
+
async execute(input) {
|
|
1255
|
+
const { mode = 'route', route = '', params = {}, queryParams = {}, entity = '', entityId = '', url = '' } = input;
|
|
1256
|
+
try {
|
|
1257
|
+
switch (mode) {
|
|
1258
|
+
case 'route':
|
|
1259
|
+
await this.router.navigate([route], { queryParams });
|
|
1260
|
+
break;
|
|
1261
|
+
case 'entity-details':
|
|
1262
|
+
const detailsRoute = `/entities/${entity}/details/${entityId}`;
|
|
1263
|
+
await this.router.navigate([detailsRoute], { queryParams });
|
|
1264
|
+
break;
|
|
1265
|
+
case 'entity-list':
|
|
1266
|
+
const listRoute = `/entities/${entity}`;
|
|
1267
|
+
await this.router.navigate([listRoute], { queryParams });
|
|
1268
|
+
break;
|
|
1269
|
+
case 'external':
|
|
1270
|
+
if (url) {
|
|
1271
|
+
window.open(url, '_blank');
|
|
1272
|
+
}
|
|
1273
|
+
break;
|
|
1274
|
+
default:
|
|
1275
|
+
console.error(`[Navigate] Unknown navigation mode: ${mode}`);
|
|
1276
|
+
return this.createResult(undefined, 'Error');
|
|
1277
|
+
}
|
|
1278
|
+
return this.createResult(undefined, 'Done');
|
|
1279
|
+
}
|
|
1280
|
+
catch (err) {
|
|
1281
|
+
console.error('[Navigate] Error navigating:', err);
|
|
1282
|
+
return this.createResult(undefined, 'Error');
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
var navigate_activity = /*#__PURE__*/Object.freeze({
|
|
1288
|
+
__proto__: null,
|
|
1289
|
+
Navigate: Navigate
|
|
1290
|
+
});
|
|
1291
|
+
|
|
1292
|
+
/**
|
|
1293
|
+
* Set Variable Activity - Sets a variable value in workflow context.
|
|
1294
|
+
*
|
|
1295
|
+
* Usage:
|
|
1296
|
+
* ```typescript
|
|
1297
|
+
* const setVar = new SetVariable();
|
|
1298
|
+
* await setVar.execute({
|
|
1299
|
+
* variableName: 'userId',
|
|
1300
|
+
* value: '12345'
|
|
1301
|
+
* });
|
|
1302
|
+
* ```
|
|
1303
|
+
*/
|
|
1304
|
+
class SetVariable extends Activity {
|
|
1305
|
+
constructor() {
|
|
1306
|
+
super('workflow-activity:set-variable', 'Set Variable');
|
|
1307
|
+
}
|
|
1308
|
+
async execute(input) {
|
|
1309
|
+
const { variableName, value } = input;
|
|
1310
|
+
try {
|
|
1311
|
+
// In a real implementation, this would set the variable in workflow context
|
|
1312
|
+
// For now, we'll just log it
|
|
1313
|
+
console.log(`[SetVariable] Setting ${variableName} = ${JSON.stringify(value)}`);
|
|
1314
|
+
return this.createResult(undefined, 'Done');
|
|
1315
|
+
}
|
|
1316
|
+
catch (err) {
|
|
1317
|
+
console.error('[SetVariable] Error setting variable:', err);
|
|
1318
|
+
return this.createResult(undefined, 'Error');
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
var setVariable_activity = /*#__PURE__*/Object.freeze({
|
|
1324
|
+
__proto__: null,
|
|
1325
|
+
SetVariable: SetVariable
|
|
1326
|
+
});
|
|
1327
|
+
|
|
1328
|
+
/**
|
|
1329
|
+
* Dispatch Event Activity - Dispatches an event to the system.
|
|
1330
|
+
*
|
|
1331
|
+
* Usage:
|
|
1332
|
+
* ```typescript
|
|
1333
|
+
* const dispatch = new DispatchEvent();
|
|
1334
|
+
* await dispatch.execute({
|
|
1335
|
+
* eventName: 'user-created',
|
|
1336
|
+
* eventData: { userId: '123', name: 'John' }
|
|
1337
|
+
* });
|
|
1338
|
+
* ```
|
|
1339
|
+
*/
|
|
1340
|
+
class DispatchEvent extends Activity {
|
|
1341
|
+
constructor() {
|
|
1342
|
+
super('DispatchEvent');
|
|
1343
|
+
}
|
|
1344
|
+
async execute(input) {
|
|
1345
|
+
const { eventName, eventData } = input;
|
|
1346
|
+
try {
|
|
1347
|
+
// In a real implementation, this would dispatch the event through an event bus
|
|
1348
|
+
// For now, we'll just log it
|
|
1349
|
+
console.log(`[DispatchEvent] Dispatching event: ${eventName}`, eventData);
|
|
1350
|
+
return this.createResult(undefined, 'Done');
|
|
1351
|
+
}
|
|
1352
|
+
catch (err) {
|
|
1353
|
+
console.error('[DispatchEvent] Error dispatching event:', err);
|
|
1354
|
+
return this.createResult(undefined, 'Error');
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
var dispatchEvent_activity = /*#__PURE__*/Object.freeze({
|
|
1360
|
+
__proto__: null,
|
|
1361
|
+
DispatchEvent: DispatchEvent
|
|
1362
|
+
});
|
|
1363
|
+
|
|
1364
|
+
/**
|
|
1365
|
+
* If Activity - Conditional execution based on a condition.
|
|
1366
|
+
*
|
|
1367
|
+
* Usage:
|
|
1368
|
+
* ```typescript
|
|
1369
|
+
* const ifActivity = new If();
|
|
1370
|
+
* ifActivity.condition = '{{user.isAdmin}}';
|
|
1371
|
+
* ifActivity.thenActivities = [activity1, activity2];
|
|
1372
|
+
* ifActivity.elseActivities = [activity3];
|
|
1373
|
+
* ```
|
|
1374
|
+
*/
|
|
1375
|
+
class If extends Activity {
|
|
1376
|
+
constructor() {
|
|
1377
|
+
super('If');
|
|
1378
|
+
}
|
|
1379
|
+
async execute(input) {
|
|
1380
|
+
const { condition, thenActivities = [], elseActivities = [] } = input;
|
|
1381
|
+
try {
|
|
1382
|
+
// Evaluate condition (simplified - in real implementation, use expression evaluator)
|
|
1383
|
+
const conditionResult = this.evaluateCondition(condition);
|
|
1384
|
+
let result;
|
|
1385
|
+
let activities;
|
|
1386
|
+
if (conditionResult) {
|
|
1387
|
+
activities = thenActivities;
|
|
1388
|
+
result = { branch: 'then' };
|
|
1389
|
+
}
|
|
1390
|
+
else {
|
|
1391
|
+
activities = elseActivities;
|
|
1392
|
+
result = { branch: 'else' };
|
|
1393
|
+
}
|
|
1394
|
+
// Execute activities in the chosen branch
|
|
1395
|
+
for (const activity of activities) {
|
|
1396
|
+
await activity.execute(input);
|
|
1397
|
+
}
|
|
1398
|
+
return this.createResult(result, conditionResult ? 'Then' : 'Else');
|
|
1399
|
+
}
|
|
1400
|
+
catch (err) {
|
|
1401
|
+
console.error('[If] Error evaluating condition:', err);
|
|
1402
|
+
return this.createResult({ branch: 'error' }, 'Error');
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
evaluateCondition(condition) {
|
|
1406
|
+
if (typeof condition === 'boolean') {
|
|
1407
|
+
return condition;
|
|
1408
|
+
}
|
|
1409
|
+
if (typeof condition === 'string') {
|
|
1410
|
+
// Simple evaluation - in real implementation, use proper expression evaluator
|
|
1411
|
+
return condition === 'true' || condition === '1' || condition === 'yes';
|
|
1412
|
+
}
|
|
1413
|
+
return false;
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
var if_activity = /*#__PURE__*/Object.freeze({
|
|
1418
|
+
__proto__: null,
|
|
1419
|
+
If: If
|
|
1420
|
+
});
|
|
1421
|
+
|
|
1422
|
+
/**
|
|
1423
|
+
* While Activity - Loop execution while condition is true.
|
|
1424
|
+
*
|
|
1425
|
+
* Usage:
|
|
1426
|
+
* ```typescript
|
|
1427
|
+
* const whileActivity = new While();
|
|
1428
|
+
* whileActivity.condition = '{{counter < 10}}';
|
|
1429
|
+
* whileActivity.activities = [incrementActivity, logActivity];
|
|
1430
|
+
* ```
|
|
1431
|
+
*/
|
|
1432
|
+
class While extends Activity {
|
|
1433
|
+
constructor() {
|
|
1434
|
+
super('While');
|
|
1435
|
+
}
|
|
1436
|
+
async execute(input) {
|
|
1437
|
+
const { condition, activities = [], maxIterations = 1000 } = input;
|
|
1438
|
+
try {
|
|
1439
|
+
let iteration = 0;
|
|
1440
|
+
let conditionResult = this.evaluateCondition(condition);
|
|
1441
|
+
while (conditionResult && iteration < maxIterations) {
|
|
1442
|
+
// Execute activities in the loop
|
|
1443
|
+
for (const activity of activities) {
|
|
1444
|
+
await activity.execute(input);
|
|
1445
|
+
}
|
|
1446
|
+
iteration++;
|
|
1447
|
+
conditionResult = this.evaluateCondition(condition);
|
|
1448
|
+
}
|
|
1449
|
+
const result = {
|
|
1450
|
+
iterations: iteration,
|
|
1451
|
+
completed: iteration < maxIterations
|
|
1452
|
+
};
|
|
1453
|
+
return this.createResult(result, 'Done');
|
|
1454
|
+
}
|
|
1455
|
+
catch (err) {
|
|
1456
|
+
console.error('[While] Error in loop execution:', err);
|
|
1457
|
+
return this.createResult({ iterations: 0, completed: false }, 'Error');
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
evaluateCondition(condition) {
|
|
1461
|
+
if (typeof condition === 'boolean') {
|
|
1462
|
+
return condition;
|
|
1463
|
+
}
|
|
1464
|
+
if (typeof condition === 'string') {
|
|
1465
|
+
// Simple evaluation - in real implementation, use proper expression evaluator
|
|
1466
|
+
return condition === 'true' || condition === '1' || condition === 'yes';
|
|
1467
|
+
}
|
|
1468
|
+
return false;
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
var while_activity = /*#__PURE__*/Object.freeze({
|
|
1473
|
+
__proto__: null,
|
|
1474
|
+
While: While
|
|
1475
|
+
});
|
|
1476
|
+
|
|
1477
|
+
/**
|
|
1478
|
+
* ForEach Activity - Iterates over a collection of items.
|
|
1479
|
+
*
|
|
1480
|
+
* Usage:
|
|
1481
|
+
* ```typescript
|
|
1482
|
+
* const forEach = new ForEach();
|
|
1483
|
+
* await forEach.execute({
|
|
1484
|
+
* items: ['item1', 'item2', 'item3'],
|
|
1485
|
+
* activities: [processItemActivity]
|
|
1486
|
+
* });
|
|
1487
|
+
* ```
|
|
1488
|
+
*/
|
|
1489
|
+
class ForEach extends Activity {
|
|
1490
|
+
constructor() {
|
|
1491
|
+
super('ForEach');
|
|
1492
|
+
}
|
|
1493
|
+
async execute(input) {
|
|
1494
|
+
const { items = [], activities = [], itemVariableName = 'currentItem', indexVariableName = 'currentIndex' } = input;
|
|
1495
|
+
try {
|
|
1496
|
+
const results = [];
|
|
1497
|
+
for (let index = 0; index < items.length; index++) {
|
|
1498
|
+
const currentItem = items[index];
|
|
1499
|
+
// Create context with current item and index
|
|
1500
|
+
const itemContext = {
|
|
1501
|
+
...input,
|
|
1502
|
+
[itemVariableName]: currentItem,
|
|
1503
|
+
[indexVariableName]: index
|
|
1504
|
+
};
|
|
1505
|
+
// Execute activities for current item
|
|
1506
|
+
for (const activity of activities) {
|
|
1507
|
+
await activity.execute(itemContext);
|
|
1508
|
+
}
|
|
1509
|
+
results.push({
|
|
1510
|
+
item: currentItem,
|
|
1511
|
+
index,
|
|
1512
|
+
processed: true
|
|
1513
|
+
});
|
|
1514
|
+
}
|
|
1515
|
+
const result = {
|
|
1516
|
+
totalItems: items.length,
|
|
1517
|
+
processedItems: results.length,
|
|
1518
|
+
results
|
|
1519
|
+
};
|
|
1520
|
+
return this.createResult(result, 'Done');
|
|
1521
|
+
}
|
|
1522
|
+
catch (err) {
|
|
1523
|
+
console.error('[ForEach] Error in iteration:', err);
|
|
1524
|
+
return this.createResult({ totalItems: 0, processedItems: 0, results: [] }, 'Error');
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
var forEach_activity = /*#__PURE__*/Object.freeze({
|
|
1530
|
+
__proto__: null,
|
|
1531
|
+
ForEach: ForEach
|
|
1532
|
+
});
|
|
1533
|
+
|
|
1534
|
+
/**
|
|
1535
|
+
* Execute Command Activity - Executes a command through Command Bus.
|
|
1536
|
+
*
|
|
1537
|
+
* Usage:
|
|
1538
|
+
* ```typescript
|
|
1539
|
+
* const executeCmd = new ExecuteCommand();
|
|
1540
|
+
* await executeCmd.execute({
|
|
1541
|
+
* commandKey: 'UserManagement.CreateUser',
|
|
1542
|
+
* input: { name: 'John', email: 'john@example.com' }
|
|
1543
|
+
* });
|
|
1544
|
+
* ```
|
|
1545
|
+
*/
|
|
1546
|
+
class ExecuteCommand extends Activity {
|
|
1547
|
+
constructor() {
|
|
1548
|
+
super('workflow-activity:execute-command', 'Execute Command');
|
|
1549
|
+
this.commandService = inject(AXPCommandService);
|
|
1550
|
+
}
|
|
1551
|
+
async execute(input) {
|
|
1552
|
+
const { commandKey, input: commandInput = {} } = input;
|
|
1553
|
+
try {
|
|
1554
|
+
// Check if command exists
|
|
1555
|
+
if (!this.commandService.exists(commandKey)) {
|
|
1556
|
+
console.warn(`[ExecuteCommand] Command '${commandKey}' is not registered. Simulating execution.`);
|
|
1557
|
+
// Simulate command execution for unregistered commands
|
|
1558
|
+
const result = {
|
|
1559
|
+
commandKey,
|
|
1560
|
+
success: true,
|
|
1561
|
+
output: commandInput,
|
|
1562
|
+
executedAt: new Date().toISOString(),
|
|
1563
|
+
simulated: true
|
|
1564
|
+
};
|
|
1565
|
+
return this.createResult(result, 'Done');
|
|
1566
|
+
}
|
|
1567
|
+
// Execute command through Command Bus
|
|
1568
|
+
const result = await this.commandService.execute(commandKey, commandInput);
|
|
1569
|
+
return this.createResult({
|
|
1570
|
+
commandKey,
|
|
1571
|
+
success: true,
|
|
1572
|
+
output: result,
|
|
1573
|
+
executedAt: new Date().toISOString()
|
|
1574
|
+
}, 'Done');
|
|
1575
|
+
}
|
|
1576
|
+
catch (err) {
|
|
1577
|
+
console.error('[ExecuteCommand] Error executing command:', err);
|
|
1578
|
+
return this.createResult({
|
|
1579
|
+
commandKey,
|
|
1580
|
+
success: false,
|
|
1581
|
+
error: err instanceof Error ? err.message : 'Unknown error'
|
|
1582
|
+
}, 'Failed');
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
var executeCommand_activity = /*#__PURE__*/Object.freeze({
|
|
1588
|
+
__proto__: null,
|
|
1589
|
+
ExecuteCommand: ExecuteCommand
|
|
1590
|
+
});
|
|
1591
|
+
|
|
1592
|
+
/**
|
|
1593
|
+
* Execute Query Activity - Executes a query through Query Bus.
|
|
1594
|
+
*
|
|
1595
|
+
* Usage:
|
|
1596
|
+
* ```typescript
|
|
1597
|
+
* const executeQuery = new ExecuteQuery();
|
|
1598
|
+
* await executeQuery.execute({
|
|
1599
|
+
* queryKey: 'UserManagement.GetUsers',
|
|
1600
|
+
* input: { page: 1, pageSize: 10 }
|
|
1601
|
+
* });
|
|
1602
|
+
* ```
|
|
1603
|
+
*/
|
|
1604
|
+
class ExecuteQuery extends Activity {
|
|
1605
|
+
constructor() {
|
|
1606
|
+
super('workflow-activity:execute-query', 'Execute Query');
|
|
1607
|
+
this.queryService = inject(AXPQueryService);
|
|
1608
|
+
}
|
|
1609
|
+
async execute(input) {
|
|
1610
|
+
const { queryKey, input: queryInput = {} } = input;
|
|
1611
|
+
try {
|
|
1612
|
+
// Check if query exists
|
|
1613
|
+
if (!this.queryService.exists(queryKey)) {
|
|
1614
|
+
console.warn(`[ExecuteQuery] Query '${queryKey}' is not registered. Simulating execution.`);
|
|
1615
|
+
// Simulate query execution for unregistered queries
|
|
1616
|
+
const result = {
|
|
1617
|
+
queryKey,
|
|
1618
|
+
success: true,
|
|
1619
|
+
data: [],
|
|
1620
|
+
totalCount: 0,
|
|
1621
|
+
executedAt: new Date().toISOString(),
|
|
1622
|
+
simulated: true
|
|
1623
|
+
};
|
|
1624
|
+
return this.createResult(result, 'Done');
|
|
1625
|
+
}
|
|
1626
|
+
// Execute query through Query Bus
|
|
1627
|
+
const result = await this.queryService.fetch(queryKey, queryInput);
|
|
1628
|
+
return this.createResult({
|
|
1629
|
+
queryKey,
|
|
1630
|
+
success: true,
|
|
1631
|
+
data: result,
|
|
1632
|
+
totalCount: Array.isArray(result) ? result.length : (result?.totalCount || 0),
|
|
1633
|
+
executedAt: new Date().toISOString()
|
|
1634
|
+
}, 'Done');
|
|
1635
|
+
}
|
|
1636
|
+
catch (err) {
|
|
1637
|
+
console.error('[ExecuteQuery] Error executing query:', err);
|
|
1638
|
+
return this.createResult({
|
|
1639
|
+
queryKey,
|
|
1640
|
+
success: false,
|
|
1641
|
+
error: err instanceof Error ? err.message : 'Unknown error'
|
|
1642
|
+
}, 'Failed');
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
var executeQuery_activity = /*#__PURE__*/Object.freeze({
|
|
1648
|
+
__proto__: null,
|
|
1649
|
+
ExecuteQuery: ExecuteQuery
|
|
1650
|
+
});
|
|
1651
|
+
|
|
1652
|
+
/**
|
|
1653
|
+
* Start Activity - Marks the start point of a workflow.
|
|
1654
|
+
*
|
|
1655
|
+
* This is a visual marker activity that doesn't perform any actual work.
|
|
1656
|
+
* It's used in workflow designers to clearly indicate where a workflow begins.
|
|
1657
|
+
*
|
|
1658
|
+
* Usage:
|
|
1659
|
+
* ```typescript
|
|
1660
|
+
* const start = new StartActivity();
|
|
1661
|
+
* await start.execute({});
|
|
1662
|
+
* ```
|
|
1663
|
+
*/
|
|
1664
|
+
class StartActivity extends Activity {
|
|
1665
|
+
constructor() {
|
|
1666
|
+
super('StartActivity');
|
|
1667
|
+
}
|
|
1668
|
+
async execute(input) {
|
|
1669
|
+
// This activity is a visual marker only
|
|
1670
|
+
// It immediately completes and allows workflow to proceed
|
|
1671
|
+
console.log('[StartActivity] Workflow started');
|
|
1672
|
+
return this.createResult(undefined, 'Done');
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
var startActivity_activity = /*#__PURE__*/Object.freeze({
|
|
1677
|
+
__proto__: null,
|
|
1678
|
+
StartActivity: StartActivity
|
|
1679
|
+
});
|
|
1680
|
+
|
|
1681
|
+
/**
|
|
1682
|
+
* End Activity - Marks the end point of a workflow.
|
|
1683
|
+
*
|
|
1684
|
+
* This is a visual marker activity that terminates the workflow execution.
|
|
1685
|
+
* When this activity is reached, the workflow completes successfully.
|
|
1686
|
+
*
|
|
1687
|
+
* Usage:
|
|
1688
|
+
* ```typescript
|
|
1689
|
+
* const end = new EndActivity();
|
|
1690
|
+
* await end.execute({});
|
|
1691
|
+
* ```
|
|
1692
|
+
*/
|
|
1693
|
+
class EndActivity extends Activity {
|
|
1694
|
+
constructor() {
|
|
1695
|
+
super('EndActivity');
|
|
1696
|
+
}
|
|
1697
|
+
async execute(input) {
|
|
1698
|
+
// This activity marks the end of workflow execution
|
|
1699
|
+
console.log('[EndActivity] Workflow completed');
|
|
1700
|
+
return this.createResult(undefined, 'Done');
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
var endActivity_activity = /*#__PURE__*/Object.freeze({
|
|
1705
|
+
__proto__: null,
|
|
1706
|
+
EndActivity: EndActivity
|
|
1707
|
+
});
|
|
1708
|
+
|
|
1709
|
+
/**
|
|
1710
|
+
* Command setups for all built-in workflow activities.
|
|
1711
|
+
* Registers activities as AXPCommand instances.
|
|
1712
|
+
*/
|
|
1713
|
+
const provideWorkflowActivityCommands = () => provideCommandSetups([
|
|
1714
|
+
// Workflow Markers
|
|
1715
|
+
{
|
|
1716
|
+
key: 'workflow-activity:start',
|
|
1717
|
+
command: () => Promise.resolve().then(function () { return startActivity_activity; }).then(m => m.StartActivity),
|
|
1718
|
+
},
|
|
1719
|
+
{
|
|
1720
|
+
key: 'workflow-activity:end',
|
|
1721
|
+
command: () => Promise.resolve().then(function () { return endActivity_activity; }).then(m => m.EndActivity),
|
|
1722
|
+
},
|
|
1723
|
+
// Console Activities
|
|
1724
|
+
{
|
|
1725
|
+
key: 'workflow-activity:write-line',
|
|
1726
|
+
command: () => Promise.resolve().then(function () { return writeLine_activity; }).then(m => m.WriteLine),
|
|
1727
|
+
},
|
|
1728
|
+
// Control Flow Activities
|
|
1729
|
+
{
|
|
1730
|
+
key: 'workflow-activity:sequence',
|
|
1731
|
+
command: () => Promise.resolve().then(function () { return sequence_activity; }).then(m => m.Sequence),
|
|
1732
|
+
},
|
|
1733
|
+
{
|
|
1734
|
+
key: 'workflow-activity:if',
|
|
1735
|
+
command: () => Promise.resolve().then(function () { return if_activity; }).then(m => m.If),
|
|
1736
|
+
},
|
|
1737
|
+
{
|
|
1738
|
+
key: 'workflow-activity:while',
|
|
1739
|
+
command: () => Promise.resolve().then(function () { return while_activity; }).then(m => m.While),
|
|
1740
|
+
},
|
|
1741
|
+
{
|
|
1742
|
+
key: 'workflow-activity:for-each',
|
|
1743
|
+
command: () => Promise.resolve().then(function () { return forEach_activity; }).then(m => m.ForEach),
|
|
1744
|
+
},
|
|
1745
|
+
// Dialog Activities
|
|
1746
|
+
{
|
|
1747
|
+
key: 'workflow-activity:show-confirm-dialog',
|
|
1748
|
+
command: () => Promise.resolve().then(function () { return showConfirmDialog_activity; }).then(m => m.ShowConfirmDialog),
|
|
1749
|
+
},
|
|
1750
|
+
{
|
|
1751
|
+
key: 'workflow-activity:show-alert-dialog',
|
|
1752
|
+
command: () => Promise.resolve().then(function () { return showAlertDialog_activity; }).then(m => m.ShowAlertDialog),
|
|
1753
|
+
},
|
|
1754
|
+
// Notification Activities
|
|
1755
|
+
{
|
|
1756
|
+
key: 'workflow-activity:show-toast',
|
|
1757
|
+
command: () => Promise.resolve().then(function () { return showToast_activity; }).then(m => m.ShowToast),
|
|
1758
|
+
},
|
|
1759
|
+
// Event Activities
|
|
1760
|
+
{
|
|
1761
|
+
key: 'workflow-activity:dispatch-event',
|
|
1762
|
+
command: () => Promise.resolve().then(function () { return dispatchEvent_activity; }).then(m => m.DispatchEvent),
|
|
1763
|
+
},
|
|
1764
|
+
// Variable Activities
|
|
1765
|
+
{
|
|
1766
|
+
key: 'workflow-activity:set-variable',
|
|
1767
|
+
command: () => Promise.resolve().then(function () { return setVariable_activity; }).then(m => m.SetVariable),
|
|
1768
|
+
},
|
|
1769
|
+
// Command & Query Activities
|
|
1770
|
+
{
|
|
1771
|
+
key: 'workflow-activity:execute-command',
|
|
1772
|
+
command: () => Promise.resolve().then(function () { return executeCommand_activity; }).then(m => m.ExecuteCommand),
|
|
1773
|
+
},
|
|
1774
|
+
{
|
|
1775
|
+
key: 'workflow-activity:execute-query',
|
|
1776
|
+
command: () => Promise.resolve().then(function () { return executeQuery_activity; }).then(m => m.ExecuteQuery),
|
|
1777
|
+
},
|
|
1778
|
+
// Navigation Activities
|
|
1779
|
+
{
|
|
1780
|
+
key: 'workflow-activity:navigate',
|
|
1781
|
+
command: () => Promise.resolve().then(function () { return navigate_activity; }).then(m => m.Navigate),
|
|
1782
|
+
},
|
|
1783
|
+
]);
|
|
1784
|
+
|
|
1785
|
+
// Built-in Activities
|
|
1786
|
+
|
|
1787
|
+
// Workflow Definition Types (Storage/Database)
|
|
1788
|
+
|
|
413
1789
|
class AXPWorkflowModule {
|
|
414
1790
|
static forRoot(config) {
|
|
415
1791
|
return {
|
|
416
1792
|
ngModule: AXPWorkflowModule,
|
|
417
1793
|
providers: [
|
|
1794
|
+
provideWorkflowActivityCommands(),
|
|
418
1795
|
{
|
|
419
1796
|
provide: 'AXPWorkflowModuleFactory',
|
|
420
1797
|
useFactory: (registry) => () => {
|
|
@@ -451,6 +1828,8 @@ class AXPWorkflowModule {
|
|
|
451
1828
|
return {
|
|
452
1829
|
ngModule: AXPWorkflowModule,
|
|
453
1830
|
providers: [
|
|
1831
|
+
// Built-in activities are already registered in forRoot via @NgModule providers
|
|
1832
|
+
// No need to register again in forChild
|
|
454
1833
|
{
|
|
455
1834
|
provide: 'AXPWorkflowModuleFactory',
|
|
456
1835
|
useFactory: (registry) => () => {
|
|
@@ -487,21 +1866,27 @@ class AXPWorkflowModule {
|
|
|
487
1866
|
* @ignore
|
|
488
1867
|
*/
|
|
489
1868
|
constructor(instances) {
|
|
1869
|
+
// Inject AXP_COMMAND_SETUP to trigger command registration factory
|
|
1870
|
+
this._commandSetup = inject(AXP_COMMAND_SETUP, { optional: true });
|
|
490
1871
|
instances?.forEach((f) => {
|
|
491
1872
|
f();
|
|
492
1873
|
});
|
|
493
1874
|
}
|
|
494
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
495
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
496
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
1875
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowModule, deps: [{ token: 'AXPWorkflowModuleFactory', optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1876
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowModule }); }
|
|
1877
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowModule, providers: [
|
|
1878
|
+
provideWorkflowActivityCommands(),
|
|
1879
|
+
] }); }
|
|
497
1880
|
}
|
|
498
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1881
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowModule, decorators: [{
|
|
499
1882
|
type: NgModule,
|
|
500
1883
|
args: [{
|
|
501
1884
|
imports: [],
|
|
502
1885
|
exports: [],
|
|
503
1886
|
declarations: [],
|
|
504
|
-
providers: [
|
|
1887
|
+
providers: [
|
|
1888
|
+
provideWorkflowActivityCommands(),
|
|
1889
|
+
],
|
|
505
1890
|
}]
|
|
506
1891
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
507
1892
|
type: Optional
|
|
@@ -514,5 +1899,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
514
1899
|
* Generated bundle index. Do not edit.
|
|
515
1900
|
*/
|
|
516
1901
|
|
|
517
|
-
export { AXPWorkflowAction, AXPWorkflowContext, AXPWorkflowError, AXPWorkflowEventService, AXPWorkflowFunction, AXPWorkflowModule, AXPWorkflowRegistryService, AXPWorkflowService, createWorkFlowEvent, ofType };
|
|
1902
|
+
export { AXPActivityCategoryProviderService, AXPActivityProviderService, AXPWorkflowAction, AXPWorkflowContext, AXPWorkflowError, AXPWorkflowEventService, AXPWorkflowExecutionService, AXPWorkflowFunction, AXPWorkflowModule, AXPWorkflowRegistryService, AXPWorkflowService, AXP_ACTIVITY_CATEGORY_PROVIDER, AXP_ACTIVITY_PROVIDER, Activity, ActivityRegistry, DispatchEvent, EndActivity, ExecuteCommand, ExecuteQuery, ForEach, If, Navigate, Sequence, SetVariable, ShowAlertDialog, ShowConfirmDialog, ShowToast, StartActivity, While, WorkflowCoordinator, WriteLine, createWorkFlowEvent, ofType, provideWorkflowActivityCommands };
|
|
518
1903
|
//# sourceMappingURL=acorex-platform-workflow.mjs.map
|