@acorex/platform 21.0.0-next.3 → 21.0.0-next.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/acorex-platform-auth.mjs +295 -45
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/{acorex-platform-common-common-settings.provider-zhqNP3xb.mjs → acorex-platform-common-common-settings.provider-G9XcXXOG.mjs} +60 -4
- package/fesm2022/acorex-platform-common-common-settings.provider-G9XcXXOG.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +960 -319
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +1352 -832
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +554 -826
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +530 -154
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs +121 -0
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-components.mjs +5969 -2347
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +169 -154
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +15380 -9274
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +393 -110
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +511 -450
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs → acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs} +10 -10
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs → acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.mjs} +39 -16
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs → acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs} +6 -7
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs → acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs} +12 -12
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGQqY5Mw.mjs +111 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGQqY5Mw.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs} +6 -6
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs} +5 -5
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs → acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs} +6 -6
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +7865 -4026
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-native.mjs +8 -7
- package/fesm2022/acorex-platform-native.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +220 -169
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs +160 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cvvr4HnL.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs +120 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-TYoLN1Jq.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs → acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.mjs} +18 -25
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-C2z5Lq9y.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-401.component-cfREo88K.mjs → acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs → acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs +19 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +1717 -66
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs → acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs} +6 -6
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs → acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs} +6 -6
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs → acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs} +11 -11
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-CHfrTtol.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs → acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs} +9 -9
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BSmvnUVq.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +563 -561
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +1735 -1750
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/fesm2022/acorex-platform.mjs.map +1 -1
- package/package.json +31 -31
- package/{auth/index.d.ts → types/acorex-platform-auth.d.ts} +247 -10
- package/{common/index.d.ts → types/acorex-platform-common.d.ts} +492 -31
- package/{core/index.d.ts → types/acorex-platform-core.d.ts} +606 -392
- package/{domain/index.d.ts → types/acorex-platform-domain.d.ts} +719 -413
- package/{layout/builder/index.d.ts → types/acorex-platform-layout-builder.d.ts} +128 -56
- package/types/acorex-platform-layout-components.d.ts +2927 -0
- package/{layout/designer/index.d.ts → types/acorex-platform-layout-designer.d.ts} +9 -3
- package/{layout/entity/index.d.ts → types/acorex-platform-layout-entity.d.ts} +1133 -237
- package/{layout/views/index.d.ts → types/acorex-platform-layout-views.d.ts} +90 -31
- package/{layout/widget-core/index.d.ts → types/acorex-platform-layout-widget-core.d.ts} +206 -102
- package/{layout/widgets/index.d.ts → types/acorex-platform-layout-widgets.d.ts} +942 -137
- package/{native/index.d.ts → types/acorex-platform-native.d.ts} +0 -7
- package/{runtime/index.d.ts → types/acorex-platform-runtime.d.ts} +237 -74
- package/{themes/default/index.d.ts → types/acorex-platform-themes-default.d.ts} +113 -5
- package/{themes/shared/index.d.ts → types/acorex-platform-themes-shared.d.ts} +1 -1
- package/types/acorex-platform-workflow.d.ts +1806 -0
- package/fesm2022/acorex-platform-common-common-settings.provider-zhqNP3xb.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs +0 -157
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs +0 -1542
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs +0 -101
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-401.component-cfREo88K.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs +0 -19
- package/fesm2022/acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs.map +0 -1
- package/layout/components/index.d.ts +0 -1669
- package/workflow/index.d.ts +0 -2443
- /package/{index.d.ts → types/acorex-platform.d.ts} +0 -0
package/workflow/index.d.ts
DELETED
|
@@ -1,2443 +0,0 @@
|
|
|
1
|
-
import * as rxjs from 'rxjs';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { Type, ModuleWithProviders, Injector, InjectionToken } from '@angular/core';
|
|
5
|
-
import { AXPCommand } from '@acorex/platform/runtime';
|
|
6
|
-
import * as _acorex_platform_core from '@acorex/platform/core';
|
|
7
|
-
import { AXPExecuteCommandResult, AXPValidationRules, AXPActionMenuItem } from '@acorex/platform/core';
|
|
8
|
-
import { AXPWidgetTypesMap, AXPWidgetNode } from '@acorex/platform/layout/widget-core';
|
|
9
|
-
import { AXStyleColorType } from '@acorex/cdk/common';
|
|
10
|
-
import { AXPopupSizeType } from '@acorex/components/popup';
|
|
11
|
-
|
|
12
|
-
declare class AXPWorkflowError extends Error {
|
|
13
|
-
inner: Error | null;
|
|
14
|
-
constructor(message: string, inner?: Error | null);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
interface AXPWorkflow {
|
|
18
|
-
steps: {
|
|
19
|
-
[stepName: string]: AXPWorkflowStep;
|
|
20
|
-
};
|
|
21
|
-
startStepId: string;
|
|
22
|
-
}
|
|
23
|
-
declare class AXPWorkflowContext {
|
|
24
|
-
constructor(initialData?: any);
|
|
25
|
-
private variables;
|
|
26
|
-
private stepOutputs;
|
|
27
|
-
setVariable(key: string, value: any): void;
|
|
28
|
-
setVariables(context?: any): void;
|
|
29
|
-
getVariable<T = any>(key?: string | null): T;
|
|
30
|
-
setOutput(key: string, output: any): void;
|
|
31
|
-
setOutputs(values: Map<string, any>): void;
|
|
32
|
-
getOutput<T = any>(key: string): T;
|
|
33
|
-
}
|
|
34
|
-
type AXPWorkflowActionInput = any;
|
|
35
|
-
type AXPWorkflowConditionType = 'AND' | 'OR' | 'SINGLE';
|
|
36
|
-
interface AXPWorkflowCondition {
|
|
37
|
-
type: AXPWorkflowConditionType;
|
|
38
|
-
conditions?: AXPWorkflowCondition[];
|
|
39
|
-
expression?: string;
|
|
40
|
-
}
|
|
41
|
-
interface AXPWorkflowNextStep {
|
|
42
|
-
conditions: AXPWorkflowCondition[];
|
|
43
|
-
nextStepId: string;
|
|
44
|
-
}
|
|
45
|
-
interface AXPWorkflowStep {
|
|
46
|
-
id?: string;
|
|
47
|
-
action: AXPWorkflowAction | string;
|
|
48
|
-
input?: AXPWorkflowActionInput;
|
|
49
|
-
nextSteps?: AXPWorkflowNextStep[];
|
|
50
|
-
conditions?: AXPWorkflowCondition[];
|
|
51
|
-
}
|
|
52
|
-
declare abstract class AXPWorkflowAction {
|
|
53
|
-
private eventService;
|
|
54
|
-
protected dispatch(event: AXPWorkflowEvent): void;
|
|
55
|
-
abstract execute(context: AXPWorkflowContext): Promise<void>;
|
|
56
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowAction, never>;
|
|
57
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowAction>;
|
|
58
|
-
}
|
|
59
|
-
declare abstract class AXPWorkflowFunction {
|
|
60
|
-
abstract execute(...args: any[]): Promise<any> | any;
|
|
61
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowFunction, never>;
|
|
62
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowFunction>;
|
|
63
|
-
}
|
|
64
|
-
interface AXPWorkflowEvent<T = any> {
|
|
65
|
-
type: string;
|
|
66
|
-
payload?: T;
|
|
67
|
-
}
|
|
68
|
-
declare function createWorkFlowEvent<T>(type: string): {
|
|
69
|
-
(payload: T): {
|
|
70
|
-
type: string;
|
|
71
|
-
payload: T;
|
|
72
|
-
};
|
|
73
|
-
type: string;
|
|
74
|
-
};
|
|
75
|
-
declare function ofType<T extends {
|
|
76
|
-
type: string;
|
|
77
|
-
}>(...allowedTypes: Array<{
|
|
78
|
-
type: string;
|
|
79
|
-
}>): rxjs.MonoTypeOperatorFunction<T>;
|
|
80
|
-
|
|
81
|
-
declare class AXPWorkflowEventService {
|
|
82
|
-
private eventSubject;
|
|
83
|
-
dispatch(event: AXPWorkflowEvent): void;
|
|
84
|
-
get events$(): Observable<AXPWorkflowEvent>;
|
|
85
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowEventService, never>;
|
|
86
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowEventService>;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
declare class AXPWorkflowRegistryService {
|
|
90
|
-
private functionsMap;
|
|
91
|
-
private actionsMap;
|
|
92
|
-
private workflowsMap;
|
|
93
|
-
registerWorkflow(name: string, workflow: AXPWorkflow): void;
|
|
94
|
-
getWorkflow(name: string): AXPWorkflow | undefined;
|
|
95
|
-
registerAction(name: string, action: Type<AXPWorkflowAction>): void;
|
|
96
|
-
getAction(name: string): Type<AXPWorkflowAction> | undefined;
|
|
97
|
-
registerFunction(name: string, func: Type<AXPWorkflowFunction>): void;
|
|
98
|
-
getFunction(name: string): Type<AXPWorkflowFunction> | undefined;
|
|
99
|
-
getFunctionNames(): string[];
|
|
100
|
-
getStep(workflowName: string, stepName: string): AXPWorkflowStep | undefined;
|
|
101
|
-
updateStepInWorkflow(workflowName: string, stepName: string, step: AXPWorkflowStep): void;
|
|
102
|
-
addStepToWorkflow(workflowName: string, stepName: string, step: AXPWorkflowStep): void;
|
|
103
|
-
addAfterStep(workflowId: string, stepId: string, newStepId: string, newStepAction: string, conditionExpression: string): void;
|
|
104
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowRegistryService, never>;
|
|
105
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowRegistryService>;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
interface AXPWorkflowModuleConfigs {
|
|
109
|
-
functions?: {
|
|
110
|
-
[name: string]: Type<AXPWorkflowFunction>;
|
|
111
|
-
};
|
|
112
|
-
actions?: {
|
|
113
|
-
[name: string]: Type<AXPWorkflowAction>;
|
|
114
|
-
};
|
|
115
|
-
workflows?: {
|
|
116
|
-
[name: string]: AXPWorkflow;
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
declare class AXPWorkflowModule {
|
|
120
|
-
private _commandSetup;
|
|
121
|
-
static forRoot(config?: AXPWorkflowModuleConfigs): ModuleWithProviders<AXPWorkflowModule>;
|
|
122
|
-
static forChild(config?: AXPWorkflowModuleConfigs): ModuleWithProviders<AXPWorkflowModule>;
|
|
123
|
-
/**
|
|
124
|
-
* @ignore
|
|
125
|
-
*/
|
|
126
|
-
constructor(instances: any[]);
|
|
127
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowModule, [{ optional: true; }]>;
|
|
128
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AXPWorkflowModule, never, never, never>;
|
|
129
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<AXPWorkflowModule>;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
declare class AXPWorkflowService {
|
|
133
|
-
private registryService;
|
|
134
|
-
private injector;
|
|
135
|
-
private eventService;
|
|
136
|
-
get events$(): Observable<AXPWorkflowEvent>;
|
|
137
|
-
constructor(registryService: AXPWorkflowRegistryService, injector: Injector);
|
|
138
|
-
exists(name: string): boolean;
|
|
139
|
-
execute(workflow: AXPWorkflow | string, initialContext?: AXPWorkflowContext | any | null): Promise<AXPWorkflowContext>;
|
|
140
|
-
private processData;
|
|
141
|
-
private getActionInstance;
|
|
142
|
-
private getWorkflowInstance;
|
|
143
|
-
private determineNextStep;
|
|
144
|
-
private evaluateCondition;
|
|
145
|
-
private evaluateSingleCondition;
|
|
146
|
-
private evaluateExpression;
|
|
147
|
-
private processInputs;
|
|
148
|
-
private createFunctionScope;
|
|
149
|
-
private getFunctionInstance;
|
|
150
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowService, never>;
|
|
151
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowService>;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Base entity with versioning support.
|
|
156
|
-
*/
|
|
157
|
-
interface AXPVersionedEntity {
|
|
158
|
-
version: number;
|
|
159
|
-
isLatest: boolean;
|
|
160
|
-
isPublished: boolean;
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Workflow definition stored in database.
|
|
164
|
-
* This is the stored format that matches Elsa backend structure.
|
|
165
|
-
*/
|
|
166
|
-
interface AXPStoredWorkflowDefinition extends AXPVersionedEntity {
|
|
167
|
-
/**
|
|
168
|
-
* Unique ID of this workflow definition version.
|
|
169
|
-
*/
|
|
170
|
-
id: string;
|
|
171
|
-
/**
|
|
172
|
-
* Unique workflow name (same across all versions).
|
|
173
|
-
* This is the primary identifier (replaces definitionId).
|
|
174
|
-
*/
|
|
175
|
-
name: string;
|
|
176
|
-
/**
|
|
177
|
-
* Tenant ID (nullable).
|
|
178
|
-
*/
|
|
179
|
-
tenantId?: string | null;
|
|
180
|
-
/**
|
|
181
|
-
* Description of what the workflow does.
|
|
182
|
-
*/
|
|
183
|
-
description?: string | null;
|
|
184
|
-
/**
|
|
185
|
-
* Creation timestamp (ISO date-time).
|
|
186
|
-
*/
|
|
187
|
-
createdAt: string;
|
|
188
|
-
/**
|
|
189
|
-
* Version of the tool that produced this definition (e.g. "3.2.0.0").
|
|
190
|
-
*/
|
|
191
|
-
toolVersion?: string | null;
|
|
192
|
-
/**
|
|
193
|
-
* Materializer name for deserialization.
|
|
194
|
-
*/
|
|
195
|
-
materializerName?: string;
|
|
196
|
-
/**
|
|
197
|
-
* JSON data (for simple workflows).
|
|
198
|
-
*/
|
|
199
|
-
stringData?: string;
|
|
200
|
-
/**
|
|
201
|
-
* Binary data (for complex workflows).
|
|
202
|
-
*/
|
|
203
|
-
binaryData?: Uint8Array;
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Variable definition.
|
|
207
|
-
* Matches VariableDefinition from workflow definition schema.
|
|
208
|
-
*/
|
|
209
|
-
interface AXPVariableDefinition {
|
|
210
|
-
/**
|
|
211
|
-
* Variable ID.
|
|
212
|
-
*/
|
|
213
|
-
id?: string;
|
|
214
|
-
/**
|
|
215
|
-
* Variable name.
|
|
216
|
-
*/
|
|
217
|
-
name: string;
|
|
218
|
-
/**
|
|
219
|
-
* Type name (e.g., "String", "Int32", "Boolean").
|
|
220
|
-
*/
|
|
221
|
-
typeName: string;
|
|
222
|
-
/**
|
|
223
|
-
* Whether this is an array type.
|
|
224
|
-
*/
|
|
225
|
-
isArray?: boolean;
|
|
226
|
-
/**
|
|
227
|
-
* Variable value (as string expression or literal).
|
|
228
|
-
*/
|
|
229
|
-
value?: string | null;
|
|
230
|
-
/**
|
|
231
|
-
* Storage driver type name (for custom storage).
|
|
232
|
-
*/
|
|
233
|
-
storageDriverTypeName?: string | null;
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* Workflow input definition.
|
|
237
|
-
* Matches WorkflowInputDefinition from workflow definition schema.
|
|
238
|
-
*/
|
|
239
|
-
interface AXPWorkflowInputDefinition {
|
|
240
|
-
/**
|
|
241
|
-
* Input type (e.g., "String", "Int32", "Object").
|
|
242
|
-
*/
|
|
243
|
-
type: string;
|
|
244
|
-
/**
|
|
245
|
-
* Input name.
|
|
246
|
-
*/
|
|
247
|
-
name: string;
|
|
248
|
-
/**
|
|
249
|
-
* Display name.
|
|
250
|
-
*/
|
|
251
|
-
displayName?: string;
|
|
252
|
-
/**
|
|
253
|
-
* Description.
|
|
254
|
-
*/
|
|
255
|
-
description?: string;
|
|
256
|
-
/**
|
|
257
|
-
* Category for grouping.
|
|
258
|
-
*/
|
|
259
|
-
category?: string;
|
|
260
|
-
/**
|
|
261
|
-
* UI hint (widget type).
|
|
262
|
-
*/
|
|
263
|
-
uiHint?: string;
|
|
264
|
-
/**
|
|
265
|
-
* Storage driver type (for custom storage).
|
|
266
|
-
*/
|
|
267
|
-
storageDriverType?: string | null;
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Workflow output definition.
|
|
271
|
-
* Matches WorkflowOutputDefinition from workflow definition schema.
|
|
272
|
-
*/
|
|
273
|
-
interface AXPWorkflowOutputDefinition {
|
|
274
|
-
/**
|
|
275
|
-
* Output type (e.g., "String", "Int32", "Object").
|
|
276
|
-
*/
|
|
277
|
-
type: string;
|
|
278
|
-
/**
|
|
279
|
-
* Output name.
|
|
280
|
-
*/
|
|
281
|
-
name: string;
|
|
282
|
-
/**
|
|
283
|
-
* Display name.
|
|
284
|
-
*/
|
|
285
|
-
displayName?: string;
|
|
286
|
-
/**
|
|
287
|
-
* Description.
|
|
288
|
-
*/
|
|
289
|
-
description?: string;
|
|
290
|
-
/**
|
|
291
|
-
* Category for grouping.
|
|
292
|
-
*/
|
|
293
|
-
category?: string;
|
|
294
|
-
}
|
|
295
|
-
/**
|
|
296
|
-
* Expression.
|
|
297
|
-
* Used for dynamic values in activities.
|
|
298
|
-
*/
|
|
299
|
-
interface AXPExpression {
|
|
300
|
-
/**
|
|
301
|
-
* Expression type (e.g., "Literal", "JavaScript", "Liquid").
|
|
302
|
-
*/
|
|
303
|
-
type: string;
|
|
304
|
-
/**
|
|
305
|
-
* Expression value.
|
|
306
|
-
*/
|
|
307
|
-
value?: any;
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
* Input value wrapper.
|
|
311
|
-
* Wraps an expression with type information.
|
|
312
|
-
*/
|
|
313
|
-
interface AXPInputValue {
|
|
314
|
-
/**
|
|
315
|
-
* Type name.
|
|
316
|
-
*/
|
|
317
|
-
typeName: string;
|
|
318
|
-
/**
|
|
319
|
-
* Expression (or null).
|
|
320
|
-
*/
|
|
321
|
-
expression?: AXPExpression | null;
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* Output value wrapper.
|
|
325
|
-
* References memory location.
|
|
326
|
-
*/
|
|
327
|
-
interface AXPOutputValue {
|
|
328
|
-
/**
|
|
329
|
-
* Type name.
|
|
330
|
-
*/
|
|
331
|
-
typeName: string;
|
|
332
|
-
/**
|
|
333
|
-
* Memory reference (or null).
|
|
334
|
-
*/
|
|
335
|
-
memoryReference?: {
|
|
336
|
-
id: string;
|
|
337
|
-
} | null;
|
|
338
|
-
}
|
|
339
|
-
/**
|
|
340
|
-
* Position (for visual layout).
|
|
341
|
-
*/
|
|
342
|
-
interface AXPPosition {
|
|
343
|
-
x: number;
|
|
344
|
-
y: number;
|
|
345
|
-
}
|
|
346
|
-
/**
|
|
347
|
-
* Endpoint (connection point).
|
|
348
|
-
*/
|
|
349
|
-
interface AXPEndpoint {
|
|
350
|
-
/**
|
|
351
|
-
* Activity ID.
|
|
352
|
-
*/
|
|
353
|
-
activity: string;
|
|
354
|
-
/**
|
|
355
|
-
* Port name (nullable).
|
|
356
|
-
*/
|
|
357
|
-
port?: string | null;
|
|
358
|
-
}
|
|
359
|
-
/**
|
|
360
|
-
* Connection between activities.
|
|
361
|
-
*/
|
|
362
|
-
interface AXPConnection {
|
|
363
|
-
/**
|
|
364
|
-
* Source endpoint.
|
|
365
|
-
*/
|
|
366
|
-
source: AXPEndpoint;
|
|
367
|
-
/**
|
|
368
|
-
* Target endpoint.
|
|
369
|
-
*/
|
|
370
|
-
target: AXPEndpoint;
|
|
371
|
-
/**
|
|
372
|
-
* Connection vertices (for curved paths).
|
|
373
|
-
*/
|
|
374
|
-
vertices?: AXPPosition[];
|
|
375
|
-
}
|
|
376
|
-
/**
|
|
377
|
-
* Variable model (for flowchart variables).
|
|
378
|
-
*/
|
|
379
|
-
interface AXPVariableModel {
|
|
380
|
-
id: string;
|
|
381
|
-
name: string;
|
|
382
|
-
typeName: string;
|
|
383
|
-
value?: string | null;
|
|
384
|
-
storageDriverTypeName?: string | null;
|
|
385
|
-
}
|
|
386
|
-
/**
|
|
387
|
-
* Metadata (designer annotations).
|
|
388
|
-
*/
|
|
389
|
-
interface AXPMetadata {
|
|
390
|
-
[key: string]: any;
|
|
391
|
-
}
|
|
392
|
-
/**
|
|
393
|
-
* Custom properties (free-form bag).
|
|
394
|
-
*/
|
|
395
|
-
interface AXPCustomProperties {
|
|
396
|
-
/**
|
|
397
|
-
* Connections that reference non-existent activities.
|
|
398
|
-
*/
|
|
399
|
-
notFoundConnections?: AXPConnection[];
|
|
400
|
-
/**
|
|
401
|
-
* Additional custom properties.
|
|
402
|
-
*/
|
|
403
|
-
[key: string]: any;
|
|
404
|
-
}
|
|
405
|
-
/**
|
|
406
|
-
* Base activity (workflow definition format).
|
|
407
|
-
* Matches Activity from workflow definition schema.
|
|
408
|
-
* Note: This is the workflow definition format, not the frontend Activity class.
|
|
409
|
-
*/
|
|
410
|
-
interface AXPActivity {
|
|
411
|
-
/**
|
|
412
|
-
* Activity ID.
|
|
413
|
-
*/
|
|
414
|
-
id: string;
|
|
415
|
-
/**
|
|
416
|
-
* Node ID (for visual designer).
|
|
417
|
-
*/
|
|
418
|
-
nodeId: string;
|
|
419
|
-
/**
|
|
420
|
-
* Activity name.
|
|
421
|
-
*/
|
|
422
|
-
name?: string | null;
|
|
423
|
-
/**
|
|
424
|
-
* Activity type (e.g., "workflow-activity:write-line", "workflow-activity:if").
|
|
425
|
-
*/
|
|
426
|
-
type: string;
|
|
427
|
-
/**
|
|
428
|
-
* Activity version.
|
|
429
|
-
*/
|
|
430
|
-
version: number;
|
|
431
|
-
/**
|
|
432
|
-
* Execution mode for this activity instance.
|
|
433
|
-
* Determines where this activity should be executed:
|
|
434
|
-
* - 'frontend': Execute in browser (UI activities like dialogs, toasts, navigation)
|
|
435
|
-
* - 'backend': Execute in backend (business logic, database operations, API calls)
|
|
436
|
-
* - 'both': Execute in both frontend and backend (hybrid activities)
|
|
437
|
-
*
|
|
438
|
-
* If not specified, falls back to ActivityDescriptor's executionMode.
|
|
439
|
-
* This allows per-instance override of the default execution mode.
|
|
440
|
-
*
|
|
441
|
-
* @example
|
|
442
|
-
* ```json
|
|
443
|
-
* {
|
|
444
|
-
* "id": "show-dialog",
|
|
445
|
-
* "type": "workflow-activity:show-dialog",
|
|
446
|
-
* "executionMode": "frontend"
|
|
447
|
-
* }
|
|
448
|
-
* ```
|
|
449
|
-
*/
|
|
450
|
-
executionMode?: 'frontend' | 'backend' | 'both';
|
|
451
|
-
/**
|
|
452
|
-
* Custom properties.
|
|
453
|
-
*/
|
|
454
|
-
customProperties?: AXPCustomProperties;
|
|
455
|
-
/**
|
|
456
|
-
* Metadata (designer annotations).
|
|
457
|
-
*/
|
|
458
|
-
metadata?: AXPMetadata;
|
|
459
|
-
/**
|
|
460
|
-
* Additional type-specific properties.
|
|
461
|
-
*/
|
|
462
|
-
[key: string]: any;
|
|
463
|
-
}
|
|
464
|
-
/**
|
|
465
|
-
* Flowchart activity (workflow definition format).
|
|
466
|
-
* This is the root activity that contains all other activities.
|
|
467
|
-
*/
|
|
468
|
-
interface AXPFlowchart extends AXPActivity {
|
|
469
|
-
/**
|
|
470
|
-
* Type must be "workflow-activity:flowchart".
|
|
471
|
-
*/
|
|
472
|
-
type: "workflow-activity:flowchart";
|
|
473
|
-
/**
|
|
474
|
-
* Activities in this flowchart.
|
|
475
|
-
*/
|
|
476
|
-
activities: AXPActivity[];
|
|
477
|
-
/**
|
|
478
|
-
* Variables in this flowchart.
|
|
479
|
-
*/
|
|
480
|
-
variables?: AXPVariableModel[];
|
|
481
|
-
/**
|
|
482
|
-
* Connections between activities.
|
|
483
|
-
*/
|
|
484
|
-
connections: AXPConnection[];
|
|
485
|
-
}
|
|
486
|
-
/**
|
|
487
|
-
* Simplified workflow definition for JSON files.
|
|
488
|
-
* This is what developers write - system fields are added automatically.
|
|
489
|
-
*/
|
|
490
|
-
interface AXPWorkflowDefinitionJson {
|
|
491
|
-
/**
|
|
492
|
-
* Unique workflow name (used as key/identifier).
|
|
493
|
-
* This is the only required field for identification.
|
|
494
|
-
* Similar to entity system where 'name' is the unique key.
|
|
495
|
-
*/
|
|
496
|
-
name: string;
|
|
497
|
-
/**
|
|
498
|
-
* Display title (human-readable name shown in UI).
|
|
499
|
-
* Similar to entity system where 'title' is the display name.
|
|
500
|
-
*/
|
|
501
|
-
title?: string | null;
|
|
502
|
-
/**
|
|
503
|
-
* Description.
|
|
504
|
-
*/
|
|
505
|
-
description?: string | null;
|
|
506
|
-
/**
|
|
507
|
-
* Workflow variables.
|
|
508
|
-
*/
|
|
509
|
-
variables?: AXPVariableDefinition[];
|
|
510
|
-
/**
|
|
511
|
-
* Workflow inputs.
|
|
512
|
-
*/
|
|
513
|
-
inputs?: AXPWorkflowInputDefinition[];
|
|
514
|
-
/**
|
|
515
|
-
* Workflow outputs.
|
|
516
|
-
*/
|
|
517
|
-
outputs?: AXPWorkflowOutputDefinition[];
|
|
518
|
-
/**
|
|
519
|
-
* Workflow outcomes.
|
|
520
|
-
*/
|
|
521
|
-
outcomes?: string[];
|
|
522
|
-
/**
|
|
523
|
-
* Custom properties.
|
|
524
|
-
*/
|
|
525
|
-
customProperties?: AXPCustomProperties;
|
|
526
|
-
/**
|
|
527
|
-
* Workflow options.
|
|
528
|
-
*/
|
|
529
|
-
options?: AXPWorkflowOptions;
|
|
530
|
-
/**
|
|
531
|
-
* Root activity (Flowchart).
|
|
532
|
-
*/
|
|
533
|
-
root: AXPFlowchart;
|
|
534
|
-
}
|
|
535
|
-
/**
|
|
536
|
-
* Complete workflow definition (v3.0.0 format).
|
|
537
|
-
* This is the core workflow definition without system fields.
|
|
538
|
-
* System fields ($schema, tenantId, createdAt, toolVersion, isPublished, id, version, isLatest, isReadonly, isSystem)
|
|
539
|
-
* are managed by the entity system and stored in entity model.
|
|
540
|
-
*/
|
|
541
|
-
interface AXPWorkflowDefinition {
|
|
542
|
-
/**
|
|
543
|
-
* Unique workflow name (used as key/identifier, same across all versions).
|
|
544
|
-
* This is the primary identifier for the workflow.
|
|
545
|
-
*/
|
|
546
|
-
name: string;
|
|
547
|
-
/**
|
|
548
|
-
* Display title (human-readable name shown in UI).
|
|
549
|
-
*/
|
|
550
|
-
title?: string | null;
|
|
551
|
-
/**
|
|
552
|
-
* Description.
|
|
553
|
-
*/
|
|
554
|
-
description?: string | null;
|
|
555
|
-
/**
|
|
556
|
-
* Workflow variables.
|
|
557
|
-
*/
|
|
558
|
-
variables?: AXPVariableDefinition[];
|
|
559
|
-
/**
|
|
560
|
-
* Workflow inputs.
|
|
561
|
-
*/
|
|
562
|
-
inputs?: AXPWorkflowInputDefinition[];
|
|
563
|
-
/**
|
|
564
|
-
* Workflow outputs.
|
|
565
|
-
*/
|
|
566
|
-
outputs?: AXPWorkflowOutputDefinition[];
|
|
567
|
-
/**
|
|
568
|
-
* Workflow outcomes.
|
|
569
|
-
*/
|
|
570
|
-
outcomes?: string[];
|
|
571
|
-
/**
|
|
572
|
-
* Custom properties.
|
|
573
|
-
*/
|
|
574
|
-
customProperties?: AXPCustomProperties;
|
|
575
|
-
/**
|
|
576
|
-
* Workflow options.
|
|
577
|
-
*/
|
|
578
|
-
options?: AXPWorkflowOptions;
|
|
579
|
-
/**
|
|
580
|
-
* @deprecated Use options.usableAsActivity instead.
|
|
581
|
-
*/
|
|
582
|
-
usableAsActivity?: boolean | null;
|
|
583
|
-
/**
|
|
584
|
-
* Root activity (Flowchart).
|
|
585
|
-
*/
|
|
586
|
-
root: AXPFlowchart;
|
|
587
|
-
}
|
|
588
|
-
/**
|
|
589
|
-
* Workflow configuration options.
|
|
590
|
-
*/
|
|
591
|
-
interface AXPWorkflowOptions {
|
|
592
|
-
/**
|
|
593
|
-
* Activation strategy type.
|
|
594
|
-
*/
|
|
595
|
-
activationStrategyType?: string | null;
|
|
596
|
-
/**
|
|
597
|
-
* Whether workflow can be used as an activity.
|
|
598
|
-
*/
|
|
599
|
-
usableAsActivity?: boolean | null;
|
|
600
|
-
/**
|
|
601
|
-
* Auto-update consuming workflows.
|
|
602
|
-
*/
|
|
603
|
-
autoUpdateConsumingWorkflows?: boolean;
|
|
604
|
-
/**
|
|
605
|
-
* Activity category (if usable as activity).
|
|
606
|
-
*/
|
|
607
|
-
activityCategory?: string | null;
|
|
608
|
-
/**
|
|
609
|
-
* Incident strategy type.
|
|
610
|
-
*/
|
|
611
|
-
incidentStrategyType?: string | null;
|
|
612
|
-
/**
|
|
613
|
-
* Commit strategy name.
|
|
614
|
-
*/
|
|
615
|
-
commitStrategyName?: string | null;
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
/**
|
|
619
|
-
* Workflow definition loader interface.
|
|
620
|
-
* Implement this to provide workflow definitions from various sources (JSON files, database, etc.).
|
|
621
|
-
*/
|
|
622
|
-
interface AXPWorkflowDefinitionLoader {
|
|
623
|
-
/**
|
|
624
|
-
* Get workflow definition by name (unique key).
|
|
625
|
-
* @param name - The workflow name (unique key)
|
|
626
|
-
* @returns Workflow definition or null if not found
|
|
627
|
-
*/
|
|
628
|
-
get(name: string): Promise<AXPWorkflowDefinition | null>;
|
|
629
|
-
/**
|
|
630
|
-
* Get all available workflow names.
|
|
631
|
-
* Used for preloading and discovery.
|
|
632
|
-
* @returns Array of workflow names
|
|
633
|
-
*/
|
|
634
|
-
getAllNames?(): Promise<string[]>;
|
|
635
|
-
}
|
|
636
|
-
/**
|
|
637
|
-
* Workflow definition preloader interface.
|
|
638
|
-
* Implement this to provide a list of workflow definitions that should be preloaded.
|
|
639
|
-
*/
|
|
640
|
-
interface AXPWorkflowDefinitionPreloader {
|
|
641
|
-
/**
|
|
642
|
-
* Get list of workflow definition IDs to preload.
|
|
643
|
-
* @returns Array of definition IDs
|
|
644
|
-
*/
|
|
645
|
-
preload(): string[];
|
|
646
|
-
}
|
|
647
|
-
/**
|
|
648
|
-
* Injection token for workflow definition loaders.
|
|
649
|
-
* Multiple loaders can be provided (multi: true).
|
|
650
|
-
*/
|
|
651
|
-
declare const AXP_WORKFLOW_DEFINITION_LOADER: InjectionToken<AXPWorkflowDefinitionLoader>;
|
|
652
|
-
/**
|
|
653
|
-
* Resolver service for workflow definitions.
|
|
654
|
-
* Aggregates all registered loaders and resolves workflow definitions.
|
|
655
|
-
*/
|
|
656
|
-
declare class AXPWorkflowDefinitionResolver {
|
|
657
|
-
private loaders;
|
|
658
|
-
/**
|
|
659
|
-
* Get workflow definition by name (unique key).
|
|
660
|
-
* Tries all registered loaders until one returns a definition.
|
|
661
|
-
* @param name - The workflow name (unique key)
|
|
662
|
-
* @returns Workflow definition or null if not found
|
|
663
|
-
*/
|
|
664
|
-
get(name: string): Promise<AXPWorkflowDefinition | null>;
|
|
665
|
-
/**
|
|
666
|
-
* Get all available workflow names from all loaders.
|
|
667
|
-
* @returns Array of unique workflow names
|
|
668
|
-
*/
|
|
669
|
-
getAllNames(): Promise<string[]>;
|
|
670
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowDefinitionResolver, never>;
|
|
671
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowDefinitionResolver>;
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
/**
|
|
675
|
-
* Registry service for workflow definitions.
|
|
676
|
-
* Caches loaded definitions and provides change notifications.
|
|
677
|
-
*/
|
|
678
|
-
declare class AXPWorkflowDefinitionRegistryService {
|
|
679
|
-
private resolver;
|
|
680
|
-
private cache;
|
|
681
|
-
private onChanged;
|
|
682
|
-
/**
|
|
683
|
-
* Observable for workflow definition changes.
|
|
684
|
-
*/
|
|
685
|
-
get onChanged$(): rxjs.Observable<{
|
|
686
|
-
name: string;
|
|
687
|
-
action: "registered" | "updated" | "removed";
|
|
688
|
-
}>;
|
|
689
|
-
/**
|
|
690
|
-
* Get workflow definition by name (unique key).
|
|
691
|
-
* Uses cache if available, otherwise loads from resolver.
|
|
692
|
-
* @param name - The workflow name (unique key)
|
|
693
|
-
* @returns Workflow definition or null if not found
|
|
694
|
-
*/
|
|
695
|
-
get(name: string): Promise<AXPWorkflowDefinition | null>;
|
|
696
|
-
/**
|
|
697
|
-
* Register a workflow definition in the cache.
|
|
698
|
-
* @param definition - The workflow definition to register
|
|
699
|
-
*/
|
|
700
|
-
register(definition: AXPWorkflowDefinition): void;
|
|
701
|
-
/**
|
|
702
|
-
* Update a workflow definition in the cache.
|
|
703
|
-
* @param definition - The updated workflow definition
|
|
704
|
-
*/
|
|
705
|
-
update(definition: AXPWorkflowDefinition): void;
|
|
706
|
-
/**
|
|
707
|
-
* Remove a workflow definition from the cache.
|
|
708
|
-
* @param name - The workflow name to remove
|
|
709
|
-
*/
|
|
710
|
-
remove(name: string): void;
|
|
711
|
-
/**
|
|
712
|
-
* Clear all cached workflow definitions.
|
|
713
|
-
*/
|
|
714
|
-
clear(): void;
|
|
715
|
-
/**
|
|
716
|
-
* Check if a workflow definition is cached.
|
|
717
|
-
* @param definitionId - The workflow definition ID
|
|
718
|
-
* @returns True if cached, false otherwise
|
|
719
|
-
*/
|
|
720
|
-
has(definitionId: string): boolean;
|
|
721
|
-
/**
|
|
722
|
-
* Get all cached workflow definition IDs.
|
|
723
|
-
* @returns Array of definition IDs (only those that have been loaded)
|
|
724
|
-
*/
|
|
725
|
-
getAllIds(): string[];
|
|
726
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowDefinitionRegistryService, never>;
|
|
727
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowDefinitionRegistryService>;
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
/**
|
|
731
|
-
* Workflow status.
|
|
732
|
-
*/
|
|
733
|
-
type AXPWorkflowStatus = 'Running' | 'Finished';
|
|
734
|
-
/**
|
|
735
|
-
* Workflow sub-status.
|
|
736
|
-
*/
|
|
737
|
-
type AXPWorkflowSubStatus = 'Pending' | 'Executing' | 'Suspended' | 'Finished' | 'Cancelled' | 'Faulted';
|
|
738
|
-
/**
|
|
739
|
-
* Activity status.
|
|
740
|
-
*/
|
|
741
|
-
type AXPActivityStatus = 'Running' | 'Completed' | 'Canceled' | 'Faulted';
|
|
742
|
-
/**
|
|
743
|
-
* Exception state.
|
|
744
|
-
*/
|
|
745
|
-
interface AXPExceptionState {
|
|
746
|
-
/**
|
|
747
|
-
* Exception type name.
|
|
748
|
-
*/
|
|
749
|
-
type: string;
|
|
750
|
-
/**
|
|
751
|
-
* Exception message.
|
|
752
|
-
*/
|
|
753
|
-
message: string;
|
|
754
|
-
/**
|
|
755
|
-
* Stack trace (nullable).
|
|
756
|
-
*/
|
|
757
|
-
stackTrace?: string | null;
|
|
758
|
-
/**
|
|
759
|
-
* Inner exception (nullable).
|
|
760
|
-
*/
|
|
761
|
-
innerException?: AXPExceptionState | null;
|
|
762
|
-
}
|
|
763
|
-
/**
|
|
764
|
-
* Activity incident.
|
|
765
|
-
*/
|
|
766
|
-
interface AXPActivityIncident {
|
|
767
|
-
/**
|
|
768
|
-
* Activity ID that caused the incident.
|
|
769
|
-
*/
|
|
770
|
-
activityId: string;
|
|
771
|
-
/**
|
|
772
|
-
* Activity node ID.
|
|
773
|
-
*/
|
|
774
|
-
activityNodeId: string;
|
|
775
|
-
/**
|
|
776
|
-
* Activity type.
|
|
777
|
-
*/
|
|
778
|
-
activityType: string;
|
|
779
|
-
/**
|
|
780
|
-
* Incident message.
|
|
781
|
-
*/
|
|
782
|
-
message: string;
|
|
783
|
-
/**
|
|
784
|
-
* Exception (nullable).
|
|
785
|
-
*/
|
|
786
|
-
exception?: AXPExceptionState | null;
|
|
787
|
-
/**
|
|
788
|
-
* Timestamp (ISO date-time).
|
|
789
|
-
*/
|
|
790
|
-
timestamp: string;
|
|
791
|
-
}
|
|
792
|
-
/**
|
|
793
|
-
* Workflow fault state.
|
|
794
|
-
*/
|
|
795
|
-
interface AXPWorkflowFaultState {
|
|
796
|
-
/**
|
|
797
|
-
* Exception (nullable).
|
|
798
|
-
*/
|
|
799
|
-
exception?: AXPExceptionState | null;
|
|
800
|
-
/**
|
|
801
|
-
* Fault message.
|
|
802
|
-
*/
|
|
803
|
-
message: string;
|
|
804
|
-
/**
|
|
805
|
-
* Faulted activity ID (nullable).
|
|
806
|
-
*/
|
|
807
|
-
faultedActivityId?: string | null;
|
|
808
|
-
}
|
|
809
|
-
/**
|
|
810
|
-
* Bookmark.
|
|
811
|
-
*/
|
|
812
|
-
interface AXPBookmark {
|
|
813
|
-
/**
|
|
814
|
-
* Bookmark ID.
|
|
815
|
-
*/
|
|
816
|
-
id: string;
|
|
817
|
-
/**
|
|
818
|
-
* Bookmark name.
|
|
819
|
-
*/
|
|
820
|
-
name: string;
|
|
821
|
-
/**
|
|
822
|
-
* Bookmark hash.
|
|
823
|
-
*/
|
|
824
|
-
hash: string;
|
|
825
|
-
/**
|
|
826
|
-
* Bookmark payload (nullable).
|
|
827
|
-
*/
|
|
828
|
-
payload?: any | null;
|
|
829
|
-
/**
|
|
830
|
-
* Activity node ID.
|
|
831
|
-
*/
|
|
832
|
-
activityNodeId: string;
|
|
833
|
-
/**
|
|
834
|
-
* Activity instance ID.
|
|
835
|
-
*/
|
|
836
|
-
activityInstanceId: string;
|
|
837
|
-
/**
|
|
838
|
-
* Auto burn flag.
|
|
839
|
-
*/
|
|
840
|
-
autoBurn?: boolean;
|
|
841
|
-
/**
|
|
842
|
-
* Callback method name (nullable).
|
|
843
|
-
*/
|
|
844
|
-
callbackMethodName?: string | null;
|
|
845
|
-
/**
|
|
846
|
-
* Metadata (nullable).
|
|
847
|
-
*/
|
|
848
|
-
metadata?: Record<string, string> | null;
|
|
849
|
-
}
|
|
850
|
-
/**
|
|
851
|
-
* Completion callback state.
|
|
852
|
-
*/
|
|
853
|
-
interface AXPCompletionCallbackState {
|
|
854
|
-
/**
|
|
855
|
-
* Owner activity instance ID.
|
|
856
|
-
*/
|
|
857
|
-
ownerInstanceId: string;
|
|
858
|
-
/**
|
|
859
|
-
* Child activity node ID.
|
|
860
|
-
*/
|
|
861
|
-
childNodeId: string;
|
|
862
|
-
/**
|
|
863
|
-
* Method name (nullable).
|
|
864
|
-
*/
|
|
865
|
-
methodName?: string | null;
|
|
866
|
-
}
|
|
867
|
-
/**
|
|
868
|
-
* Variable (for activity context).
|
|
869
|
-
*/
|
|
870
|
-
interface AXPActivityVariable {
|
|
871
|
-
/**
|
|
872
|
-
* Variable ID.
|
|
873
|
-
*/
|
|
874
|
-
id: string;
|
|
875
|
-
/**
|
|
876
|
-
* Variable name.
|
|
877
|
-
*/
|
|
878
|
-
name: string;
|
|
879
|
-
/**
|
|
880
|
-
* Type name.
|
|
881
|
-
*/
|
|
882
|
-
typeName: string;
|
|
883
|
-
/**
|
|
884
|
-
* Is array flag.
|
|
885
|
-
*/
|
|
886
|
-
isArray?: boolean;
|
|
887
|
-
/**
|
|
888
|
-
* Variable value (nullable).
|
|
889
|
-
*/
|
|
890
|
-
value?: any | null;
|
|
891
|
-
/**
|
|
892
|
-
* Storage driver type name (nullable).
|
|
893
|
-
*/
|
|
894
|
-
storageDriverTypeName?: string | null;
|
|
895
|
-
}
|
|
896
|
-
/**
|
|
897
|
-
* Activity execution context state.
|
|
898
|
-
*/
|
|
899
|
-
interface AXPActivityExecutionContextState {
|
|
900
|
-
/**
|
|
901
|
-
* Context ID (activity instance ID).
|
|
902
|
-
*/
|
|
903
|
-
id: string;
|
|
904
|
-
/**
|
|
905
|
-
* Parent context ID (nullable).
|
|
906
|
-
*/
|
|
907
|
-
parentContextId?: string | null;
|
|
908
|
-
/**
|
|
909
|
-
* Scheduled activity node ID.
|
|
910
|
-
*/
|
|
911
|
-
scheduledActivityNodeId: string;
|
|
912
|
-
/**
|
|
913
|
-
* Owner activity node ID (nullable).
|
|
914
|
-
*/
|
|
915
|
-
ownerActivityNodeId?: string | null;
|
|
916
|
-
/**
|
|
917
|
-
* Properties bag.
|
|
918
|
-
*/
|
|
919
|
-
properties: Record<string, any>;
|
|
920
|
-
/**
|
|
921
|
-
* Activity state (evaluated properties) (nullable).
|
|
922
|
-
*/
|
|
923
|
-
activityState?: Record<string, any> | null;
|
|
924
|
-
/**
|
|
925
|
-
* Dynamic variables.
|
|
926
|
-
*/
|
|
927
|
-
dynamicVariables: AXPActivityVariable[];
|
|
928
|
-
/**
|
|
929
|
-
* Activity status.
|
|
930
|
-
*/
|
|
931
|
-
status: AXPActivityStatus;
|
|
932
|
-
/**
|
|
933
|
-
* Is executing flag.
|
|
934
|
-
*/
|
|
935
|
-
isExecuting: boolean;
|
|
936
|
-
/**
|
|
937
|
-
* Fault count.
|
|
938
|
-
*/
|
|
939
|
-
faultCount: number;
|
|
940
|
-
/**
|
|
941
|
-
* Started at timestamp (ISO date-time).
|
|
942
|
-
*/
|
|
943
|
-
startedAt: string;
|
|
944
|
-
/**
|
|
945
|
-
* Completed at timestamp (ISO date-time, nullable).
|
|
946
|
-
*/
|
|
947
|
-
completedAt?: string | null;
|
|
948
|
-
/**
|
|
949
|
-
* Tag (nullable).
|
|
950
|
-
*/
|
|
951
|
-
tag?: any | null;
|
|
952
|
-
}
|
|
953
|
-
/**
|
|
954
|
-
* Workflow state (internal execution state).
|
|
955
|
-
*/
|
|
956
|
-
interface AXPWorkflowState {
|
|
957
|
-
/**
|
|
958
|
-
* State ID.
|
|
959
|
-
*/
|
|
960
|
-
id: string;
|
|
961
|
-
/**
|
|
962
|
-
* Workflow definition ID.
|
|
963
|
-
*/
|
|
964
|
-
definitionId: string;
|
|
965
|
-
/**
|
|
966
|
-
* Workflow definition version.
|
|
967
|
-
*/
|
|
968
|
-
definitionVersion: number;
|
|
969
|
-
/**
|
|
970
|
-
* Correlation ID (nullable).
|
|
971
|
-
*/
|
|
972
|
-
correlationId?: string | null;
|
|
973
|
-
/**
|
|
974
|
-
* Workflow status.
|
|
975
|
-
*/
|
|
976
|
-
status: AXPWorkflowStatus;
|
|
977
|
-
/**
|
|
978
|
-
* Workflow sub-status.
|
|
979
|
-
*/
|
|
980
|
-
subStatus: AXPWorkflowSubStatus;
|
|
981
|
-
/**
|
|
982
|
-
* Bookmarks.
|
|
983
|
-
*/
|
|
984
|
-
bookmarks: AXPBookmark[];
|
|
985
|
-
/**
|
|
986
|
-
* Incidents.
|
|
987
|
-
*/
|
|
988
|
-
incidents: AXPActivityIncident[];
|
|
989
|
-
/**
|
|
990
|
-
* Fault (nullable).
|
|
991
|
-
*/
|
|
992
|
-
fault?: AXPWorkflowFaultState | null;
|
|
993
|
-
/**
|
|
994
|
-
* Completion callbacks.
|
|
995
|
-
*/
|
|
996
|
-
completionCallbacks: AXPCompletionCallbackState[];
|
|
997
|
-
/**
|
|
998
|
-
* Activity execution contexts.
|
|
999
|
-
*/
|
|
1000
|
-
activityExecutionContexts: AXPActivityExecutionContextState[];
|
|
1001
|
-
/**
|
|
1002
|
-
* Input data.
|
|
1003
|
-
*/
|
|
1004
|
-
input: Record<string, any>;
|
|
1005
|
-
/**
|
|
1006
|
-
* Output data.
|
|
1007
|
-
*/
|
|
1008
|
-
output: Record<string, any>;
|
|
1009
|
-
/**
|
|
1010
|
-
* Properties bag.
|
|
1011
|
-
*/
|
|
1012
|
-
properties: Record<string, any>;
|
|
1013
|
-
/**
|
|
1014
|
-
* Created at timestamp (ISO date-time).
|
|
1015
|
-
*/
|
|
1016
|
-
createdAt: string;
|
|
1017
|
-
/**
|
|
1018
|
-
* Updated at timestamp (ISO date-time).
|
|
1019
|
-
*/
|
|
1020
|
-
updatedAt: string;
|
|
1021
|
-
/**
|
|
1022
|
-
* Finished at timestamp (ISO date-time, nullable).
|
|
1023
|
-
*/
|
|
1024
|
-
finishedAt?: string | null;
|
|
1025
|
-
}
|
|
1026
|
-
/**
|
|
1027
|
-
* Workflow instance (stored in database).
|
|
1028
|
-
* This matches the Elsa Workflow Instance schema for backend compatibility.
|
|
1029
|
-
*/
|
|
1030
|
-
interface AXPWorkflowInstance {
|
|
1031
|
-
/**
|
|
1032
|
-
* Schema reference.
|
|
1033
|
-
*/
|
|
1034
|
-
$schema?: string;
|
|
1035
|
-
/**
|
|
1036
|
-
* Unique instance ID.
|
|
1037
|
-
*/
|
|
1038
|
-
id: string;
|
|
1039
|
-
/**
|
|
1040
|
-
* Workflow definition ID.
|
|
1041
|
-
*/
|
|
1042
|
-
definitionId: string;
|
|
1043
|
-
/**
|
|
1044
|
-
* Workflow definition version ID.
|
|
1045
|
-
*/
|
|
1046
|
-
definitionVersionId: string;
|
|
1047
|
-
/**
|
|
1048
|
-
* Workflow definition version number.
|
|
1049
|
-
*/
|
|
1050
|
-
version: number;
|
|
1051
|
-
/**
|
|
1052
|
-
* Parent workflow instance ID (nullable, for child workflows).
|
|
1053
|
-
*/
|
|
1054
|
-
parentWorkflowInstanceId?: string | null;
|
|
1055
|
-
/**
|
|
1056
|
-
* Workflow state (internal execution state).
|
|
1057
|
-
*/
|
|
1058
|
-
workflowState: AXPWorkflowState;
|
|
1059
|
-
/**
|
|
1060
|
-
* Workflow status.
|
|
1061
|
-
*/
|
|
1062
|
-
status: AXPWorkflowStatus;
|
|
1063
|
-
/**
|
|
1064
|
-
* Workflow sub-status.
|
|
1065
|
-
*/
|
|
1066
|
-
subStatus: AXPWorkflowSubStatus;
|
|
1067
|
-
/**
|
|
1068
|
-
* Correlation ID (nullable).
|
|
1069
|
-
*/
|
|
1070
|
-
correlationId?: string | null;
|
|
1071
|
-
/**
|
|
1072
|
-
* Instance name (nullable).
|
|
1073
|
-
*/
|
|
1074
|
-
name?: string | null;
|
|
1075
|
-
/**
|
|
1076
|
-
* Incident count.
|
|
1077
|
-
*/
|
|
1078
|
-
incidentCount: number;
|
|
1079
|
-
/**
|
|
1080
|
-
* Created at timestamp (ISO date-time).
|
|
1081
|
-
*/
|
|
1082
|
-
createdAt: string;
|
|
1083
|
-
/**
|
|
1084
|
-
* Updated at timestamp (ISO date-time).
|
|
1085
|
-
*/
|
|
1086
|
-
updatedAt: string;
|
|
1087
|
-
/**
|
|
1088
|
-
* Finished at timestamp (ISO date-time, nullable).
|
|
1089
|
-
*/
|
|
1090
|
-
finishedAt?: string | null;
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
interface ActivityPropertyWidget {
|
|
1094
|
-
type: AXPWidgetTypesMap[keyof AXPWidgetTypesMap] | string;
|
|
1095
|
-
options?: Record<string, any>;
|
|
1096
|
-
}
|
|
1097
|
-
/**
|
|
1098
|
-
* Simple activity interface - just a command with outcomes.
|
|
1099
|
-
* All activities are AXPCommand for unified execution through Command Bus.
|
|
1100
|
-
*/
|
|
1101
|
-
interface IActivity<TInput = any, TOutput = any> extends AXPCommand<TInput, {
|
|
1102
|
-
output: TOutput;
|
|
1103
|
-
outcomes: Record<string, any>;
|
|
1104
|
-
}> {
|
|
1105
|
-
/**
|
|
1106
|
-
* Activity type name.
|
|
1107
|
-
* Example: "WriteLine", "ShowDialog", "CreateUserCommand"
|
|
1108
|
-
*/
|
|
1109
|
-
type: string;
|
|
1110
|
-
/**
|
|
1111
|
-
* Display name for UI.
|
|
1112
|
-
*/
|
|
1113
|
-
name?: string;
|
|
1114
|
-
/**
|
|
1115
|
-
* Execute the activity as a command.
|
|
1116
|
-
* @param input - Activity input data
|
|
1117
|
-
* @returns Promise with output and outcomes
|
|
1118
|
-
*/
|
|
1119
|
-
execute(input: TInput): Promise<AXPExecuteCommandResult<{
|
|
1120
|
-
output: TOutput;
|
|
1121
|
-
outcomes: Record<string, any>;
|
|
1122
|
-
}>>;
|
|
1123
|
-
}
|
|
1124
|
-
/**
|
|
1125
|
-
* Base abstract class for activities.
|
|
1126
|
-
* Extend this to create custom activities.
|
|
1127
|
-
*/
|
|
1128
|
-
declare abstract class Activity<TInput = any, TOutput = any> implements IActivity<TInput, TOutput> {
|
|
1129
|
-
type: string;
|
|
1130
|
-
name?: string;
|
|
1131
|
-
constructor(type: string, name?: string);
|
|
1132
|
-
/**
|
|
1133
|
-
* Execute the activity as a command.
|
|
1134
|
-
* Override this method in subclasses to implement activity logic.
|
|
1135
|
-
*/
|
|
1136
|
-
abstract execute(input: TInput): Promise<AXPExecuteCommandResult<{
|
|
1137
|
-
output: TOutput;
|
|
1138
|
-
outcomes: Record<string, any>;
|
|
1139
|
-
}>>;
|
|
1140
|
-
/**
|
|
1141
|
-
* Helper method that returns Done outcome by default.
|
|
1142
|
-
*/
|
|
1143
|
-
protected createResult(output: TOutput, outcome?: string): AXPExecuteCommandResult<{
|
|
1144
|
-
output: TOutput;
|
|
1145
|
-
outcomes: Record<string, any>;
|
|
1146
|
-
}>;
|
|
1147
|
-
}
|
|
1148
|
-
/**
|
|
1149
|
-
* Activity descriptor - metadata about an activity type.
|
|
1150
|
-
*/
|
|
1151
|
-
interface ActivityDescriptor {
|
|
1152
|
-
/**
|
|
1153
|
-
* Activity type name.
|
|
1154
|
-
*/
|
|
1155
|
-
type: string;
|
|
1156
|
-
/**
|
|
1157
|
-
* Display name for UI.
|
|
1158
|
-
*/
|
|
1159
|
-
displayName: string;
|
|
1160
|
-
/**
|
|
1161
|
-
* Description of what the activity does.
|
|
1162
|
-
*/
|
|
1163
|
-
description?: string;
|
|
1164
|
-
/**
|
|
1165
|
-
* Category for grouping in toolbox.
|
|
1166
|
-
*/
|
|
1167
|
-
category: string;
|
|
1168
|
-
/**
|
|
1169
|
-
* Icon name or class.
|
|
1170
|
-
*/
|
|
1171
|
-
icon?: string;
|
|
1172
|
-
/**
|
|
1173
|
-
* Where this activity should be executed.
|
|
1174
|
-
* - 'frontend': Execute in browser (UI activities, console, events)
|
|
1175
|
-
* - 'backend': Execute in backend (business logic, API calls)
|
|
1176
|
-
* - 'both': Execute in both frontend and backend (hybrid activities)
|
|
1177
|
-
*
|
|
1178
|
-
* Default: 'frontend'
|
|
1179
|
-
*/
|
|
1180
|
-
executionMode?: 'frontend' | 'backend' | 'both';
|
|
1181
|
-
/**
|
|
1182
|
-
* Input descriptors.
|
|
1183
|
-
*/
|
|
1184
|
-
inputs: InputDescriptor[];
|
|
1185
|
-
/**
|
|
1186
|
-
* Output descriptors.
|
|
1187
|
-
*/
|
|
1188
|
-
outputs: OutputDescriptor[];
|
|
1189
|
-
/**
|
|
1190
|
-
* Static outcomes (exit points).
|
|
1191
|
-
* Example: ['Done', 'Success', 'Failed']
|
|
1192
|
-
*/
|
|
1193
|
-
outcomes?: string[];
|
|
1194
|
-
/**
|
|
1195
|
-
* Whether this activity is browsable in the toolbox.
|
|
1196
|
-
* Default: true
|
|
1197
|
-
*/
|
|
1198
|
-
isBrowsable?: boolean;
|
|
1199
|
-
/**
|
|
1200
|
-
* Whether this activity is a container (can have children).
|
|
1201
|
-
* Default: false
|
|
1202
|
-
*/
|
|
1203
|
-
isContainer?: boolean;
|
|
1204
|
-
}
|
|
1205
|
-
/**
|
|
1206
|
-
* Input property descriptor.
|
|
1207
|
-
* Similar to AXPEntityProperty structure.
|
|
1208
|
-
*/
|
|
1209
|
-
interface InputDescriptor {
|
|
1210
|
-
name: string;
|
|
1211
|
-
title: string;
|
|
1212
|
-
description?: string;
|
|
1213
|
-
schema: {
|
|
1214
|
-
dataType: string;
|
|
1215
|
-
nullable?: boolean;
|
|
1216
|
-
readonly?: boolean;
|
|
1217
|
-
hidden?: boolean | string;
|
|
1218
|
-
defaultValue?: any | string | ((context: any | null) => any);
|
|
1219
|
-
interface?: ActivityPropertyWidget;
|
|
1220
|
-
};
|
|
1221
|
-
validations?: AXPValidationRules;
|
|
1222
|
-
}
|
|
1223
|
-
/**
|
|
1224
|
-
* Output property descriptor.
|
|
1225
|
-
*/
|
|
1226
|
-
interface OutputDescriptor {
|
|
1227
|
-
name: string;
|
|
1228
|
-
title: string;
|
|
1229
|
-
description?: string;
|
|
1230
|
-
schema: {
|
|
1231
|
-
dataType: string;
|
|
1232
|
-
};
|
|
1233
|
-
}
|
|
1234
|
-
/**
|
|
1235
|
-
* Activity registry for registering and creating activities.
|
|
1236
|
-
*/
|
|
1237
|
-
declare class ActivityRegistry {
|
|
1238
|
-
private registry;
|
|
1239
|
-
private descriptors;
|
|
1240
|
-
/**
|
|
1241
|
-
* Register an activity type.
|
|
1242
|
-
*/
|
|
1243
|
-
register(type: string, factory: () => IActivity, descriptor: ActivityDescriptor): void;
|
|
1244
|
-
/**
|
|
1245
|
-
* Create an activity instance.
|
|
1246
|
-
*/
|
|
1247
|
-
create(type: string): IActivity;
|
|
1248
|
-
/**
|
|
1249
|
-
* Get activity descriptor.
|
|
1250
|
-
*/
|
|
1251
|
-
getDescriptor(type: string): ActivityDescriptor | undefined;
|
|
1252
|
-
/**
|
|
1253
|
-
* Get all registered types.
|
|
1254
|
-
*/
|
|
1255
|
-
getTypes(): string[];
|
|
1256
|
-
/**
|
|
1257
|
-
* Get all descriptors.
|
|
1258
|
-
*/
|
|
1259
|
-
getAllDescriptors(): ActivityDescriptor[];
|
|
1260
|
-
/**
|
|
1261
|
-
* Get descriptors by category.
|
|
1262
|
-
*/
|
|
1263
|
-
getDescriptorsByCategory(category: string): ActivityDescriptor[];
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
interface ActivityCategoryDescriptor {
|
|
1267
|
-
name: string;
|
|
1268
|
-
displayName: string;
|
|
1269
|
-
description?: string;
|
|
1270
|
-
icon?: string;
|
|
1271
|
-
color?: string;
|
|
1272
|
-
order?: number;
|
|
1273
|
-
isVisible?: boolean;
|
|
1274
|
-
tags?: string[];
|
|
1275
|
-
}
|
|
1276
|
-
interface AXPActivityCategoryProviderContext {
|
|
1277
|
-
registerCategories(categories: ActivityCategoryDescriptor[]): void;
|
|
1278
|
-
}
|
|
1279
|
-
interface AXPActivityCategoryProvider {
|
|
1280
|
-
provide(context: AXPActivityCategoryProviderContext): Promise<void> | void;
|
|
1281
|
-
}
|
|
1282
|
-
/**
|
|
1283
|
-
* Injection token for activity category providers.
|
|
1284
|
-
*/
|
|
1285
|
-
declare const AXP_ACTIVITY_CATEGORY_PROVIDER: InjectionToken<AXPActivityCategoryProvider[]>;
|
|
1286
|
-
declare class AXPActivityCategoryProviderService {
|
|
1287
|
-
private parent?;
|
|
1288
|
-
private providers;
|
|
1289
|
-
private categories;
|
|
1290
|
-
private isInitialized;
|
|
1291
|
-
constructor(parent?: AXPActivityCategoryProviderService | undefined, providers?: AXPActivityCategoryProvider[]);
|
|
1292
|
-
private initialize;
|
|
1293
|
-
getAllCategories(): ActivityCategoryDescriptor[];
|
|
1294
|
-
getCategory(name: string): ActivityCategoryDescriptor | undefined;
|
|
1295
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPActivityCategoryProviderService, [{ optional: true; skipSelf: true; }, { optional: true; }]>;
|
|
1296
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPActivityCategoryProviderService>;
|
|
1297
|
-
}
|
|
1298
|
-
|
|
1299
|
-
/**
|
|
1300
|
-
* Context for registering activities in a provider.
|
|
1301
|
-
*/
|
|
1302
|
-
interface AXPActivityProviderContext {
|
|
1303
|
-
/**
|
|
1304
|
-
* Register an activity with its descriptor.
|
|
1305
|
-
*/
|
|
1306
|
-
registerActivity(config: {
|
|
1307
|
-
key: string;
|
|
1308
|
-
descriptor: ActivityDescriptor;
|
|
1309
|
-
}): void;
|
|
1310
|
-
}
|
|
1311
|
-
/**
|
|
1312
|
-
* Interface for activity providers.
|
|
1313
|
-
* Modules implement this to register their activities.
|
|
1314
|
-
*/
|
|
1315
|
-
interface AXPActivityProvider {
|
|
1316
|
-
/**
|
|
1317
|
-
* Provide activities to the system.
|
|
1318
|
-
*/
|
|
1319
|
-
provide(context: AXPActivityProviderContext): Promise<void> | void;
|
|
1320
|
-
}
|
|
1321
|
-
/**
|
|
1322
|
-
* Injection token for activity providers.
|
|
1323
|
-
*/
|
|
1324
|
-
declare const AXP_ACTIVITY_PROVIDER: InjectionToken<AXPActivityProvider[]>;
|
|
1325
|
-
/**
|
|
1326
|
-
* Category definition for activity categorization.
|
|
1327
|
-
*/
|
|
1328
|
-
interface ActivityCategory {
|
|
1329
|
-
name: string;
|
|
1330
|
-
displayName: string;
|
|
1331
|
-
description?: string;
|
|
1332
|
-
icon?: string;
|
|
1333
|
-
color?: string;
|
|
1334
|
-
order?: number;
|
|
1335
|
-
isVisible?: boolean;
|
|
1336
|
-
tags?: string[];
|
|
1337
|
-
}
|
|
1338
|
-
/**
|
|
1339
|
-
* Activity Provider Service.
|
|
1340
|
-
* Collects all activity providers and manages activity registration.
|
|
1341
|
-
*/
|
|
1342
|
-
declare class AXPActivityProviderService {
|
|
1343
|
-
private activityDescriptors;
|
|
1344
|
-
private categories;
|
|
1345
|
-
private providers;
|
|
1346
|
-
private categoryProviders;
|
|
1347
|
-
private initialized;
|
|
1348
|
-
private readonly commandService;
|
|
1349
|
-
private readonly commandRegistry;
|
|
1350
|
-
/**
|
|
1351
|
-
* Register an activity provider.
|
|
1352
|
-
*/
|
|
1353
|
-
registerProvider(provider: AXPActivityProvider): void;
|
|
1354
|
-
/**
|
|
1355
|
-
* Register a category provider.
|
|
1356
|
-
*/
|
|
1357
|
-
registerCategoryProvider(provider: AXPActivityCategoryProvider): void;
|
|
1358
|
-
/**
|
|
1359
|
-
* Initialize all providers.
|
|
1360
|
-
*/
|
|
1361
|
-
initialize(): Promise<void>;
|
|
1362
|
-
/**
|
|
1363
|
-
* Get activity descriptor by key.
|
|
1364
|
-
*/
|
|
1365
|
-
getDescriptor(key: string): ActivityDescriptor | undefined;
|
|
1366
|
-
/**
|
|
1367
|
-
* Get all activity descriptors.
|
|
1368
|
-
*/
|
|
1369
|
-
getAllDescriptors(): ActivityDescriptor[];
|
|
1370
|
-
/**
|
|
1371
|
-
* Get descriptors by category.
|
|
1372
|
-
*/
|
|
1373
|
-
getDescriptorsByCategory(category: string): ActivityDescriptor[];
|
|
1374
|
-
/**
|
|
1375
|
-
* Get all categories.
|
|
1376
|
-
*/
|
|
1377
|
-
getCategories(): ActivityCategory[];
|
|
1378
|
-
/**
|
|
1379
|
-
* Create an activity instance by key using AXPCommandService.
|
|
1380
|
-
*/
|
|
1381
|
-
createActivity(key: string): Promise<IActivity | null>;
|
|
1382
|
-
private initializeProvider;
|
|
1383
|
-
private initializeCategoryProvider;
|
|
1384
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPActivityProviderService, never>;
|
|
1385
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPActivityProviderService>;
|
|
1386
|
-
}
|
|
1387
|
-
|
|
1388
|
-
/**
|
|
1389
|
-
* Types and interfaces for Workflow Execution Service.
|
|
1390
|
-
*/
|
|
1391
|
-
|
|
1392
|
-
/**
|
|
1393
|
-
* Represents a workflow task that needs to be executed.
|
|
1394
|
-
* Inspired by Temporal's Activity Tasks and Camunda's External Tasks.
|
|
1395
|
-
*/
|
|
1396
|
-
interface AXPWorkflowTask {
|
|
1397
|
-
/**
|
|
1398
|
-
* Unique token for this task (used for completion/security).
|
|
1399
|
-
*/
|
|
1400
|
-
taskToken: string;
|
|
1401
|
-
/**
|
|
1402
|
-
* Activity ID from workflow definition.
|
|
1403
|
-
*/
|
|
1404
|
-
activityId: string;
|
|
1405
|
-
/**
|
|
1406
|
-
* Activity type (e.g., 'workflow-activity:show-toast').
|
|
1407
|
-
*/
|
|
1408
|
-
activityType: string;
|
|
1409
|
-
/**
|
|
1410
|
-
* Human-readable activity name.
|
|
1411
|
-
*/
|
|
1412
|
-
activityName?: string;
|
|
1413
|
-
/**
|
|
1414
|
-
* Where this task should be executed.
|
|
1415
|
-
* - 'frontend': Execute in browser (UI activities, console, events)
|
|
1416
|
-
* - 'backend': Execute in backend (business logic, API calls)
|
|
1417
|
-
* - 'both': Execute in both frontend and backend (hybrid activities)
|
|
1418
|
-
*/
|
|
1419
|
-
executionMode: 'frontend' | 'backend' | 'both';
|
|
1420
|
-
/**
|
|
1421
|
-
* Input data for the activity (for frontend activities).
|
|
1422
|
-
*/
|
|
1423
|
-
input?: Record<string, any>;
|
|
1424
|
-
/**
|
|
1425
|
-
* Configuration for the activity (for frontend activities).
|
|
1426
|
-
*/
|
|
1427
|
-
config?: Record<string, any>;
|
|
1428
|
-
}
|
|
1429
|
-
/**
|
|
1430
|
-
* Request to start a workflow execution.
|
|
1431
|
-
*/
|
|
1432
|
-
interface AXPStartWorkflowExecutionRequest {
|
|
1433
|
-
/**
|
|
1434
|
-
* Workflow ID to execute.
|
|
1435
|
-
*/
|
|
1436
|
-
workflowId: string;
|
|
1437
|
-
/**
|
|
1438
|
-
* Initial input data for workflow.
|
|
1439
|
-
*/
|
|
1440
|
-
input: Record<string, any>;
|
|
1441
|
-
}
|
|
1442
|
-
/**
|
|
1443
|
-
* Response after starting workflow execution.
|
|
1444
|
-
*/
|
|
1445
|
-
interface AXPStartWorkflowExecutionResponse {
|
|
1446
|
-
/**
|
|
1447
|
-
* Unique execution ID for this workflow run.
|
|
1448
|
-
*/
|
|
1449
|
-
executionId: string;
|
|
1450
|
-
/**
|
|
1451
|
-
* Current workflow state.
|
|
1452
|
-
*/
|
|
1453
|
-
state: AXPWorkflowExecutionState;
|
|
1454
|
-
/**
|
|
1455
|
-
* First task to execute (determined by backend).
|
|
1456
|
-
* Client should execute this task based on executionMode.
|
|
1457
|
-
*/
|
|
1458
|
-
pendingTask?: AXPWorkflowTask | null;
|
|
1459
|
-
}
|
|
1460
|
-
/**
|
|
1461
|
-
* Request to resume a suspended workflow.
|
|
1462
|
-
*/
|
|
1463
|
-
interface AXPResumeWorkflowExecutionRequest {
|
|
1464
|
-
/**
|
|
1465
|
-
* Execution ID.
|
|
1466
|
-
*/
|
|
1467
|
-
executionId: string;
|
|
1468
|
-
/**
|
|
1469
|
-
* Step ID that was waiting for user input.
|
|
1470
|
-
*/
|
|
1471
|
-
stepId: string;
|
|
1472
|
-
/**
|
|
1473
|
-
* Secure task token issued with the pending task.
|
|
1474
|
-
* Backend validates and resolves the step using this token.
|
|
1475
|
-
*/
|
|
1476
|
-
taskToken: string;
|
|
1477
|
-
/**
|
|
1478
|
-
* User action outcome (e.g., 'Confirmed', 'Cancelled').
|
|
1479
|
-
*/
|
|
1480
|
-
outcome: string;
|
|
1481
|
-
/**
|
|
1482
|
-
* Optional user input data.
|
|
1483
|
-
*/
|
|
1484
|
-
userInput?: any;
|
|
1485
|
-
}
|
|
1486
|
-
/**
|
|
1487
|
-
* Response after resuming workflow.
|
|
1488
|
-
*/
|
|
1489
|
-
interface AXPResumeWorkflowExecutionResponse {
|
|
1490
|
-
/**
|
|
1491
|
-
* Activity execution output.
|
|
1492
|
-
*/
|
|
1493
|
-
output: any;
|
|
1494
|
-
/**
|
|
1495
|
-
* Activity execution outcomes.
|
|
1496
|
-
*/
|
|
1497
|
-
outcomes: Record<string, any>;
|
|
1498
|
-
/**
|
|
1499
|
-
* Next task to execute (if any).
|
|
1500
|
-
*/
|
|
1501
|
-
nextTask?: AXPWorkflowTask | null;
|
|
1502
|
-
/**
|
|
1503
|
-
* Updated workflow state.
|
|
1504
|
-
*/
|
|
1505
|
-
state: AXPWorkflowExecutionState;
|
|
1506
|
-
}
|
|
1507
|
-
/**
|
|
1508
|
-
* Request to get workflow execution state.
|
|
1509
|
-
*/
|
|
1510
|
-
interface AXPGetWorkflowExecutionStateRequest {
|
|
1511
|
-
/**
|
|
1512
|
-
* Execution ID.
|
|
1513
|
-
*/
|
|
1514
|
-
executionId: string;
|
|
1515
|
-
}
|
|
1516
|
-
/**
|
|
1517
|
-
* Request to get workflow definition.
|
|
1518
|
-
*/
|
|
1519
|
-
interface AXPGetWorkflowDefinitionRequest {
|
|
1520
|
-
/**
|
|
1521
|
-
* Workflow ID or definition ID.
|
|
1522
|
-
*/
|
|
1523
|
-
workflowId: string;
|
|
1524
|
-
}
|
|
1525
|
-
/**
|
|
1526
|
-
* Response with workflow definition.
|
|
1527
|
-
*/
|
|
1528
|
-
interface AXPGetWorkflowDefinitionResponse {
|
|
1529
|
-
/**
|
|
1530
|
-
* Workflow definition.
|
|
1531
|
-
*/
|
|
1532
|
-
workflow: AXPWorkflowDefinition;
|
|
1533
|
-
}
|
|
1534
|
-
/**
|
|
1535
|
-
* Workflow execution state (managed by backend, cached in client).
|
|
1536
|
-
*/
|
|
1537
|
-
interface AXPWorkflowExecutionState {
|
|
1538
|
-
/**
|
|
1539
|
-
* Unique execution ID.
|
|
1540
|
-
*/
|
|
1541
|
-
executionId: string;
|
|
1542
|
-
/**
|
|
1543
|
-
* Workflow ID.
|
|
1544
|
-
*/
|
|
1545
|
-
workflowId: string;
|
|
1546
|
-
/**
|
|
1547
|
-
* Current execution status.
|
|
1548
|
-
*/
|
|
1549
|
-
status: 'running' | 'completed' | 'suspended' | 'error';
|
|
1550
|
-
/**
|
|
1551
|
-
* Current step ID (if suspended or running).
|
|
1552
|
-
*/
|
|
1553
|
-
currentStepId?: string;
|
|
1554
|
-
/**
|
|
1555
|
-
* Workflow variables (state).
|
|
1556
|
-
*/
|
|
1557
|
-
variables: Record<string, any>;
|
|
1558
|
-
/**
|
|
1559
|
-
* Initial input data.
|
|
1560
|
-
*/
|
|
1561
|
-
input: Record<string, any>;
|
|
1562
|
-
/**
|
|
1563
|
-
* Final output data (if completed).
|
|
1564
|
-
*/
|
|
1565
|
-
output?: Record<string, any>;
|
|
1566
|
-
/**
|
|
1567
|
-
* Last update timestamp.
|
|
1568
|
-
*/
|
|
1569
|
-
lastUpdated: Date;
|
|
1570
|
-
}
|
|
1571
|
-
|
|
1572
|
-
/**
|
|
1573
|
-
* Workflow execution result.
|
|
1574
|
-
*/
|
|
1575
|
-
interface WorkflowExecutionResult {
|
|
1576
|
-
success: boolean;
|
|
1577
|
-
output?: any;
|
|
1578
|
-
error?: string;
|
|
1579
|
-
nextTask?: AXPWorkflowTask | null;
|
|
1580
|
-
executionId?: string;
|
|
1581
|
-
state?: AXPWorkflowExecutionState;
|
|
1582
|
-
}
|
|
1583
|
-
/**
|
|
1584
|
-
* Production Workflow Coordinator.
|
|
1585
|
-
*
|
|
1586
|
-
* Separates frontend/backend execution:
|
|
1587
|
-
* - Frontend activities: Execute with AXPCommand in browser
|
|
1588
|
-
* - Backend activities: Execute via API calls to backend
|
|
1589
|
-
* - State caching: Caches workflow state in client for performance
|
|
1590
|
-
*
|
|
1591
|
-
*/
|
|
1592
|
-
declare class WorkflowCoordinator {
|
|
1593
|
-
private readonly workflowExecutionService;
|
|
1594
|
-
private readonly commandService;
|
|
1595
|
-
/**
|
|
1596
|
-
* Cache workflow states in memory for quick access.
|
|
1597
|
-
* Key: executionId
|
|
1598
|
-
* Value: AXPWorkflowExecutionState
|
|
1599
|
-
*/
|
|
1600
|
-
private stateCache;
|
|
1601
|
-
/**
|
|
1602
|
-
* Start workflow execution in backend.
|
|
1603
|
-
*
|
|
1604
|
-
* Backend decides what to do: returns pendingTask or indicates completion.
|
|
1605
|
-
* Frontend only calls API - no business logic here.
|
|
1606
|
-
*
|
|
1607
|
-
* @param workflowId - Workflow ID
|
|
1608
|
-
* @param input - Initial input data
|
|
1609
|
-
* @returns Execution result with pendingTask (if any)
|
|
1610
|
-
*
|
|
1611
|
-
* @example
|
|
1612
|
-
* ```typescript
|
|
1613
|
-
* const result = await coordinator.startWorkflow('my-workflow', { userId: '123' });
|
|
1614
|
-
*
|
|
1615
|
-
* if (result.pendingTask) {
|
|
1616
|
-
* // Execute task if frontend, or wait for backend to complete
|
|
1617
|
-
* if (result.pendingTask.executionMode === 'frontend') {
|
|
1618
|
-
* await coordinator.executeTask(result.pendingTask);
|
|
1619
|
-
* await coordinator.completeTask(result.executionId, result.pendingTask, outcome, output);
|
|
1620
|
-
* }
|
|
1621
|
-
* }
|
|
1622
|
-
* ```
|
|
1623
|
-
*/
|
|
1624
|
-
startWorkflow(workflowId: string, input?: Record<string, any>): Promise<WorkflowExecutionResult>;
|
|
1625
|
-
/**
|
|
1626
|
-
* Execute a frontend task using AXPCommand.
|
|
1627
|
-
*
|
|
1628
|
-
* Only executes if task.executionMode is 'frontend' or 'both'.
|
|
1629
|
-
* Backend tasks are handled automatically by backend.
|
|
1630
|
-
*
|
|
1631
|
-
* @param task - Task to execute
|
|
1632
|
-
* @returns Execution result with output and outcome
|
|
1633
|
-
*/
|
|
1634
|
-
executeTask(task: AXPWorkflowTask): Promise<{
|
|
1635
|
-
output: any;
|
|
1636
|
-
outcome: string;
|
|
1637
|
-
}>;
|
|
1638
|
-
/**
|
|
1639
|
-
* Complete a task and get next task from backend.
|
|
1640
|
-
*
|
|
1641
|
-
* Sends task result to backend API.
|
|
1642
|
-
* Backend decides: next task, fail, or complete workflow.
|
|
1643
|
-
*
|
|
1644
|
-
* @param executionId - Execution ID
|
|
1645
|
-
* @param task - Completed task
|
|
1646
|
-
* @param outcome - Task outcome (e.g., 'Done', 'Confirmed', 'Cancelled')
|
|
1647
|
-
* @param output - Task output/result
|
|
1648
|
-
* @returns Next task from backend (if any)
|
|
1649
|
-
*/
|
|
1650
|
-
completeTask(executionId: string, task: AXPWorkflowTask, outcome: string, output?: any): Promise<WorkflowExecutionResult>;
|
|
1651
|
-
/**
|
|
1652
|
-
* Execute workflow by ID (backward compatibility).
|
|
1653
|
-
*
|
|
1654
|
-
* @deprecated Use startWorkflow + executeTask + completeTask pattern instead.
|
|
1655
|
-
* This method is kept for backward compatibility but will be removed.
|
|
1656
|
-
*/
|
|
1657
|
-
executeWorkflowById(workflowId: string, input?: Record<string, any>): Promise<WorkflowExecutionResult>;
|
|
1658
|
-
/**
|
|
1659
|
-
* Resume a suspended workflow (e.g., after user interaction).
|
|
1660
|
-
*
|
|
1661
|
-
* Backend determines nextStep based on outcome and outcomeConnections.
|
|
1662
|
-
* Client only provides executionId, stepId, outcome, and optional userInput.
|
|
1663
|
-
*
|
|
1664
|
-
* @param executionId - Workflow execution ID
|
|
1665
|
-
* @param stepId - Step ID that was waiting for user input
|
|
1666
|
-
* @param outcome - User action outcome (e.g., 'Confirmed', 'Cancelled', 'Submitted')
|
|
1667
|
-
* @param userInput - Optional user input data
|
|
1668
|
-
*/
|
|
1669
|
-
resumeWorkflow(executionId: string, stepId: string, outcome: string, userInput?: any, taskToken?: string): Promise<WorkflowExecutionResult>;
|
|
1670
|
-
/**
|
|
1671
|
-
* Get workflow execution state (from cache or backend).
|
|
1672
|
-
*/
|
|
1673
|
-
getWorkflowState(executionId: string): Promise<AXPWorkflowExecutionState | null>;
|
|
1674
|
-
/**
|
|
1675
|
-
* Execute a frontend activity using CommandBus.
|
|
1676
|
-
*
|
|
1677
|
-
* Frontend activities are executed in the browser using AXPCommandService.
|
|
1678
|
-
* Activities can also be executed in both frontend and backend (hybrid mode).
|
|
1679
|
-
*
|
|
1680
|
-
* @param task - Frontend task to execute
|
|
1681
|
-
* @returns Execution result with output and outcome
|
|
1682
|
-
*/
|
|
1683
|
-
private executeFrontendActivity;
|
|
1684
|
-
/**
|
|
1685
|
-
* Start workflow execution in backend.
|
|
1686
|
-
* Backend returns executionId, initial state, and first task to execute.
|
|
1687
|
-
*/
|
|
1688
|
-
private startWorkflowExecution;
|
|
1689
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<WorkflowCoordinator, never>;
|
|
1690
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<WorkflowCoordinator>;
|
|
1691
|
-
}
|
|
1692
|
-
|
|
1693
|
-
/**
|
|
1694
|
-
* Abstract service for workflow execution operations.
|
|
1695
|
-
*
|
|
1696
|
-
* This service handles communication with backend for workflow execution.
|
|
1697
|
-
*
|
|
1698
|
-
* Implementation should be provided in connectivity layer:
|
|
1699
|
-
* - Mock implementation: @acorex/connectivity/mock
|
|
1700
|
-
* - API implementation: @acorex/connectivity/api
|
|
1701
|
-
*
|
|
1702
|
-
* @example
|
|
1703
|
-
* ```typescript
|
|
1704
|
-
* // In connectivity/mock
|
|
1705
|
-
* @Injectable()
|
|
1706
|
-
* export class AXCWorkflowExecutionService implements AXPWorkflowExecutionService {
|
|
1707
|
-
* async startExecution(request: AXPStartWorkflowExecutionRequest): Promise<AXPStartWorkflowExecutionResponse> {
|
|
1708
|
-
* // Mock implementation
|
|
1709
|
-
* }
|
|
1710
|
-
* }
|
|
1711
|
-
*
|
|
1712
|
-
* // In connectivity/api
|
|
1713
|
-
* @Injectable()
|
|
1714
|
-
* export class AXCWorkflowExecutionService implements AXPWorkflowExecutionService {
|
|
1715
|
-
* constructor(private http: HttpClient) {}
|
|
1716
|
-
*
|
|
1717
|
-
* async startExecution(request: AXPStartWorkflowExecutionRequest): Promise<AXPStartWorkflowExecutionResponse> {
|
|
1718
|
-
* return firstValueFrom(
|
|
1719
|
-
* this.http.post<AXPStartWorkflowExecutionResponse>(
|
|
1720
|
-
* `${this.config.baseUrl}/api/workflows/${request.workflowId}/start`,
|
|
1721
|
-
* { input: request.input }
|
|
1722
|
-
* )
|
|
1723
|
-
* );
|
|
1724
|
-
* }
|
|
1725
|
-
* }
|
|
1726
|
-
* ```
|
|
1727
|
-
*/
|
|
1728
|
-
declare abstract class AXPWorkflowExecutionService {
|
|
1729
|
-
/**
|
|
1730
|
-
* Start a new workflow execution.
|
|
1731
|
-
*
|
|
1732
|
-
* Creates a new workflow execution instance in backend and returns execution ID.
|
|
1733
|
-
*
|
|
1734
|
-
* @param request - Start execution request
|
|
1735
|
-
* @returns Execution response with executionId and initial state
|
|
1736
|
-
*
|
|
1737
|
-
* @example
|
|
1738
|
-
* ```typescript
|
|
1739
|
-
* const response = await workflowExecutionService.startExecution({
|
|
1740
|
-
* workflowId: 'my-workflow',
|
|
1741
|
-
* input: { userId: '123', action: 'create' }
|
|
1742
|
-
* });
|
|
1743
|
-
*
|
|
1744
|
-
* console.log('Execution ID:', response.executionId);
|
|
1745
|
-
* console.log('Initial State:', response.state);
|
|
1746
|
-
* ```
|
|
1747
|
-
*/
|
|
1748
|
-
abstract startExecution(request: AXPStartWorkflowExecutionRequest): Promise<AXPStartWorkflowExecutionResponse>;
|
|
1749
|
-
/**
|
|
1750
|
-
* Resume a suspended workflow execution.
|
|
1751
|
-
*
|
|
1752
|
-
* Resumes workflow execution after user interaction (e.g., after show-dialog).
|
|
1753
|
-
*
|
|
1754
|
-
* @param request - Resume execution request
|
|
1755
|
-
* @returns Resume response with next step and updated state
|
|
1756
|
-
*
|
|
1757
|
-
* @example
|
|
1758
|
-
* ```typescript
|
|
1759
|
-
* const response = await workflowExecutionService.resumeExecution({
|
|
1760
|
-
* executionId: 'exec-123',
|
|
1761
|
-
* stepId: 'step-dialog-1',
|
|
1762
|
-
* taskToken: 'sec-task-token',
|
|
1763
|
-
* outcome: 'Confirmed',
|
|
1764
|
-
* userInput: { confirmed: true }
|
|
1765
|
-
* });
|
|
1766
|
-
*
|
|
1767
|
-
* console.log('Next Step:', response.nextStep);
|
|
1768
|
-
* console.log('Updated State:', response.state);
|
|
1769
|
-
* ```
|
|
1770
|
-
*/
|
|
1771
|
-
abstract resumeExecution(request: AXPResumeWorkflowExecutionRequest): Promise<AXPResumeWorkflowExecutionResponse>;
|
|
1772
|
-
/**
|
|
1773
|
-
* Get current workflow execution state.
|
|
1774
|
-
*
|
|
1775
|
-
* Retrieves current state of a workflow execution from backend.
|
|
1776
|
-
*
|
|
1777
|
-
* @param request - Get state request
|
|
1778
|
-
* @returns Current workflow execution state
|
|
1779
|
-
*
|
|
1780
|
-
* @example
|
|
1781
|
-
* ```typescript
|
|
1782
|
-
* const state = await workflowExecutionService.getExecutionState({
|
|
1783
|
-
* executionId: 'exec-123'
|
|
1784
|
-
* });
|
|
1785
|
-
*
|
|
1786
|
-
* console.log('Status:', state.status);
|
|
1787
|
-
* console.log('Variables:', state.variables);
|
|
1788
|
-
* ```
|
|
1789
|
-
*/
|
|
1790
|
-
abstract getExecutionState(request: AXPGetWorkflowExecutionStateRequest): Promise<AXPWorkflowExecutionState>;
|
|
1791
|
-
/**
|
|
1792
|
-
* Get workflow definition by ID.
|
|
1793
|
-
*
|
|
1794
|
-
* Retrieves workflow definition from backend.
|
|
1795
|
-
*
|
|
1796
|
-
* @param request - Get workflow definition request
|
|
1797
|
-
* @returns Workflow definition in executable format
|
|
1798
|
-
*
|
|
1799
|
-
* @example
|
|
1800
|
-
* ```typescript
|
|
1801
|
-
* const response = await workflowExecutionService.getWorkflowDefinition({
|
|
1802
|
-
* workflowId: 'my-workflow'
|
|
1803
|
-
* });
|
|
1804
|
-
*
|
|
1805
|
-
* console.log('Workflow:', response.workflow);
|
|
1806
|
-
* ```
|
|
1807
|
-
*/
|
|
1808
|
-
abstract getWorkflowDefinition(request: AXPGetWorkflowDefinitionRequest): Promise<AXPGetWorkflowDefinitionResponse>;
|
|
1809
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowExecutionService, never>;
|
|
1810
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowExecutionService>;
|
|
1811
|
-
}
|
|
1812
|
-
|
|
1813
|
-
/**
|
|
1814
|
-
* WriteLine Activity - Simple console logging activity.
|
|
1815
|
-
*
|
|
1816
|
-
* Usage:
|
|
1817
|
-
* ```typescript
|
|
1818
|
-
* const activity = new WriteLine();
|
|
1819
|
-
* await activity.execute({ text: 'Hello World' });
|
|
1820
|
-
* ```
|
|
1821
|
-
*/
|
|
1822
|
-
declare class WriteLine extends Activity<{
|
|
1823
|
-
text?: string;
|
|
1824
|
-
}, void> {
|
|
1825
|
-
constructor();
|
|
1826
|
-
execute(input: {
|
|
1827
|
-
text?: string;
|
|
1828
|
-
}): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
|
|
1829
|
-
output: void;
|
|
1830
|
-
outcomes: Record<string, any>;
|
|
1831
|
-
}>>;
|
|
1832
|
-
}
|
|
1833
|
-
|
|
1834
|
-
/**
|
|
1835
|
-
* Sequence Activity - Executes activities in sequential order.
|
|
1836
|
-
*
|
|
1837
|
-
* Usage:
|
|
1838
|
-
* ```typescript
|
|
1839
|
-
* const sequence = new Sequence();
|
|
1840
|
-
* sequence.activities = [activity1, activity2, activity3];
|
|
1841
|
-
* await sequence.execute({});
|
|
1842
|
-
* ```
|
|
1843
|
-
*/
|
|
1844
|
-
declare class Sequence extends Activity<{}, void> {
|
|
1845
|
-
/**
|
|
1846
|
-
* Activities to execute in sequence.
|
|
1847
|
-
*/
|
|
1848
|
-
activities: IActivity[];
|
|
1849
|
-
constructor();
|
|
1850
|
-
execute(input: {}): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
|
|
1851
|
-
output: void;
|
|
1852
|
-
outcomes: Record<string, any>;
|
|
1853
|
-
}>>;
|
|
1854
|
-
}
|
|
1855
|
-
|
|
1856
|
-
/**
|
|
1857
|
-
* Show Confirm Dialog Activity - Displays confirmation dialog to user.
|
|
1858
|
-
*
|
|
1859
|
-
* Has two outcomes:
|
|
1860
|
-
* - 'Confirmed': User clicked confirm/yes
|
|
1861
|
-
* - 'Cancelled': User clicked cancel/no
|
|
1862
|
-
*
|
|
1863
|
-
* Usage:
|
|
1864
|
-
* ```typescript
|
|
1865
|
-
* const dialog = new ShowConfirmDialog();
|
|
1866
|
-
* await dialog.execute({
|
|
1867
|
-
* title: 'Confirm Delete',
|
|
1868
|
-
* message: 'Are you sure?',
|
|
1869
|
-
* color: 'danger'
|
|
1870
|
-
* });
|
|
1871
|
-
* ```
|
|
1872
|
-
*/
|
|
1873
|
-
declare class ShowConfirmDialog extends Activity<{
|
|
1874
|
-
title?: string;
|
|
1875
|
-
message?: string;
|
|
1876
|
-
color?: AXStyleColorType;
|
|
1877
|
-
defaultAction?: 'confirm' | 'cancel';
|
|
1878
|
-
align?: 'horizontal' | 'vertical';
|
|
1879
|
-
backdrop?: boolean;
|
|
1880
|
-
}, {
|
|
1881
|
-
result: boolean;
|
|
1882
|
-
action: string;
|
|
1883
|
-
}> {
|
|
1884
|
-
private readonly dialogService;
|
|
1885
|
-
private readonly translationService;
|
|
1886
|
-
constructor();
|
|
1887
|
-
execute(input: {
|
|
1888
|
-
title?: string;
|
|
1889
|
-
message?: string;
|
|
1890
|
-
color?: AXStyleColorType;
|
|
1891
|
-
defaultAction?: 'confirm' | 'cancel';
|
|
1892
|
-
align?: 'horizontal' | 'vertical';
|
|
1893
|
-
backdrop?: boolean;
|
|
1894
|
-
}): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
|
|
1895
|
-
output: {
|
|
1896
|
-
result: boolean;
|
|
1897
|
-
action: string;
|
|
1898
|
-
};
|
|
1899
|
-
outcomes: Record<string, any>;
|
|
1900
|
-
}>>;
|
|
1901
|
-
}
|
|
1902
|
-
|
|
1903
|
-
/**
|
|
1904
|
-
* Show Alert Dialog Activity - Displays alert dialog to user.
|
|
1905
|
-
*
|
|
1906
|
-
* Has one outcome:
|
|
1907
|
-
* - 'Done': User clicked OK
|
|
1908
|
-
*
|
|
1909
|
-
* Usage:
|
|
1910
|
-
* ```typescript
|
|
1911
|
-
* const dialog = new ShowAlertDialog();
|
|
1912
|
-
* await dialog.execute({
|
|
1913
|
-
* title: 'Alert',
|
|
1914
|
-
* message: 'This is an alert',
|
|
1915
|
-
* color: 'info'
|
|
1916
|
-
* });
|
|
1917
|
-
* ```
|
|
1918
|
-
*/
|
|
1919
|
-
declare class ShowAlertDialog extends Activity<{
|
|
1920
|
-
title?: string;
|
|
1921
|
-
message?: string;
|
|
1922
|
-
color?: AXStyleColorType;
|
|
1923
|
-
}, {
|
|
1924
|
-
result: boolean;
|
|
1925
|
-
action: string;
|
|
1926
|
-
}> {
|
|
1927
|
-
private readonly dialogService;
|
|
1928
|
-
private readonly translationService;
|
|
1929
|
-
constructor();
|
|
1930
|
-
execute(input: {
|
|
1931
|
-
title?: string;
|
|
1932
|
-
message?: string;
|
|
1933
|
-
color?: AXStyleColorType;
|
|
1934
|
-
}): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
|
|
1935
|
-
output: {
|
|
1936
|
-
result: boolean;
|
|
1937
|
-
action: string;
|
|
1938
|
-
};
|
|
1939
|
-
outcomes: Record<string, any>;
|
|
1940
|
-
}>>;
|
|
1941
|
-
}
|
|
1942
|
-
|
|
1943
|
-
/**
|
|
1944
|
-
* Show Dialog Layout Builder Activity - Displays dialog using Layout Builder.
|
|
1945
|
-
*
|
|
1946
|
-
* This activity allows you to create custom dialogs using the Layout Builder API.
|
|
1947
|
-
* It accepts JSON-serializable content (AXPWidgetNode) and actions configuration.
|
|
1948
|
-
*
|
|
1949
|
-
* The content can be created using Layout Builder and then converted to JSON:
|
|
1950
|
-
* ```typescript
|
|
1951
|
-
* const builder = layoutBuilderService.create();
|
|
1952
|
-
* builder.flex(flex => {
|
|
1953
|
-
* flex.setDirection('column')
|
|
1954
|
-
* .formField('First Name', field => {
|
|
1955
|
-
* field.path('firstName');
|
|
1956
|
-
* field.textBox({ placeholder: 'Enter first name' });
|
|
1957
|
-
* });
|
|
1958
|
-
* });
|
|
1959
|
-
* const contentNode = builder.build();
|
|
1960
|
-
* ```
|
|
1961
|
-
*
|
|
1962
|
-
* Usage in Workflow:
|
|
1963
|
-
* ```typescript
|
|
1964
|
-
* const dialog = new ShowDialogLayoutBuilder();
|
|
1965
|
-
* await dialog.execute({
|
|
1966
|
-
* title: 'User Information',
|
|
1967
|
-
* size: 'md',
|
|
1968
|
-
* context: { firstName: '', lastName: '' },
|
|
1969
|
-
* content: {
|
|
1970
|
-
* type: 'flex-layout',
|
|
1971
|
-
* mode: 'edit',
|
|
1972
|
-
* options: {
|
|
1973
|
-
* flexDirection: 'column',
|
|
1974
|
-
* gap: '16px'
|
|
1975
|
-
* },
|
|
1976
|
-
* children: [
|
|
1977
|
-
* {
|
|
1978
|
-
* type: 'form-field',
|
|
1979
|
-
* mode: 'edit',
|
|
1980
|
-
* options: {
|
|
1981
|
-
* label: 'First Name',
|
|
1982
|
-
* showLabel: true
|
|
1983
|
-
* },
|
|
1984
|
-
* children: [{
|
|
1985
|
-
* type: 'text-editor',
|
|
1986
|
-
* path: 'firstName',
|
|
1987
|
-
* options: {
|
|
1988
|
-
* placeholder: 'Enter first name'
|
|
1989
|
-
* }
|
|
1990
|
-
* }]
|
|
1991
|
-
* }
|
|
1992
|
-
* ]
|
|
1993
|
-
* },
|
|
1994
|
-
* actions: {
|
|
1995
|
-
* cancel: '@general:actions.cancel.title',
|
|
1996
|
-
* submit: '@general:actions.submit.title',
|
|
1997
|
-
* custom: [{
|
|
1998
|
-
* title: 'Save Draft',
|
|
1999
|
-
* icon: 'fa-save',
|
|
2000
|
-
* color: 'secondary',
|
|
2001
|
-
* command: { name: 'save-draft' }
|
|
2002
|
-
* }]
|
|
2003
|
-
* }
|
|
2004
|
-
* });
|
|
2005
|
-
* ```
|
|
2006
|
-
*
|
|
2007
|
-
* Usage in JSON Workflow Definition:
|
|
2008
|
-
* ```json
|
|
2009
|
-
* {
|
|
2010
|
-
* "type": "ShowDialogLayoutBuilder",
|
|
2011
|
-
* "properties": {
|
|
2012
|
-
* "title": "User Information",
|
|
2013
|
-
* "size": "md",
|
|
2014
|
-
* "context": { "firstName": "", "lastName": "" },
|
|
2015
|
-
* "content": {
|
|
2016
|
-
* "type": "flex-layout",
|
|
2017
|
-
* "mode": "edit",
|
|
2018
|
-
* "options": {
|
|
2019
|
-
* "flexDirection": "column",
|
|
2020
|
-
* "gap": "16px"
|
|
2021
|
-
* },
|
|
2022
|
-
* "children": [
|
|
2023
|
-
* {
|
|
2024
|
-
* "type": "form-field",
|
|
2025
|
-
* "mode": "edit",
|
|
2026
|
-
* "options": {
|
|
2027
|
-
* "label": "First Name",
|
|
2028
|
-
* "showLabel": true
|
|
2029
|
-
* },
|
|
2030
|
-
* "children": [{
|
|
2031
|
-
* "type": "text-editor",
|
|
2032
|
-
* "path": "firstName",
|
|
2033
|
-
* "options": {
|
|
2034
|
-
* "placeholder": "Enter first name"
|
|
2035
|
-
* }
|
|
2036
|
-
* }]
|
|
2037
|
-
* }
|
|
2038
|
-
* ]
|
|
2039
|
-
* },
|
|
2040
|
-
* "actions": {
|
|
2041
|
-
* "cancel": "@general:actions.cancel.title",
|
|
2042
|
-
* "submit": "@general:actions.submit.title"
|
|
2043
|
-
* }
|
|
2044
|
-
* }
|
|
2045
|
-
* }
|
|
2046
|
-
* ```
|
|
2047
|
-
*/
|
|
2048
|
-
declare class ShowDialogLayoutBuilder extends Activity<{
|
|
2049
|
-
/**
|
|
2050
|
-
* Dialog title
|
|
2051
|
-
*/
|
|
2052
|
-
title?: string;
|
|
2053
|
-
/**
|
|
2054
|
-
* Dialog size
|
|
2055
|
-
*/
|
|
2056
|
-
size?: AXPopupSizeType;
|
|
2057
|
-
/**
|
|
2058
|
-
* Initial dialog context/data
|
|
2059
|
-
*/
|
|
2060
|
-
context?: Record<string, any>;
|
|
2061
|
-
/**
|
|
2062
|
-
* Show close button
|
|
2063
|
-
*/
|
|
2064
|
-
closeButton?: boolean;
|
|
2065
|
-
/**
|
|
2066
|
-
* Dialog message (optional, shown above content)
|
|
2067
|
-
*/
|
|
2068
|
-
message?: string;
|
|
2069
|
-
/**
|
|
2070
|
-
* Dialog content as AXPWidgetNode (JSON-serializable)
|
|
2071
|
-
* This can be created using Layout Builder and then converted to JSON.
|
|
2072
|
-
*/
|
|
2073
|
-
content?: AXPWidgetNode;
|
|
2074
|
-
/**
|
|
2075
|
-
* Dialog actions configuration (JSON-serializable)
|
|
2076
|
-
*/
|
|
2077
|
-
actions?: {
|
|
2078
|
-
/**
|
|
2079
|
-
* Cancel button text (optional)
|
|
2080
|
-
*/
|
|
2081
|
-
cancel?: string;
|
|
2082
|
-
/**
|
|
2083
|
-
* Submit button text (optional)
|
|
2084
|
-
*/
|
|
2085
|
-
submit?: string;
|
|
2086
|
-
/**
|
|
2087
|
-
* Custom actions array (optional)
|
|
2088
|
-
*/
|
|
2089
|
-
custom?: AXPActionMenuItem[];
|
|
2090
|
-
};
|
|
2091
|
-
}, {
|
|
2092
|
-
/**
|
|
2093
|
-
* Dialog context/data after user interaction
|
|
2094
|
-
*/
|
|
2095
|
-
context: Record<string, any>;
|
|
2096
|
-
/**
|
|
2097
|
-
* Action that user clicked (e.g., 'submit', 'cancel', or custom action name)
|
|
2098
|
-
*/
|
|
2099
|
-
action: string;
|
|
2100
|
-
/**
|
|
2101
|
-
* Whether user cancelled the dialog
|
|
2102
|
-
*/
|
|
2103
|
-
cancelled: boolean;
|
|
2104
|
-
/**
|
|
2105
|
-
* Whether user confirmed/submitted the dialog
|
|
2106
|
-
*/
|
|
2107
|
-
confirmed: boolean;
|
|
2108
|
-
}> {
|
|
2109
|
-
private readonly layoutBuilder;
|
|
2110
|
-
constructor();
|
|
2111
|
-
execute(input: {
|
|
2112
|
-
title?: string;
|
|
2113
|
-
size?: AXPopupSizeType;
|
|
2114
|
-
context?: Record<string, any>;
|
|
2115
|
-
closeButton?: boolean;
|
|
2116
|
-
message?: string;
|
|
2117
|
-
content?: AXPWidgetNode;
|
|
2118
|
-
actions?: {
|
|
2119
|
-
cancel?: string;
|
|
2120
|
-
submit?: string;
|
|
2121
|
-
custom?: AXPActionMenuItem[];
|
|
2122
|
-
};
|
|
2123
|
-
}): Promise<AXPExecuteCommandResult<{
|
|
2124
|
-
output: {
|
|
2125
|
-
context: Record<string, any>;
|
|
2126
|
-
action: string;
|
|
2127
|
-
cancelled: boolean;
|
|
2128
|
-
confirmed: boolean;
|
|
2129
|
-
};
|
|
2130
|
-
outcomes: Record<string, any>;
|
|
2131
|
-
}>>;
|
|
2132
|
-
}
|
|
2133
|
-
|
|
2134
|
-
/**
|
|
2135
|
-
* Show Toast Activity - Displays toast notification to user.
|
|
2136
|
-
*
|
|
2137
|
-
* Usage:
|
|
2138
|
-
* ```typescript
|
|
2139
|
-
* const toast = new ShowToast();
|
|
2140
|
-
* await toast.execute({
|
|
2141
|
-
* color: 'success',
|
|
2142
|
-
* title: 'Success',
|
|
2143
|
-
* message: 'Operation completed successfully!'
|
|
2144
|
-
* });
|
|
2145
|
-
* ```
|
|
2146
|
-
*/
|
|
2147
|
-
declare class ShowToast extends Activity<{
|
|
2148
|
-
color?: AXStyleColorType;
|
|
2149
|
-
title?: string;
|
|
2150
|
-
message?: string;
|
|
2151
|
-
duration?: number;
|
|
2152
|
-
}, void> {
|
|
2153
|
-
private readonly toastService;
|
|
2154
|
-
private readonly translationService;
|
|
2155
|
-
constructor();
|
|
2156
|
-
execute(input: {
|
|
2157
|
-
color?: AXStyleColorType;
|
|
2158
|
-
title?: string;
|
|
2159
|
-
message?: string;
|
|
2160
|
-
duration?: number;
|
|
2161
|
-
}): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
|
|
2162
|
-
output: void;
|
|
2163
|
-
outcomes: Record<string, any>;
|
|
2164
|
-
}>>;
|
|
2165
|
-
}
|
|
2166
|
-
|
|
2167
|
-
/**
|
|
2168
|
-
* Navigate Activity - Navigates to different pages/routes.
|
|
2169
|
-
*
|
|
2170
|
-
* Usage:
|
|
2171
|
-
* ```typescript
|
|
2172
|
-
* const navigate = new Navigate();
|
|
2173
|
-
* await navigate.execute({
|
|
2174
|
-
* mode: 'route',
|
|
2175
|
-
* route: '/users',
|
|
2176
|
-
* params: { id: '123' }
|
|
2177
|
-
* });
|
|
2178
|
-
* ```
|
|
2179
|
-
*/
|
|
2180
|
-
declare class Navigate extends Activity<{
|
|
2181
|
-
mode?: 'route' | 'entity-details' | 'entity-list' | 'external';
|
|
2182
|
-
route?: string;
|
|
2183
|
-
params?: Record<string, any>;
|
|
2184
|
-
queryParams?: Record<string, any>;
|
|
2185
|
-
entity?: string;
|
|
2186
|
-
entityId?: string;
|
|
2187
|
-
url?: string;
|
|
2188
|
-
}, void> {
|
|
2189
|
-
private readonly router;
|
|
2190
|
-
constructor();
|
|
2191
|
-
execute(input: {
|
|
2192
|
-
mode?: 'route' | 'entity-details' | 'entity-list' | 'external';
|
|
2193
|
-
route?: string;
|
|
2194
|
-
params?: Record<string, any>;
|
|
2195
|
-
queryParams?: Record<string, any>;
|
|
2196
|
-
entity?: string;
|
|
2197
|
-
entityId?: string;
|
|
2198
|
-
url?: string;
|
|
2199
|
-
}): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
|
|
2200
|
-
output: void;
|
|
2201
|
-
outcomes: Record<string, any>;
|
|
2202
|
-
}>>;
|
|
2203
|
-
}
|
|
2204
|
-
|
|
2205
|
-
/**
|
|
2206
|
-
* Set Variable Activity - Sets a variable value in workflow context.
|
|
2207
|
-
*
|
|
2208
|
-
* Usage:
|
|
2209
|
-
* ```typescript
|
|
2210
|
-
* const setVar = new SetVariable();
|
|
2211
|
-
* await setVar.execute({
|
|
2212
|
-
* variableName: 'userId',
|
|
2213
|
-
* value: '12345'
|
|
2214
|
-
* });
|
|
2215
|
-
* ```
|
|
2216
|
-
*/
|
|
2217
|
-
declare class SetVariable extends Activity<{
|
|
2218
|
-
variableName: string;
|
|
2219
|
-
value: any;
|
|
2220
|
-
}, void> {
|
|
2221
|
-
constructor();
|
|
2222
|
-
execute(input: {
|
|
2223
|
-
variableName: string;
|
|
2224
|
-
value: any;
|
|
2225
|
-
}): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
|
|
2226
|
-
output: void;
|
|
2227
|
-
outcomes: Record<string, any>;
|
|
2228
|
-
}>>;
|
|
2229
|
-
}
|
|
2230
|
-
|
|
2231
|
-
/**
|
|
2232
|
-
* Dispatch Event Activity - Dispatches an event to the system.
|
|
2233
|
-
*
|
|
2234
|
-
* Usage:
|
|
2235
|
-
* ```typescript
|
|
2236
|
-
* const dispatch = new DispatchEvent();
|
|
2237
|
-
* await dispatch.execute({
|
|
2238
|
-
* eventName: 'user-created',
|
|
2239
|
-
* eventData: { userId: '123', name: 'John' }
|
|
2240
|
-
* });
|
|
2241
|
-
* ```
|
|
2242
|
-
*/
|
|
2243
|
-
declare class DispatchEvent extends Activity<{
|
|
2244
|
-
eventName: string;
|
|
2245
|
-
eventData?: any;
|
|
2246
|
-
}, void> {
|
|
2247
|
-
constructor();
|
|
2248
|
-
execute(input: {
|
|
2249
|
-
eventName: string;
|
|
2250
|
-
eventData?: any;
|
|
2251
|
-
}): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
|
|
2252
|
-
output: void;
|
|
2253
|
-
outcomes: Record<string, any>;
|
|
2254
|
-
}>>;
|
|
2255
|
-
}
|
|
2256
|
-
|
|
2257
|
-
/**
|
|
2258
|
-
* If Activity - Conditional execution based on a condition.
|
|
2259
|
-
*
|
|
2260
|
-
* Usage:
|
|
2261
|
-
* ```typescript
|
|
2262
|
-
* const ifActivity = new If();
|
|
2263
|
-
* ifActivity.condition = '{{user.isAdmin}}';
|
|
2264
|
-
* ifActivity.thenActivities = [activity1, activity2];
|
|
2265
|
-
* ifActivity.elseActivities = [activity3];
|
|
2266
|
-
* ```
|
|
2267
|
-
*/
|
|
2268
|
-
declare class If extends Activity<{
|
|
2269
|
-
condition: string | boolean;
|
|
2270
|
-
thenActivities?: IActivity[];
|
|
2271
|
-
elseActivities?: IActivity[];
|
|
2272
|
-
}, any> {
|
|
2273
|
-
constructor();
|
|
2274
|
-
execute(input: {
|
|
2275
|
-
condition: string | boolean;
|
|
2276
|
-
thenActivities?: IActivity[];
|
|
2277
|
-
elseActivities?: IActivity[];
|
|
2278
|
-
}): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
|
|
2279
|
-
output: any;
|
|
2280
|
-
outcomes: Record<string, any>;
|
|
2281
|
-
}>>;
|
|
2282
|
-
private evaluateCondition;
|
|
2283
|
-
}
|
|
2284
|
-
|
|
2285
|
-
/**
|
|
2286
|
-
* While Activity - Loop execution while condition is true.
|
|
2287
|
-
*
|
|
2288
|
-
* Usage:
|
|
2289
|
-
* ```typescript
|
|
2290
|
-
* const whileActivity = new While();
|
|
2291
|
-
* whileActivity.condition = '{{counter < 10}}';
|
|
2292
|
-
* whileActivity.activities = [incrementActivity, logActivity];
|
|
2293
|
-
* ```
|
|
2294
|
-
*/
|
|
2295
|
-
declare class While extends Activity<{
|
|
2296
|
-
condition: string | boolean;
|
|
2297
|
-
activities?: IActivity[];
|
|
2298
|
-
maxIterations?: number;
|
|
2299
|
-
}, any> {
|
|
2300
|
-
constructor();
|
|
2301
|
-
execute(input: {
|
|
2302
|
-
condition: string | boolean;
|
|
2303
|
-
activities?: IActivity[];
|
|
2304
|
-
maxIterations?: number;
|
|
2305
|
-
}): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
|
|
2306
|
-
output: any;
|
|
2307
|
-
outcomes: Record<string, any>;
|
|
2308
|
-
}>>;
|
|
2309
|
-
private evaluateCondition;
|
|
2310
|
-
}
|
|
2311
|
-
|
|
2312
|
-
/**
|
|
2313
|
-
* ForEach Activity - Iterates over a collection of items.
|
|
2314
|
-
*
|
|
2315
|
-
* Usage:
|
|
2316
|
-
* ```typescript
|
|
2317
|
-
* const forEach = new ForEach();
|
|
2318
|
-
* await forEach.execute({
|
|
2319
|
-
* items: ['item1', 'item2', 'item3'],
|
|
2320
|
-
* activities: [processItemActivity]
|
|
2321
|
-
* });
|
|
2322
|
-
* ```
|
|
2323
|
-
*/
|
|
2324
|
-
declare class ForEach extends Activity<{
|
|
2325
|
-
items: any[];
|
|
2326
|
-
activities?: IActivity[];
|
|
2327
|
-
itemVariableName?: string;
|
|
2328
|
-
indexVariableName?: string;
|
|
2329
|
-
}, any> {
|
|
2330
|
-
constructor();
|
|
2331
|
-
execute(input: {
|
|
2332
|
-
items: any[];
|
|
2333
|
-
activities?: IActivity[];
|
|
2334
|
-
itemVariableName?: string;
|
|
2335
|
-
indexVariableName?: string;
|
|
2336
|
-
}): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
|
|
2337
|
-
output: any;
|
|
2338
|
-
outcomes: Record<string, any>;
|
|
2339
|
-
}>>;
|
|
2340
|
-
}
|
|
2341
|
-
|
|
2342
|
-
/**
|
|
2343
|
-
* Execute Command Activity - Executes a command through Command Bus.
|
|
2344
|
-
*
|
|
2345
|
-
* Usage:
|
|
2346
|
-
* ```typescript
|
|
2347
|
-
* const executeCmd = new ExecuteCommand();
|
|
2348
|
-
* await executeCmd.execute({
|
|
2349
|
-
* commandKey: 'UserManagement.CreateUser',
|
|
2350
|
-
* input: { name: 'John', email: 'john@example.com' }
|
|
2351
|
-
* });
|
|
2352
|
-
* ```
|
|
2353
|
-
*/
|
|
2354
|
-
declare class ExecuteCommand extends Activity<{
|
|
2355
|
-
commandKey: string;
|
|
2356
|
-
input?: any;
|
|
2357
|
-
}, any> {
|
|
2358
|
-
private readonly commandService;
|
|
2359
|
-
constructor();
|
|
2360
|
-
execute(input: {
|
|
2361
|
-
commandKey: string;
|
|
2362
|
-
input?: any;
|
|
2363
|
-
}): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
|
|
2364
|
-
output: any;
|
|
2365
|
-
outcomes: Record<string, any>;
|
|
2366
|
-
}>>;
|
|
2367
|
-
}
|
|
2368
|
-
|
|
2369
|
-
/**
|
|
2370
|
-
* Execute Query Activity - Executes a query through Query Bus.
|
|
2371
|
-
*
|
|
2372
|
-
* Usage:
|
|
2373
|
-
* ```typescript
|
|
2374
|
-
* const executeQuery = new ExecuteQuery();
|
|
2375
|
-
* await executeQuery.execute({
|
|
2376
|
-
* queryKey: 'UserManagement.GetUsers',
|
|
2377
|
-
* input: { page: 1, pageSize: 10 }
|
|
2378
|
-
* });
|
|
2379
|
-
* ```
|
|
2380
|
-
*/
|
|
2381
|
-
declare class ExecuteQuery extends Activity<{
|
|
2382
|
-
queryKey: string;
|
|
2383
|
-
input?: any;
|
|
2384
|
-
}, any> {
|
|
2385
|
-
private readonly queryService;
|
|
2386
|
-
constructor();
|
|
2387
|
-
execute(input: {
|
|
2388
|
-
queryKey: string;
|
|
2389
|
-
input?: any;
|
|
2390
|
-
}): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
|
|
2391
|
-
output: any;
|
|
2392
|
-
outcomes: Record<string, any>;
|
|
2393
|
-
}>>;
|
|
2394
|
-
}
|
|
2395
|
-
|
|
2396
|
-
/**
|
|
2397
|
-
* Start Activity - Marks the start point of a workflow.
|
|
2398
|
-
*
|
|
2399
|
-
* This is a visual marker activity that doesn't perform any actual work.
|
|
2400
|
-
* It's used in workflow designers to clearly indicate where a workflow begins.
|
|
2401
|
-
*
|
|
2402
|
-
* Usage:
|
|
2403
|
-
* ```typescript
|
|
2404
|
-
* const start = new StartActivity();
|
|
2405
|
-
* await start.execute({});
|
|
2406
|
-
* ```
|
|
2407
|
-
*/
|
|
2408
|
-
declare class StartActivity extends Activity<Record<string, never>, void> {
|
|
2409
|
-
constructor();
|
|
2410
|
-
execute(input: Record<string, never>): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
|
|
2411
|
-
output: void;
|
|
2412
|
-
outcomes: Record<string, any>;
|
|
2413
|
-
}>>;
|
|
2414
|
-
}
|
|
2415
|
-
|
|
2416
|
-
/**
|
|
2417
|
-
* End Activity - Marks the end point of a workflow.
|
|
2418
|
-
*
|
|
2419
|
-
* This is a visual marker activity that terminates the workflow execution.
|
|
2420
|
-
* When this activity is reached, the workflow completes successfully.
|
|
2421
|
-
*
|
|
2422
|
-
* Usage:
|
|
2423
|
-
* ```typescript
|
|
2424
|
-
* const end = new EndActivity();
|
|
2425
|
-
* await end.execute({});
|
|
2426
|
-
* ```
|
|
2427
|
-
*/
|
|
2428
|
-
declare class EndActivity extends Activity<Record<string, never>, void> {
|
|
2429
|
-
constructor();
|
|
2430
|
-
execute(input: Record<string, never>): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
|
|
2431
|
-
output: void;
|
|
2432
|
-
outcomes: Record<string, any>;
|
|
2433
|
-
}>>;
|
|
2434
|
-
}
|
|
2435
|
-
|
|
2436
|
-
/**
|
|
2437
|
-
* Command setups for all built-in workflow activities.
|
|
2438
|
-
* Registers activities as AXPCommand instances.
|
|
2439
|
-
*/
|
|
2440
|
-
declare const provideWorkflowActivityCommands: () => i0.EnvironmentProviders;
|
|
2441
|
-
|
|
2442
|
-
export { AXPActivityCategoryProviderService, AXPActivityProviderService, AXPWorkflowAction, AXPWorkflowContext, AXPWorkflowDefinitionRegistryService, AXPWorkflowDefinitionResolver, AXPWorkflowError, AXPWorkflowEventService, AXPWorkflowExecutionService, AXPWorkflowFunction, AXPWorkflowModule, AXPWorkflowRegistryService, AXPWorkflowService, AXP_ACTIVITY_CATEGORY_PROVIDER, AXP_ACTIVITY_PROVIDER, AXP_WORKFLOW_DEFINITION_LOADER, Activity, ActivityRegistry, DispatchEvent, EndActivity, ExecuteCommand, ExecuteQuery, ForEach, If, Navigate, Sequence, SetVariable, ShowAlertDialog, ShowConfirmDialog, ShowDialogLayoutBuilder, ShowToast, StartActivity, While, WorkflowCoordinator, WriteLine, createWorkFlowEvent, ofType, provideWorkflowActivityCommands };
|
|
2443
|
-
export type { AXPActivity, AXPActivityCategoryProvider, AXPActivityCategoryProviderContext, AXPActivityExecutionContextState, AXPActivityIncident, AXPActivityProvider, AXPActivityProviderContext, AXPActivityStatus, AXPActivityVariable, AXPBookmark, AXPCompletionCallbackState, AXPConnection, AXPCustomProperties, AXPEndpoint, AXPExceptionState, AXPExpression, AXPFlowchart, AXPGetWorkflowDefinitionRequest, AXPGetWorkflowDefinitionResponse, AXPGetWorkflowExecutionStateRequest, AXPInputValue, AXPMetadata, AXPOutputValue, AXPPosition, AXPResumeWorkflowExecutionRequest, AXPResumeWorkflowExecutionResponse, AXPStartWorkflowExecutionRequest, AXPStartWorkflowExecutionResponse, AXPStoredWorkflowDefinition, AXPVariableDefinition, AXPVariableModel, AXPVersionedEntity, AXPWorkflow, AXPWorkflowActionInput, AXPWorkflowCondition, AXPWorkflowConditionType, AXPWorkflowDefinition, AXPWorkflowDefinitionJson, AXPWorkflowDefinitionLoader, AXPWorkflowDefinitionPreloader, AXPWorkflowEvent, AXPWorkflowExecutionState, AXPWorkflowFaultState, AXPWorkflowInputDefinition, AXPWorkflowInstance, AXPWorkflowModuleConfigs, AXPWorkflowNextStep, AXPWorkflowOptions, AXPWorkflowOutputDefinition, AXPWorkflowState, AXPWorkflowStatus, AXPWorkflowStep, AXPWorkflowSubStatus, AXPWorkflowTask, ActivityCategory, ActivityCategoryDescriptor, ActivityDescriptor, ActivityPropertyWidget, IActivity, InputDescriptor, OutputDescriptor, WorkflowExecutionResult };
|