@acorex/platform 20.6.0-next.2 → 20.6.0-next.21
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 -3
- package/core/index.d.ts +210 -56
- 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-CLb2KMfv.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 +104 -103
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +279 -78
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +65 -20
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +56 -135
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +1322 -409
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +73 -73
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +7736 -3813
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +58 -40
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +91 -82
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-lHfg4JFJ.mjs → acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-lHfg4JFJ.mjs.map → acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-CMSnecnD.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-CMSnecnD.mjs.map → acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-fhhZOWul.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-DN-sIFYe.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-DN-sIFYe.mjs.map → acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-C3Qbs0fz.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-Bn9w0SEz.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-Bn9w0SEz.mjs.map → acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-CngQBUlN.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-values-widget-view.component-B8mgcvoX.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-B8mgcvoX.mjs.map → acorex-platform-layout-widgets-extra-properties-values-widget-view.component-DSNo9e4W.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-widget-edit.component-Bhof2SY8.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-Bhof2SY8.mjs.map → acorex-platform-layout-widgets-extra-properties-widget-edit.component-CL0CwEHX.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-widget-view.component-CeQIvKVV.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-CeQIvKVV.mjs.map → acorex-platform-layout-widgets-extra-properties-widget-view.component-B6Fi0xTw.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-BOP7jFp4.mjs → acorex-platform-layout-widgets-file-list-popup.component-D0y-9nE5.mjs} +6 -6
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-BOP7jFp4.mjs.map → acorex-platform-layout-widgets-file-list-popup.component-D0y-9nE5.mjs.map} +1 -1
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs +30 -0
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-C57lyBs3.mjs → acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-C57lyBs3.mjs.map → acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-fr77M8Z0.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-m8rHZP8L.mjs} +6 -6
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-m8rHZP8L.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-CvZTRhct.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs} +5 -5
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-DHES_0ot.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-DHES_0ot.mjs.map → acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs.map} +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +3809 -2060
- 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 +119 -43
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-C_XmJV7Y.mjs → acorex-platform-themes-default-entity-master-create-view.component-mARj77Mr.mjs} +30 -9
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-mARj77Mr.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-D5K0XUqM.mjs +1522 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-D5K0XUqM.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-DJPDil7w.mjs → acorex-platform-themes-default-entity-master-modify-view.component-BTA6h7Xd.mjs} +4 -4
- 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-BArdGNfr.mjs → acorex-platform-themes-default-entity-master-single-view.component-B_P0a5KW.mjs} +7 -7
- 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-D7rEInHg.mjs → acorex-platform-themes-default-error-401.component-cfREo88K.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-error-401.component-D7rEInHg.mjs.map → acorex-platform-themes-default-error-401.component-cfREo88K.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-error-404.component-BTZlVrd8.mjs → acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-error-404.component-BTZlVrd8.mjs.map → acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-error-offline.component-BhvEi6nX.mjs → acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-error-offline.component-BhvEi6nX.mjs.map → acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +156 -53
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs +55 -0
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-BXV40gay.mjs → acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-BXV40gay.mjs.map → acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-column.component-BpIf4s53.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-BpIf4s53.mjs.map → acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-view.component-C9gvfQfX.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-C9gvfQfX.mjs.map → acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs +58 -153
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +327 -151
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/builder/index.d.ts +6 -33
- package/layout/components/index.d.ts +306 -61
- package/layout/designer/index.d.ts +1 -1
- package/layout/entity/index.d.ts +595 -94
- package/layout/views/index.d.ts +6 -58
- package/layout/widget-core/index.d.ts +31 -26
- package/layout/widgets/README.md +0 -1
- package/layout/widgets/index.d.ts +325 -99
- package/package.json +1 -1
- package/runtime/index.d.ts +36 -8
- package/themes/default/index.d.ts +32 -77
- package/themes/shared/index.d.ts +1 -39
- package/workflow/index.d.ts +909 -457
- package/fesm2022/acorex-platform-common-common-settings.provider-CLb2KMfv.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-entity-create-entity.command-BsLbiAdA.mjs +0 -52
- package/fesm2022/acorex-platform-layout-entity-create-entity.command-BsLbiAdA.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-fr77M8Z0.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-CvZTRhct.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-C_XmJV7Y.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BkY9HXcT.mjs +0 -782
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BkY9HXcT.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DJPDil7w.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BArdGNfr.mjs.map +0 -1
|
@@ -27,10 +27,10 @@ class AXPWorkflowEventService {
|
|
|
27
27
|
get events$() {
|
|
28
28
|
return this.eventSubject.asObservable();
|
|
29
29
|
}
|
|
30
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
31
|
-
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' }); }
|
|
32
32
|
}
|
|
33
|
-
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: [{
|
|
34
34
|
type: Injectable,
|
|
35
35
|
args: [{
|
|
36
36
|
providedIn: 'root',
|
|
@@ -120,10 +120,10 @@ class AXPWorkflowRegistryService {
|
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
124
|
-
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' }); }
|
|
125
125
|
}
|
|
126
|
-
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: [{
|
|
127
127
|
type: Injectable,
|
|
128
128
|
args: [{
|
|
129
129
|
providedIn: 'root',
|
|
@@ -162,17 +162,17 @@ class AXPWorkflowAction {
|
|
|
162
162
|
dispatch(event) {
|
|
163
163
|
this.eventService.dispatch(event);
|
|
164
164
|
}
|
|
165
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
166
|
-
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 }); }
|
|
167
167
|
}
|
|
168
|
-
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: [{
|
|
169
169
|
type: Injectable
|
|
170
170
|
}] });
|
|
171
171
|
class AXPWorkflowFunction {
|
|
172
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
173
|
-
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 }); }
|
|
174
174
|
}
|
|
175
|
-
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: [{
|
|
176
176
|
type: Injectable
|
|
177
177
|
}] });
|
|
178
178
|
function createWorkFlowEvent(type) {
|
|
@@ -188,10 +188,10 @@ class AXPWorkflowDecideAction extends AXPWorkflowAction {
|
|
|
188
188
|
async execute(context) {
|
|
189
189
|
// its a fake action
|
|
190
190
|
}
|
|
191
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
192
|
-
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' }); }
|
|
193
193
|
}
|
|
194
|
-
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: [{
|
|
195
195
|
type: Injectable,
|
|
196
196
|
args: [{
|
|
197
197
|
providedIn: 'root',
|
|
@@ -377,10 +377,10 @@ class AXPWorkflowService {
|
|
|
377
377
|
}
|
|
378
378
|
return this.injector.get(functionType);
|
|
379
379
|
}
|
|
380
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
381
|
-
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' }); }
|
|
382
382
|
}
|
|
383
|
-
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: [{
|
|
384
384
|
type: Injectable,
|
|
385
385
|
args: [{
|
|
386
386
|
providedIn: 'root',
|
|
@@ -405,16 +405,22 @@ class AXPStartWorkflowAction extends AXPWorkflowAction {
|
|
|
405
405
|
throw e;
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
409
|
-
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' }); }
|
|
410
410
|
}
|
|
411
|
-
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: [{
|
|
412
412
|
type: Injectable,
|
|
413
413
|
args: [{
|
|
414
414
|
providedIn: 'root',
|
|
415
415
|
}]
|
|
416
416
|
}] });
|
|
417
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
|
+
|
|
418
424
|
/**
|
|
419
425
|
* Base abstract class for activities.
|
|
420
426
|
* Extend this to create custom activities.
|
|
@@ -429,8 +435,11 @@ class Activity {
|
|
|
429
435
|
*/
|
|
430
436
|
createResult(output, outcome = 'Done') {
|
|
431
437
|
return {
|
|
432
|
-
|
|
433
|
-
|
|
438
|
+
success: true,
|
|
439
|
+
data: {
|
|
440
|
+
output,
|
|
441
|
+
outcomes: { [outcome]: true },
|
|
442
|
+
},
|
|
434
443
|
};
|
|
435
444
|
}
|
|
436
445
|
}
|
|
@@ -602,10 +611,10 @@ class AXPActivityProviderService {
|
|
|
602
611
|
};
|
|
603
612
|
await provider.provide(context);
|
|
604
613
|
}
|
|
605
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
606
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
614
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPActivityProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
615
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPActivityProviderService, providedIn: 'root' }); }
|
|
607
616
|
}
|
|
608
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
617
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPActivityProviderService, decorators: [{
|
|
609
618
|
type: Injectable,
|
|
610
619
|
args: [{
|
|
611
620
|
providedIn: 'root'
|
|
@@ -645,10 +654,10 @@ class AXPActivityCategoryProviderService {
|
|
|
645
654
|
getCategory(name) {
|
|
646
655
|
return this.categories.get(name);
|
|
647
656
|
}
|
|
648
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
649
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
657
|
+
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 }); }
|
|
658
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPActivityCategoryProviderService, providedIn: 'root' }); }
|
|
650
659
|
}
|
|
651
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
660
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPActivityCategoryProviderService, decorators: [{
|
|
652
661
|
type: Injectable,
|
|
653
662
|
args: [{ providedIn: 'root' }]
|
|
654
663
|
}], ctorParameters: () => [{ type: AXPActivityCategoryProviderService, decorators: [{
|
|
@@ -698,10 +707,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
698
707
|
* ```
|
|
699
708
|
*/
|
|
700
709
|
class AXPWorkflowExecutionService {
|
|
701
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
702
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
710
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowExecutionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
711
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowExecutionService }); }
|
|
703
712
|
}
|
|
704
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
713
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowExecutionService, decorators: [{
|
|
705
714
|
type: Injectable
|
|
706
715
|
}] });
|
|
707
716
|
|
|
@@ -808,6 +817,7 @@ class WorkflowCoordinator {
|
|
|
808
817
|
const response = await this.workflowExecutionService.resumeExecution({
|
|
809
818
|
executionId,
|
|
810
819
|
stepId: task.activityId,
|
|
820
|
+
taskToken: task.taskToken,
|
|
811
821
|
outcome,
|
|
812
822
|
userInput: output
|
|
813
823
|
});
|
|
@@ -852,12 +862,17 @@ class WorkflowCoordinator {
|
|
|
852
862
|
* @param outcome - User action outcome (e.g., 'Confirmed', 'Cancelled', 'Submitted')
|
|
853
863
|
* @param userInput - Optional user input data
|
|
854
864
|
*/
|
|
855
|
-
async resumeWorkflow(executionId, stepId, outcome, userInput) {
|
|
865
|
+
async resumeWorkflow(executionId, stepId, outcome, userInput, taskToken) {
|
|
856
866
|
try {
|
|
867
|
+
// Ensure taskToken is provided for secure resumption
|
|
868
|
+
if (!taskToken) {
|
|
869
|
+
throw new Error('Missing taskToken for resumeWorkflow');
|
|
870
|
+
}
|
|
857
871
|
// Backend handles everything: checks outcomeConnections and determines nextStep
|
|
858
872
|
const response = await this.workflowExecutionService.resumeExecution({
|
|
859
873
|
executionId,
|
|
860
874
|
stepId,
|
|
875
|
+
taskToken,
|
|
861
876
|
outcome,
|
|
862
877
|
userInput
|
|
863
878
|
});
|
|
@@ -907,81 +922,6 @@ class WorkflowCoordinator {
|
|
|
907
922
|
return null;
|
|
908
923
|
}
|
|
909
924
|
}
|
|
910
|
-
/**
|
|
911
|
-
* Start step-based execution (only current step, not full workflow).
|
|
912
|
-
*
|
|
913
|
-
* Use this when you only need to execute one step at a time.
|
|
914
|
-
* Perfect for form-based workflows where user interacts with forms.
|
|
915
|
-
*
|
|
916
|
-
* @param workflowId - Workflow ID
|
|
917
|
-
* @param stepId - Initial step ID to execute
|
|
918
|
-
* @param input - Initial input data
|
|
919
|
-
* @returns Execution info with executionId and initial state
|
|
920
|
-
*
|
|
921
|
-
* @example
|
|
922
|
-
* ```typescript
|
|
923
|
-
* // Start login form step
|
|
924
|
-
* const execution = await coordinator.startStepExecution(
|
|
925
|
-
* 'login-workflow',
|
|
926
|
-
* 'login-form-step',
|
|
927
|
-
* {}
|
|
928
|
-
* );
|
|
929
|
-
*
|
|
930
|
-
* // Save executionId for resume after refresh
|
|
931
|
-
* localStorage.setItem('execution-id', execution.executionId);
|
|
932
|
-
* ```
|
|
933
|
-
*/
|
|
934
|
-
async startStepExecution(workflowId, stepId, input = {}) {
|
|
935
|
-
// Start workflow execution in backend
|
|
936
|
-
const execution = await this.startWorkflowExecution(workflowId, input);
|
|
937
|
-
// Update state with current step
|
|
938
|
-
const stateWithStep = {
|
|
939
|
-
...execution.state,
|
|
940
|
-
currentStepId: stepId,
|
|
941
|
-
status: 'running'
|
|
942
|
-
};
|
|
943
|
-
// Update cache
|
|
944
|
-
this.stateCache.set(execution.executionId, stateWithStep);
|
|
945
|
-
return {
|
|
946
|
-
executionId: execution.executionId,
|
|
947
|
-
state: stateWithStep
|
|
948
|
-
};
|
|
949
|
-
}
|
|
950
|
-
/**
|
|
951
|
-
* Get next task from backend after backend task completion.
|
|
952
|
-
*
|
|
953
|
-
* Use this when backend task completes - backend will return next task.
|
|
954
|
-
* For frontend tasks, use executeTask + completeTask instead.
|
|
955
|
-
*
|
|
956
|
-
* @param executionId - Execution ID
|
|
957
|
-
* @returns Next task from backend (if any)
|
|
958
|
-
*/
|
|
959
|
-
async getNextTask(executionId) {
|
|
960
|
-
try {
|
|
961
|
-
// Backend handles everything: executes backend tasks and returns next task
|
|
962
|
-
const response = await this.workflowExecutionService.executeCurrentStep({
|
|
963
|
-
executionId
|
|
964
|
-
});
|
|
965
|
-
// Update cache
|
|
966
|
-
if (response.state) {
|
|
967
|
-
this.stateCache.set(executionId, response.state);
|
|
968
|
-
}
|
|
969
|
-
return {
|
|
970
|
-
success: true,
|
|
971
|
-
output: response.output,
|
|
972
|
-
nextTask: response.nextTask || null,
|
|
973
|
-
executionId,
|
|
974
|
-
state: response.state
|
|
975
|
-
};
|
|
976
|
-
}
|
|
977
|
-
catch (error) {
|
|
978
|
-
return {
|
|
979
|
-
success: false,
|
|
980
|
-
error: error.message || 'Failed to get next task',
|
|
981
|
-
nextTask: null
|
|
982
|
-
};
|
|
983
|
-
}
|
|
984
|
-
}
|
|
985
925
|
//#endregion
|
|
986
926
|
//#region ---- Private Methods ----
|
|
987
927
|
/**
|
|
@@ -1006,15 +946,29 @@ class WorkflowCoordinator {
|
|
|
1006
946
|
// Execute activity via CommandBus
|
|
1007
947
|
// Activities registered as AXPCommand return {output, outcomes}
|
|
1008
948
|
const result = await this.commandService.execute(task.activityType, task.input || task.config || {});
|
|
1009
|
-
|
|
949
|
+
if (!result) {
|
|
950
|
+
return {
|
|
951
|
+
output: null,
|
|
952
|
+
outcome: 'Failed',
|
|
953
|
+
};
|
|
954
|
+
}
|
|
955
|
+
if (!result.success) {
|
|
956
|
+
return {
|
|
957
|
+
output: {
|
|
958
|
+
error: result.message?.text,
|
|
959
|
+
},
|
|
960
|
+
outcome: 'Failed',
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
const commandResult = result.data;
|
|
964
|
+
const outcomes = commandResult?.outcomes ?? {};
|
|
1010
965
|
let outcome = 'Done';
|
|
1011
|
-
if (
|
|
1012
|
-
|
|
1013
|
-
outcome = result.outcomes['Done'] ? 'Done' : Object.keys(result.outcomes)[0] || 'Done';
|
|
966
|
+
if (Object.keys(outcomes).length > 0) {
|
|
967
|
+
outcome = outcomes['Done'] ? 'Done' : Object.keys(outcomes)[0] || 'Done';
|
|
1014
968
|
}
|
|
1015
969
|
return {
|
|
1016
|
-
output:
|
|
1017
|
-
outcome
|
|
970
|
+
output: commandResult?.output ?? null,
|
|
971
|
+
outcome,
|
|
1018
972
|
};
|
|
1019
973
|
}
|
|
1020
974
|
catch (error) {
|
|
@@ -1042,10 +996,10 @@ class WorkflowCoordinator {
|
|
|
1042
996
|
pendingTask: response.pendingTask
|
|
1043
997
|
};
|
|
1044
998
|
}
|
|
1045
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1046
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
999
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: WorkflowCoordinator, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1000
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: WorkflowCoordinator, providedIn: 'root' }); }
|
|
1047
1001
|
}
|
|
1048
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1002
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: WorkflowCoordinator, decorators: [{
|
|
1049
1003
|
type: Injectable,
|
|
1050
1004
|
args: [{
|
|
1051
1005
|
providedIn: 'root'
|
|
@@ -1106,7 +1060,19 @@ class Sequence extends Activity {
|
|
|
1106
1060
|
async execute(input) {
|
|
1107
1061
|
// Execute all activities in sequence
|
|
1108
1062
|
for (const activity of this.activities) {
|
|
1109
|
-
await activity.execute(input);
|
|
1063
|
+
const result = await activity.execute(input);
|
|
1064
|
+
if (!result.success) {
|
|
1065
|
+
return {
|
|
1066
|
+
success: false,
|
|
1067
|
+
message: result.message,
|
|
1068
|
+
data: {
|
|
1069
|
+
output: undefined,
|
|
1070
|
+
outcomes: {
|
|
1071
|
+
Failed: true,
|
|
1072
|
+
},
|
|
1073
|
+
},
|
|
1074
|
+
};
|
|
1075
|
+
}
|
|
1110
1076
|
}
|
|
1111
1077
|
return this.createResult(undefined, 'Done');
|
|
1112
1078
|
}
|
|
@@ -1167,10 +1133,21 @@ class ShowConfirmDialog extends Activity {
|
|
|
1167
1133
|
}
|
|
1168
1134
|
catch (err) {
|
|
1169
1135
|
console.error('[ShowConfirmDialog] Error showing dialog:', err);
|
|
1170
|
-
return
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1136
|
+
return {
|
|
1137
|
+
success: false,
|
|
1138
|
+
message: {
|
|
1139
|
+
text: err instanceof Error ? err.message : 'Failed to show confirm dialog',
|
|
1140
|
+
},
|
|
1141
|
+
data: {
|
|
1142
|
+
output: {
|
|
1143
|
+
result: false,
|
|
1144
|
+
action: 'error',
|
|
1145
|
+
},
|
|
1146
|
+
outcomes: {
|
|
1147
|
+
Cancelled: true,
|
|
1148
|
+
},
|
|
1149
|
+
},
|
|
1150
|
+
};
|
|
1174
1151
|
}
|
|
1175
1152
|
}
|
|
1176
1153
|
}
|
|
@@ -1227,10 +1204,21 @@ class ShowAlertDialog extends Activity {
|
|
|
1227
1204
|
}
|
|
1228
1205
|
catch (err) {
|
|
1229
1206
|
console.error('[ShowAlertDialog] Error showing dialog:', err);
|
|
1230
|
-
return
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1207
|
+
return {
|
|
1208
|
+
success: false,
|
|
1209
|
+
message: {
|
|
1210
|
+
text: err instanceof Error ? err.message : 'Failed to show alert dialog',
|
|
1211
|
+
},
|
|
1212
|
+
data: {
|
|
1213
|
+
output: {
|
|
1214
|
+
result: false,
|
|
1215
|
+
action: 'error',
|
|
1216
|
+
},
|
|
1217
|
+
outcomes: {
|
|
1218
|
+
Failed: true,
|
|
1219
|
+
},
|
|
1220
|
+
},
|
|
1221
|
+
};
|
|
1234
1222
|
}
|
|
1235
1223
|
}
|
|
1236
1224
|
}
|
|
@@ -1286,7 +1274,18 @@ class ShowToast extends Activity {
|
|
|
1286
1274
|
}
|
|
1287
1275
|
catch (err) {
|
|
1288
1276
|
console.error('[ShowToast] Error showing toast:', err);
|
|
1289
|
-
return
|
|
1277
|
+
return {
|
|
1278
|
+
success: false,
|
|
1279
|
+
message: {
|
|
1280
|
+
text: err instanceof Error ? err.message : 'Failed to show toast',
|
|
1281
|
+
},
|
|
1282
|
+
data: {
|
|
1283
|
+
output: undefined,
|
|
1284
|
+
outcomes: {
|
|
1285
|
+
Failed: true,
|
|
1286
|
+
},
|
|
1287
|
+
},
|
|
1288
|
+
};
|
|
1290
1289
|
}
|
|
1291
1290
|
}
|
|
1292
1291
|
}
|
|
@@ -1336,13 +1335,35 @@ class Navigate extends Activity {
|
|
|
1336
1335
|
break;
|
|
1337
1336
|
default:
|
|
1338
1337
|
console.error(`[Navigate] Unknown navigation mode: ${mode}`);
|
|
1339
|
-
return
|
|
1338
|
+
return {
|
|
1339
|
+
success: false,
|
|
1340
|
+
message: {
|
|
1341
|
+
text: `Unknown navigation mode: ${mode}`,
|
|
1342
|
+
},
|
|
1343
|
+
data: {
|
|
1344
|
+
output: undefined,
|
|
1345
|
+
outcomes: {
|
|
1346
|
+
Failed: true,
|
|
1347
|
+
},
|
|
1348
|
+
},
|
|
1349
|
+
};
|
|
1340
1350
|
}
|
|
1341
1351
|
return this.createResult(undefined, 'Done');
|
|
1342
1352
|
}
|
|
1343
1353
|
catch (err) {
|
|
1344
1354
|
console.error('[Navigate] Error navigating:', err);
|
|
1345
|
-
return
|
|
1355
|
+
return {
|
|
1356
|
+
success: false,
|
|
1357
|
+
message: {
|
|
1358
|
+
text: err instanceof Error ? err.message : 'Failed to navigate',
|
|
1359
|
+
},
|
|
1360
|
+
data: {
|
|
1361
|
+
output: undefined,
|
|
1362
|
+
outcomes: {
|
|
1363
|
+
Failed: true,
|
|
1364
|
+
},
|
|
1365
|
+
},
|
|
1366
|
+
};
|
|
1346
1367
|
}
|
|
1347
1368
|
}
|
|
1348
1369
|
}
|
|
@@ -1378,7 +1399,18 @@ class SetVariable extends Activity {
|
|
|
1378
1399
|
}
|
|
1379
1400
|
catch (err) {
|
|
1380
1401
|
console.error('[SetVariable] Error setting variable:', err);
|
|
1381
|
-
return
|
|
1402
|
+
return {
|
|
1403
|
+
success: false,
|
|
1404
|
+
message: {
|
|
1405
|
+
text: err instanceof Error ? err.message : 'Failed to set variable',
|
|
1406
|
+
},
|
|
1407
|
+
data: {
|
|
1408
|
+
output: undefined,
|
|
1409
|
+
outcomes: {
|
|
1410
|
+
Failed: true,
|
|
1411
|
+
},
|
|
1412
|
+
},
|
|
1413
|
+
};
|
|
1382
1414
|
}
|
|
1383
1415
|
}
|
|
1384
1416
|
}
|
|
@@ -1414,7 +1446,18 @@ class DispatchEvent extends Activity {
|
|
|
1414
1446
|
}
|
|
1415
1447
|
catch (err) {
|
|
1416
1448
|
console.error('[DispatchEvent] Error dispatching event:', err);
|
|
1417
|
-
return
|
|
1449
|
+
return {
|
|
1450
|
+
success: false,
|
|
1451
|
+
message: {
|
|
1452
|
+
text: err instanceof Error ? err.message : 'Failed to dispatch event',
|
|
1453
|
+
},
|
|
1454
|
+
data: {
|
|
1455
|
+
output: undefined,
|
|
1456
|
+
outcomes: {
|
|
1457
|
+
Failed: true,
|
|
1458
|
+
},
|
|
1459
|
+
},
|
|
1460
|
+
};
|
|
1418
1461
|
}
|
|
1419
1462
|
}
|
|
1420
1463
|
}
|
|
@@ -1456,13 +1499,36 @@ class If extends Activity {
|
|
|
1456
1499
|
}
|
|
1457
1500
|
// Execute activities in the chosen branch
|
|
1458
1501
|
for (const activity of activities) {
|
|
1459
|
-
await activity.execute(input);
|
|
1502
|
+
const activityResult = await activity.execute(input);
|
|
1503
|
+
if (!activityResult.success) {
|
|
1504
|
+
return {
|
|
1505
|
+
success: false,
|
|
1506
|
+
message: activityResult.message,
|
|
1507
|
+
data: {
|
|
1508
|
+
output: { branch: conditionResult ? 'then' : 'else', failedActivity: activity },
|
|
1509
|
+
outcomes: {
|
|
1510
|
+
Failed: true,
|
|
1511
|
+
},
|
|
1512
|
+
},
|
|
1513
|
+
};
|
|
1514
|
+
}
|
|
1460
1515
|
}
|
|
1461
1516
|
return this.createResult(result, conditionResult ? 'Then' : 'Else');
|
|
1462
1517
|
}
|
|
1463
1518
|
catch (err) {
|
|
1464
1519
|
console.error('[If] Error evaluating condition:', err);
|
|
1465
|
-
return
|
|
1520
|
+
return {
|
|
1521
|
+
success: false,
|
|
1522
|
+
message: {
|
|
1523
|
+
text: err instanceof Error ? err.message : 'Failed to evaluate condition',
|
|
1524
|
+
},
|
|
1525
|
+
data: {
|
|
1526
|
+
output: { branch: 'error' },
|
|
1527
|
+
outcomes: {
|
|
1528
|
+
Failed: true,
|
|
1529
|
+
},
|
|
1530
|
+
},
|
|
1531
|
+
};
|
|
1466
1532
|
}
|
|
1467
1533
|
}
|
|
1468
1534
|
evaluateCondition(condition) {
|
|
@@ -1504,7 +1570,22 @@ class While extends Activity {
|
|
|
1504
1570
|
while (conditionResult && iteration < maxIterations) {
|
|
1505
1571
|
// Execute activities in the loop
|
|
1506
1572
|
for (const activity of activities) {
|
|
1507
|
-
await activity.execute(input);
|
|
1573
|
+
const activityResult = await activity.execute(input);
|
|
1574
|
+
if (!activityResult.success) {
|
|
1575
|
+
return {
|
|
1576
|
+
success: false,
|
|
1577
|
+
message: activityResult.message,
|
|
1578
|
+
data: {
|
|
1579
|
+
output: {
|
|
1580
|
+
iterations: iteration,
|
|
1581
|
+
completed: false,
|
|
1582
|
+
},
|
|
1583
|
+
outcomes: {
|
|
1584
|
+
Failed: true,
|
|
1585
|
+
},
|
|
1586
|
+
},
|
|
1587
|
+
};
|
|
1588
|
+
}
|
|
1508
1589
|
}
|
|
1509
1590
|
iteration++;
|
|
1510
1591
|
conditionResult = this.evaluateCondition(condition);
|
|
@@ -1517,7 +1598,18 @@ class While extends Activity {
|
|
|
1517
1598
|
}
|
|
1518
1599
|
catch (err) {
|
|
1519
1600
|
console.error('[While] Error in loop execution:', err);
|
|
1520
|
-
return
|
|
1601
|
+
return {
|
|
1602
|
+
success: false,
|
|
1603
|
+
message: {
|
|
1604
|
+
text: err instanceof Error ? err.message : 'Failed during loop execution',
|
|
1605
|
+
},
|
|
1606
|
+
data: {
|
|
1607
|
+
output: { iterations: 0, completed: false },
|
|
1608
|
+
outcomes: {
|
|
1609
|
+
Failed: true,
|
|
1610
|
+
},
|
|
1611
|
+
},
|
|
1612
|
+
};
|
|
1521
1613
|
}
|
|
1522
1614
|
}
|
|
1523
1615
|
evaluateCondition(condition) {
|
|
@@ -1567,7 +1659,23 @@ class ForEach extends Activity {
|
|
|
1567
1659
|
};
|
|
1568
1660
|
// Execute activities for current item
|
|
1569
1661
|
for (const activity of activities) {
|
|
1570
|
-
await activity.execute(itemContext);
|
|
1662
|
+
const activityResult = await activity.execute(itemContext);
|
|
1663
|
+
if (!activityResult.success) {
|
|
1664
|
+
return {
|
|
1665
|
+
success: false,
|
|
1666
|
+
message: activityResult.message,
|
|
1667
|
+
data: {
|
|
1668
|
+
output: {
|
|
1669
|
+
totalItems: items.length,
|
|
1670
|
+
processedItems: results.length,
|
|
1671
|
+
results,
|
|
1672
|
+
},
|
|
1673
|
+
outcomes: {
|
|
1674
|
+
Failed: true,
|
|
1675
|
+
},
|
|
1676
|
+
},
|
|
1677
|
+
};
|
|
1678
|
+
}
|
|
1571
1679
|
}
|
|
1572
1680
|
results.push({
|
|
1573
1681
|
item: currentItem,
|
|
@@ -1584,7 +1692,18 @@ class ForEach extends Activity {
|
|
|
1584
1692
|
}
|
|
1585
1693
|
catch (err) {
|
|
1586
1694
|
console.error('[ForEach] Error in iteration:', err);
|
|
1587
|
-
return
|
|
1695
|
+
return {
|
|
1696
|
+
success: false,
|
|
1697
|
+
message: {
|
|
1698
|
+
text: err instanceof Error ? err.message : 'Failed during iteration',
|
|
1699
|
+
},
|
|
1700
|
+
data: {
|
|
1701
|
+
output: { totalItems: 0, processedItems: 0, results: [] },
|
|
1702
|
+
outcomes: {
|
|
1703
|
+
Failed: true,
|
|
1704
|
+
},
|
|
1705
|
+
},
|
|
1706
|
+
};
|
|
1588
1707
|
}
|
|
1589
1708
|
}
|
|
1590
1709
|
}
|
|
@@ -1629,20 +1748,66 @@ class ExecuteCommand extends Activity {
|
|
|
1629
1748
|
}
|
|
1630
1749
|
// Execute command through Command Bus
|
|
1631
1750
|
const result = await this.commandService.execute(commandKey, commandInput);
|
|
1751
|
+
if (!result) {
|
|
1752
|
+
return {
|
|
1753
|
+
success: false,
|
|
1754
|
+
message: {
|
|
1755
|
+
text: `Command '${commandKey}' returned no result`,
|
|
1756
|
+
},
|
|
1757
|
+
data: {
|
|
1758
|
+
output: {
|
|
1759
|
+
commandKey,
|
|
1760
|
+
success: false,
|
|
1761
|
+
executedAt: new Date().toISOString(),
|
|
1762
|
+
},
|
|
1763
|
+
outcomes: {
|
|
1764
|
+
Failed: true,
|
|
1765
|
+
},
|
|
1766
|
+
},
|
|
1767
|
+
};
|
|
1768
|
+
}
|
|
1769
|
+
if (!result.success) {
|
|
1770
|
+
return {
|
|
1771
|
+
success: false,
|
|
1772
|
+
message: result.message,
|
|
1773
|
+
data: {
|
|
1774
|
+
output: {
|
|
1775
|
+
commandKey,
|
|
1776
|
+
success: false,
|
|
1777
|
+
executedAt: new Date().toISOString(),
|
|
1778
|
+
error: result.message?.text,
|
|
1779
|
+
},
|
|
1780
|
+
outcomes: {
|
|
1781
|
+
Failed: true,
|
|
1782
|
+
},
|
|
1783
|
+
},
|
|
1784
|
+
};
|
|
1785
|
+
}
|
|
1632
1786
|
return this.createResult({
|
|
1633
1787
|
commandKey,
|
|
1634
1788
|
success: true,
|
|
1635
|
-
output: result,
|
|
1636
|
-
executedAt: new Date().toISOString()
|
|
1789
|
+
output: result.data,
|
|
1790
|
+
executedAt: new Date().toISOString(),
|
|
1637
1791
|
}, 'Done');
|
|
1638
1792
|
}
|
|
1639
1793
|
catch (err) {
|
|
1640
1794
|
console.error('[ExecuteCommand] Error executing command:', err);
|
|
1641
|
-
return
|
|
1642
|
-
commandKey,
|
|
1795
|
+
return {
|
|
1643
1796
|
success: false,
|
|
1644
|
-
|
|
1645
|
-
|
|
1797
|
+
message: {
|
|
1798
|
+
text: err instanceof Error ? err.message : 'Unknown error',
|
|
1799
|
+
},
|
|
1800
|
+
data: {
|
|
1801
|
+
output: {
|
|
1802
|
+
commandKey,
|
|
1803
|
+
success: false,
|
|
1804
|
+
error: err instanceof Error ? err.message : 'Unknown error',
|
|
1805
|
+
},
|
|
1806
|
+
outcomes: {
|
|
1807
|
+
Failed: true,
|
|
1808
|
+
},
|
|
1809
|
+
},
|
|
1810
|
+
};
|
|
1646
1811
|
}
|
|
1647
1812
|
}
|
|
1648
1813
|
}
|
|
@@ -1698,11 +1863,22 @@ class ExecuteQuery extends Activity {
|
|
|
1698
1863
|
}
|
|
1699
1864
|
catch (err) {
|
|
1700
1865
|
console.error('[ExecuteQuery] Error executing query:', err);
|
|
1701
|
-
return
|
|
1702
|
-
queryKey,
|
|
1866
|
+
return {
|
|
1703
1867
|
success: false,
|
|
1704
|
-
|
|
1705
|
-
|
|
1868
|
+
message: {
|
|
1869
|
+
text: err instanceof Error ? err.message : 'Unknown error',
|
|
1870
|
+
},
|
|
1871
|
+
data: {
|
|
1872
|
+
output: {
|
|
1873
|
+
queryKey,
|
|
1874
|
+
success: false,
|
|
1875
|
+
error: err instanceof Error ? err.message : 'Unknown error',
|
|
1876
|
+
},
|
|
1877
|
+
outcomes: {
|
|
1878
|
+
Failed: true,
|
|
1879
|
+
},
|
|
1880
|
+
},
|
|
1881
|
+
};
|
|
1706
1882
|
}
|
|
1707
1883
|
}
|
|
1708
1884
|
}
|
|
@@ -1935,13 +2111,13 @@ class AXPWorkflowModule {
|
|
|
1935
2111
|
f();
|
|
1936
2112
|
});
|
|
1937
2113
|
}
|
|
1938
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1939
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
1940
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
2114
|
+
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 }); }
|
|
2115
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowModule }); }
|
|
2116
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowModule, providers: [
|
|
1941
2117
|
provideWorkflowActivityCommands(),
|
|
1942
2118
|
] }); }
|
|
1943
2119
|
}
|
|
1944
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWorkflowModule, decorators: [{
|
|
1945
2121
|
type: NgModule,
|
|
1946
2122
|
args: [{
|
|
1947
2123
|
imports: [],
|