@acorex/platform 21.0.0-next.5 → 21.0.0-next.50
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 +281 -23
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-common-common-settings.provider-Bi1RYif5.mjs +163 -0
- package/fesm2022/acorex-platform-common-common-settings.provider-Bi1RYif5.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +1047 -263
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +1138 -510
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +557 -826
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +804 -186
- 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 +6208 -2344
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +456 -204
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +18632 -10286
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +538 -168
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +720 -456
- 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-CDYAGBku.mjs +103 -0
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.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-BGO75IMz.mjs +116 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGO75IMz.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 +8728 -4269
- 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 +391 -166
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs +160 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.mjs +120 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.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-BfCeUU5F.mjs} +19 -26
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.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 +1836 -67
- 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 → acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs} +24 -25
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs +94 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs +86 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +674 -573
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +1715 -535
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/fesm2022/acorex-platform.mjs.map +1 -1
- package/package.json +37 -37
- package/{auth/index.d.ts → types/acorex-platform-auth.d.ts} +241 -4
- package/{common/index.d.ts → types/acorex-platform-common.d.ts} +598 -80
- package/{core/index.d.ts → types/acorex-platform-core.d.ts} +595 -132
- package/{domain/index.d.ts → types/acorex-platform-domain.d.ts} +744 -412
- package/{layout/builder/index.d.ts → types/acorex-platform-layout-builder.d.ts} +193 -48
- package/types/acorex-platform-layout-components.d.ts +2979 -0
- package/{layout/designer/index.d.ts → types/acorex-platform-layout-designer.d.ts} +96 -18
- package/{layout/entity/index.d.ts → types/acorex-platform-layout-entity.d.ts} +1601 -261
- package/{layout/views/index.d.ts → types/acorex-platform-layout-views.d.ts} +116 -55
- package/{layout/widget-core/index.d.ts → types/acorex-platform-layout-widget-core.d.ts} +272 -124
- package/{layout/widgets/index.d.ts → types/acorex-platform-layout-widgets.d.ts} +1055 -157
- package/{native/index.d.ts → types/acorex-platform-native.d.ts} +0 -7
- package/types/acorex-platform-runtime.d.ts +571 -0
- package/{themes/default/index.d.ts → types/acorex-platform-themes-default.d.ts} +122 -5
- package/{themes/shared/index.d.ts → types/acorex-platform-themes-shared.d.ts} +1 -1
- package/types/acorex-platform-workflow.d.ts +1884 -0
- package/fesm2022/acorex-platform-common-common-settings.provider-zhqNP3xb.mjs +0 -71
- 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 +0 -135
- 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-settings.provider-DSs1o1M6.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs +0 -65
- 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 +0 -64
- 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/runtime/index.d.ts +0 -307
- package/workflow/index.d.ts +0 -1808
- /package/{index.d.ts → types/acorex-platform.d.ts} +0 -0
package/workflow/index.d.ts
DELETED
|
@@ -1,1808 +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, AXPExecuteCommandResultPromise } from '@acorex/platform/runtime';
|
|
6
|
-
import { AXPCategoryEntity, AXPValidationRules } from '@acorex/platform/core';
|
|
7
|
-
import { AXPWidgetTypesMap } from '@acorex/platform/layout/widget-core';
|
|
8
|
-
|
|
9
|
-
declare class AXPWorkflowError extends Error {
|
|
10
|
-
inner: Error | null;
|
|
11
|
-
constructor(message: string, inner?: Error | null);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface AXPWorkflow {
|
|
15
|
-
steps: {
|
|
16
|
-
[stepName: string]: AXPWorkflowStep;
|
|
17
|
-
};
|
|
18
|
-
startStepId: string;
|
|
19
|
-
}
|
|
20
|
-
declare class AXPWorkflowContext {
|
|
21
|
-
constructor(initialData?: any);
|
|
22
|
-
private variables;
|
|
23
|
-
private stepOutputs;
|
|
24
|
-
setVariable(key: string, value: any): void;
|
|
25
|
-
setVariables(context?: any): void;
|
|
26
|
-
getVariable<T = any>(key?: string | null): T;
|
|
27
|
-
setOutput(key: string, output: any): void;
|
|
28
|
-
setOutputs(values: Map<string, any>): void;
|
|
29
|
-
getOutput<T = any>(key: string): T;
|
|
30
|
-
}
|
|
31
|
-
type AXPWorkflowActionInput = any;
|
|
32
|
-
type AXPWorkflowConditionType = 'AND' | 'OR' | 'SINGLE';
|
|
33
|
-
interface AXPWorkflowCondition {
|
|
34
|
-
type: AXPWorkflowConditionType;
|
|
35
|
-
conditions?: AXPWorkflowCondition[];
|
|
36
|
-
expression?: string;
|
|
37
|
-
}
|
|
38
|
-
interface AXPWorkflowNextStep {
|
|
39
|
-
conditions: AXPWorkflowCondition[];
|
|
40
|
-
nextStepId: string;
|
|
41
|
-
}
|
|
42
|
-
interface AXPWorkflowStep {
|
|
43
|
-
id?: string;
|
|
44
|
-
action: AXPWorkflowAction | string;
|
|
45
|
-
input?: AXPWorkflowActionInput;
|
|
46
|
-
nextSteps?: AXPWorkflowNextStep[];
|
|
47
|
-
conditions?: AXPWorkflowCondition[];
|
|
48
|
-
}
|
|
49
|
-
declare abstract class AXPWorkflowAction {
|
|
50
|
-
private eventService;
|
|
51
|
-
protected dispatch(event: AXPWorkflowEvent): void;
|
|
52
|
-
abstract execute(context: AXPWorkflowContext): Promise<void>;
|
|
53
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowAction, never>;
|
|
54
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowAction>;
|
|
55
|
-
}
|
|
56
|
-
declare abstract class AXPWorkflowFunction {
|
|
57
|
-
abstract execute(...args: any[]): Promise<any> | any;
|
|
58
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowFunction, never>;
|
|
59
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowFunction>;
|
|
60
|
-
}
|
|
61
|
-
interface AXPWorkflowEvent<T = any> {
|
|
62
|
-
type: string;
|
|
63
|
-
payload?: T;
|
|
64
|
-
}
|
|
65
|
-
declare function createWorkFlowEvent<T>(type: string): {
|
|
66
|
-
(payload: T): {
|
|
67
|
-
type: string;
|
|
68
|
-
payload: T;
|
|
69
|
-
};
|
|
70
|
-
type: string;
|
|
71
|
-
};
|
|
72
|
-
declare function ofType<T extends {
|
|
73
|
-
type: string;
|
|
74
|
-
}>(...allowedTypes: Array<{
|
|
75
|
-
type: string;
|
|
76
|
-
}>): rxjs.MonoTypeOperatorFunction<T>;
|
|
77
|
-
|
|
78
|
-
declare class AXPWorkflowEventService {
|
|
79
|
-
private eventSubject;
|
|
80
|
-
dispatch(event: AXPWorkflowEvent): void;
|
|
81
|
-
get events$(): Observable<AXPWorkflowEvent>;
|
|
82
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowEventService, never>;
|
|
83
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowEventService>;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
declare class AXPWorkflowRegistryService {
|
|
87
|
-
private functionsMap;
|
|
88
|
-
private actionsMap;
|
|
89
|
-
private workflowsMap;
|
|
90
|
-
registerWorkflow(name: string, workflow: AXPWorkflow): void;
|
|
91
|
-
getWorkflow(name: string): AXPWorkflow | undefined;
|
|
92
|
-
registerAction(name: string, action: Type<AXPWorkflowAction>): void;
|
|
93
|
-
getAction(name: string): Type<AXPWorkflowAction> | undefined;
|
|
94
|
-
registerFunction(name: string, func: Type<AXPWorkflowFunction>): void;
|
|
95
|
-
getFunction(name: string): Type<AXPWorkflowFunction> | undefined;
|
|
96
|
-
getFunctionNames(): string[];
|
|
97
|
-
getStep(workflowName: string, stepName: string): AXPWorkflowStep | undefined;
|
|
98
|
-
updateStepInWorkflow(workflowName: string, stepName: string, step: AXPWorkflowStep): void;
|
|
99
|
-
addStepToWorkflow(workflowName: string, stepName: string, step: AXPWorkflowStep): void;
|
|
100
|
-
addAfterStep(workflowId: string, stepId: string, newStepId: string, newStepAction: string, conditionExpression: string): void;
|
|
101
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowRegistryService, never>;
|
|
102
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowRegistryService>;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
interface AXPWorkflowModuleConfigs {
|
|
106
|
-
functions?: {
|
|
107
|
-
[name: string]: Type<AXPWorkflowFunction>;
|
|
108
|
-
};
|
|
109
|
-
actions?: {
|
|
110
|
-
[name: string]: Type<AXPWorkflowAction>;
|
|
111
|
-
};
|
|
112
|
-
workflows?: {
|
|
113
|
-
[name: string]: AXPWorkflow;
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
declare class AXPWorkflowModule {
|
|
117
|
-
static forRoot(config?: AXPWorkflowModuleConfigs): ModuleWithProviders<AXPWorkflowModule>;
|
|
118
|
-
static forChild(config?: AXPWorkflowModuleConfigs): ModuleWithProviders<AXPWorkflowModule>;
|
|
119
|
-
/**
|
|
120
|
-
* @ignore
|
|
121
|
-
*/
|
|
122
|
-
constructor(instances: any[]);
|
|
123
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowModule, [{ optional: true; }]>;
|
|
124
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AXPWorkflowModule, never, never, never>;
|
|
125
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<AXPWorkflowModule>;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
declare class AXPWorkflowService {
|
|
129
|
-
private registryService;
|
|
130
|
-
private injector;
|
|
131
|
-
private eventService;
|
|
132
|
-
get events$(): Observable<AXPWorkflowEvent>;
|
|
133
|
-
constructor(registryService: AXPWorkflowRegistryService, injector: Injector);
|
|
134
|
-
exists(name: string): boolean;
|
|
135
|
-
execute(workflow: AXPWorkflow | string, initialContext?: AXPWorkflowContext | any | null): Promise<AXPWorkflowContext>;
|
|
136
|
-
private processData;
|
|
137
|
-
private getActionInstance;
|
|
138
|
-
private getWorkflowInstance;
|
|
139
|
-
private determineNextStep;
|
|
140
|
-
private evaluateCondition;
|
|
141
|
-
private evaluateSingleCondition;
|
|
142
|
-
private evaluateExpression;
|
|
143
|
-
private processInputs;
|
|
144
|
-
private createFunctionScope;
|
|
145
|
-
private getFunctionInstance;
|
|
146
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowService, never>;
|
|
147
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowService>;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Base entity with versioning support.
|
|
152
|
-
*/
|
|
153
|
-
interface AXPVersionedEntity {
|
|
154
|
-
version: number;
|
|
155
|
-
isLatest: boolean;
|
|
156
|
-
isPublished: boolean;
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Workflow definition stored in database.
|
|
160
|
-
* This is the stored format that matches Elsa backend structure.
|
|
161
|
-
*/
|
|
162
|
-
interface AXPStoredWorkflowDefinition extends AXPVersionedEntity {
|
|
163
|
-
/**
|
|
164
|
-
* Unique ID of this workflow definition version.
|
|
165
|
-
*/
|
|
166
|
-
id: string;
|
|
167
|
-
/**
|
|
168
|
-
* Unique workflow name (same across all versions).
|
|
169
|
-
* This is the primary identifier (replaces definitionId).
|
|
170
|
-
*/
|
|
171
|
-
name: string;
|
|
172
|
-
/**
|
|
173
|
-
* Tenant ID (nullable).
|
|
174
|
-
*/
|
|
175
|
-
tenantId?: string | null;
|
|
176
|
-
/**
|
|
177
|
-
* Description of what the workflow does.
|
|
178
|
-
*/
|
|
179
|
-
description?: string | null;
|
|
180
|
-
/**
|
|
181
|
-
* Creation timestamp (ISO date-time).
|
|
182
|
-
*/
|
|
183
|
-
createdAt: string;
|
|
184
|
-
/**
|
|
185
|
-
* Version of the tool that produced this definition (e.g. "3.2.0.0").
|
|
186
|
-
*/
|
|
187
|
-
toolVersion?: string | null;
|
|
188
|
-
/**
|
|
189
|
-
* Materializer name for deserialization.
|
|
190
|
-
*/
|
|
191
|
-
materializerName?: string;
|
|
192
|
-
/**
|
|
193
|
-
* JSON data (for simple workflows).
|
|
194
|
-
*/
|
|
195
|
-
stringData?: string;
|
|
196
|
-
/**
|
|
197
|
-
* Binary data (for complex workflows).
|
|
198
|
-
*/
|
|
199
|
-
binaryData?: Uint8Array;
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* Variable definition.
|
|
203
|
-
* Matches VariableDefinition from workflow definition schema.
|
|
204
|
-
*/
|
|
205
|
-
interface AXPVariableDefinition {
|
|
206
|
-
/**
|
|
207
|
-
* Variable ID.
|
|
208
|
-
*/
|
|
209
|
-
id?: string;
|
|
210
|
-
/**
|
|
211
|
-
* Variable name.
|
|
212
|
-
*/
|
|
213
|
-
name: string;
|
|
214
|
-
/**
|
|
215
|
-
* Type name (e.g., "String", "Int32", "Boolean").
|
|
216
|
-
*/
|
|
217
|
-
typeName: string;
|
|
218
|
-
/**
|
|
219
|
-
* Whether this is an array type.
|
|
220
|
-
*/
|
|
221
|
-
isArray?: boolean;
|
|
222
|
-
/**
|
|
223
|
-
* Variable value (as string expression or literal).
|
|
224
|
-
*/
|
|
225
|
-
value?: string | null;
|
|
226
|
-
/**
|
|
227
|
-
* Storage driver type name (for custom storage).
|
|
228
|
-
*/
|
|
229
|
-
storageDriverTypeName?: string | null;
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* Workflow input definition.
|
|
233
|
-
* Matches WorkflowInputDefinition from workflow definition schema.
|
|
234
|
-
*/
|
|
235
|
-
interface AXPWorkflowInputDefinition {
|
|
236
|
-
/**
|
|
237
|
-
* Input type (e.g., "String", "Int32", "Object").
|
|
238
|
-
*/
|
|
239
|
-
type: string;
|
|
240
|
-
/**
|
|
241
|
-
* Input name.
|
|
242
|
-
*/
|
|
243
|
-
name: string;
|
|
244
|
-
/**
|
|
245
|
-
* Display name.
|
|
246
|
-
*/
|
|
247
|
-
displayName?: string;
|
|
248
|
-
/**
|
|
249
|
-
* Description.
|
|
250
|
-
*/
|
|
251
|
-
description?: string;
|
|
252
|
-
/**
|
|
253
|
-
* Category for grouping.
|
|
254
|
-
*/
|
|
255
|
-
category?: string;
|
|
256
|
-
/**
|
|
257
|
-
* UI hint (widget type).
|
|
258
|
-
*/
|
|
259
|
-
uiHint?: string;
|
|
260
|
-
/**
|
|
261
|
-
* Storage driver type (for custom storage).
|
|
262
|
-
*/
|
|
263
|
-
storageDriverType?: string | null;
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Workflow output definition.
|
|
267
|
-
* Matches WorkflowOutputDefinition from workflow definition schema.
|
|
268
|
-
*/
|
|
269
|
-
interface AXPWorkflowOutputDefinition {
|
|
270
|
-
/**
|
|
271
|
-
* Output type (e.g., "String", "Int32", "Object").
|
|
272
|
-
*/
|
|
273
|
-
type: string;
|
|
274
|
-
/**
|
|
275
|
-
* Output name.
|
|
276
|
-
*/
|
|
277
|
-
name: string;
|
|
278
|
-
/**
|
|
279
|
-
* Display name.
|
|
280
|
-
*/
|
|
281
|
-
displayName?: string;
|
|
282
|
-
/**
|
|
283
|
-
* Description.
|
|
284
|
-
*/
|
|
285
|
-
description?: string;
|
|
286
|
-
/**
|
|
287
|
-
* Category for grouping.
|
|
288
|
-
*/
|
|
289
|
-
category?: string;
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* Expression.
|
|
293
|
-
* Used for dynamic values in activities.
|
|
294
|
-
*/
|
|
295
|
-
interface AXPExpression {
|
|
296
|
-
/**
|
|
297
|
-
* Expression type (e.g., "Literal", "JavaScript", "Liquid").
|
|
298
|
-
*/
|
|
299
|
-
type: string;
|
|
300
|
-
/**
|
|
301
|
-
* Expression value.
|
|
302
|
-
*/
|
|
303
|
-
value?: any;
|
|
304
|
-
}
|
|
305
|
-
/**
|
|
306
|
-
* Input value wrapper.
|
|
307
|
-
* Wraps an expression with type information.
|
|
308
|
-
*/
|
|
309
|
-
interface AXPInputValue {
|
|
310
|
-
/**
|
|
311
|
-
* Type name.
|
|
312
|
-
*/
|
|
313
|
-
typeName: string;
|
|
314
|
-
/**
|
|
315
|
-
* Expression (or null).
|
|
316
|
-
*/
|
|
317
|
-
expression?: AXPExpression | null;
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* Output value wrapper.
|
|
321
|
-
* References memory location.
|
|
322
|
-
*/
|
|
323
|
-
interface AXPOutputValue {
|
|
324
|
-
/**
|
|
325
|
-
* Type name.
|
|
326
|
-
*/
|
|
327
|
-
typeName: string;
|
|
328
|
-
/**
|
|
329
|
-
* Memory reference (or null).
|
|
330
|
-
*/
|
|
331
|
-
memoryReference?: {
|
|
332
|
-
id: string;
|
|
333
|
-
} | null;
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* Position (for visual layout).
|
|
337
|
-
*/
|
|
338
|
-
interface AXPPosition {
|
|
339
|
-
x: number;
|
|
340
|
-
y: number;
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Endpoint (connection point).
|
|
344
|
-
*/
|
|
345
|
-
interface AXPEndpoint {
|
|
346
|
-
/**
|
|
347
|
-
* Activity ID.
|
|
348
|
-
*/
|
|
349
|
-
activity: string;
|
|
350
|
-
/**
|
|
351
|
-
* Port name (nullable).
|
|
352
|
-
*/
|
|
353
|
-
port?: string | null;
|
|
354
|
-
}
|
|
355
|
-
/**
|
|
356
|
-
* Connection between activities.
|
|
357
|
-
*/
|
|
358
|
-
interface AXPConnection {
|
|
359
|
-
/**
|
|
360
|
-
* Source endpoint.
|
|
361
|
-
*/
|
|
362
|
-
source: AXPEndpoint;
|
|
363
|
-
/**
|
|
364
|
-
* Target endpoint.
|
|
365
|
-
*/
|
|
366
|
-
target: AXPEndpoint;
|
|
367
|
-
/**
|
|
368
|
-
* Connection vertices (for curved paths).
|
|
369
|
-
*/
|
|
370
|
-
vertices?: AXPPosition[];
|
|
371
|
-
}
|
|
372
|
-
/**
|
|
373
|
-
* Variable model (for flowchart variables).
|
|
374
|
-
*/
|
|
375
|
-
interface AXPVariableModel {
|
|
376
|
-
id: string;
|
|
377
|
-
name: string;
|
|
378
|
-
typeName: string;
|
|
379
|
-
value?: string | null;
|
|
380
|
-
storageDriverTypeName?: string | null;
|
|
381
|
-
}
|
|
382
|
-
/**
|
|
383
|
-
* Metadata (designer annotations).
|
|
384
|
-
*/
|
|
385
|
-
interface AXPMetadata {
|
|
386
|
-
[key: string]: any;
|
|
387
|
-
}
|
|
388
|
-
/**
|
|
389
|
-
* Custom properties (free-form bag).
|
|
390
|
-
*/
|
|
391
|
-
interface AXPCustomProperties {
|
|
392
|
-
/**
|
|
393
|
-
* Connections that reference non-existent activities.
|
|
394
|
-
*/
|
|
395
|
-
notFoundConnections?: AXPConnection[];
|
|
396
|
-
/**
|
|
397
|
-
* Additional custom properties.
|
|
398
|
-
*/
|
|
399
|
-
[key: string]: any;
|
|
400
|
-
}
|
|
401
|
-
/**
|
|
402
|
-
* Base activity (workflow definition format).
|
|
403
|
-
* Matches Activity from workflow definition schema.
|
|
404
|
-
* Note: This is the workflow definition format, not the frontend Activity class.
|
|
405
|
-
*/
|
|
406
|
-
interface AXPActivity$1 {
|
|
407
|
-
/**
|
|
408
|
-
* Activity ID.
|
|
409
|
-
*/
|
|
410
|
-
id: string;
|
|
411
|
-
/**
|
|
412
|
-
* Node ID (for visual designer).
|
|
413
|
-
*/
|
|
414
|
-
nodeId: string;
|
|
415
|
-
/**
|
|
416
|
-
* Activity name.
|
|
417
|
-
*/
|
|
418
|
-
name?: string | null;
|
|
419
|
-
/**
|
|
420
|
-
* Activity type (e.g., "workflow-activity:write-line", "workflow-activity:if").
|
|
421
|
-
*/
|
|
422
|
-
type: string;
|
|
423
|
-
/**
|
|
424
|
-
* Activity version.
|
|
425
|
-
*/
|
|
426
|
-
version: number;
|
|
427
|
-
/**
|
|
428
|
-
* Execution mode for this activity instance.
|
|
429
|
-
* Determines where this activity should be executed:
|
|
430
|
-
* - 'frontend': Execute in browser (UI activities like dialogs, toasts, navigation)
|
|
431
|
-
* - 'backend': Execute in backend (business logic, database operations, API calls)
|
|
432
|
-
* - 'both': Execute in both frontend and backend (hybrid activities)
|
|
433
|
-
*
|
|
434
|
-
* If not specified, falls back to AXPActivity's executionMode.
|
|
435
|
-
* This allows per-instance override of the default execution mode.
|
|
436
|
-
*
|
|
437
|
-
* @example
|
|
438
|
-
* ```json
|
|
439
|
-
* {
|
|
440
|
-
* "id": "show-dialog",
|
|
441
|
-
* "type": "workflow-activity:show-dialog",
|
|
442
|
-
* "executionMode": "frontend"
|
|
443
|
-
* }
|
|
444
|
-
* ```
|
|
445
|
-
*/
|
|
446
|
-
executionMode?: 'frontend' | 'backend' | 'both';
|
|
447
|
-
/**
|
|
448
|
-
* Custom properties.
|
|
449
|
-
*/
|
|
450
|
-
customProperties?: AXPCustomProperties;
|
|
451
|
-
/**
|
|
452
|
-
* Metadata (designer annotations).
|
|
453
|
-
*/
|
|
454
|
-
metadata?: AXPMetadata;
|
|
455
|
-
/**
|
|
456
|
-
* Additional type-specific properties.
|
|
457
|
-
*/
|
|
458
|
-
[key: string]: any;
|
|
459
|
-
}
|
|
460
|
-
/**
|
|
461
|
-
* Flowchart activity (workflow definition format).
|
|
462
|
-
* This is the root activity that contains all other activities.
|
|
463
|
-
*/
|
|
464
|
-
interface AXPFlowchart extends AXPActivity$1 {
|
|
465
|
-
/**
|
|
466
|
-
* Type must be "workflow-activity:flowchart".
|
|
467
|
-
*/
|
|
468
|
-
type: "workflow-activity:flowchart";
|
|
469
|
-
/**
|
|
470
|
-
* Activities in this flowchart.
|
|
471
|
-
*/
|
|
472
|
-
activities: AXPActivity$1[];
|
|
473
|
-
/**
|
|
474
|
-
* Variables in this flowchart.
|
|
475
|
-
*/
|
|
476
|
-
variables?: AXPVariableModel[];
|
|
477
|
-
/**
|
|
478
|
-
* Connections between activities.
|
|
479
|
-
*/
|
|
480
|
-
connections: AXPConnection[];
|
|
481
|
-
}
|
|
482
|
-
/**
|
|
483
|
-
* Simplified workflow definition for JSON files.
|
|
484
|
-
* This is what developers write - system fields are added automatically.
|
|
485
|
-
*/
|
|
486
|
-
interface AXPWorkflowDefinitionJson {
|
|
487
|
-
/**
|
|
488
|
-
* Unique workflow name (used as key/identifier).
|
|
489
|
-
* This is the only required field for identification.
|
|
490
|
-
* Similar to entity system where 'name' is the unique key.
|
|
491
|
-
*/
|
|
492
|
-
name: string;
|
|
493
|
-
/**
|
|
494
|
-
* Display title (human-readable name shown in UI).
|
|
495
|
-
* Similar to entity system where 'title' is the display name.
|
|
496
|
-
*/
|
|
497
|
-
title?: string | null;
|
|
498
|
-
/**
|
|
499
|
-
* Description.
|
|
500
|
-
*/
|
|
501
|
-
description?: string | null;
|
|
502
|
-
/**
|
|
503
|
-
* Workflow variables.
|
|
504
|
-
*/
|
|
505
|
-
variables?: AXPVariableDefinition[];
|
|
506
|
-
/**
|
|
507
|
-
* Workflow inputs.
|
|
508
|
-
*/
|
|
509
|
-
inputs?: AXPWorkflowInputDefinition[];
|
|
510
|
-
/**
|
|
511
|
-
* Workflow outputs.
|
|
512
|
-
*/
|
|
513
|
-
outputs?: AXPWorkflowOutputDefinition[];
|
|
514
|
-
/**
|
|
515
|
-
* Workflow outcomes.
|
|
516
|
-
*/
|
|
517
|
-
outcomes?: string[];
|
|
518
|
-
/**
|
|
519
|
-
* Custom properties.
|
|
520
|
-
*/
|
|
521
|
-
customProperties?: AXPCustomProperties;
|
|
522
|
-
/**
|
|
523
|
-
* Workflow options.
|
|
524
|
-
*/
|
|
525
|
-
options?: AXPWorkflowOptions;
|
|
526
|
-
/**
|
|
527
|
-
* Root activity (Flowchart).
|
|
528
|
-
*/
|
|
529
|
-
root: AXPFlowchart;
|
|
530
|
-
}
|
|
531
|
-
/**
|
|
532
|
-
* Complete workflow definition (v3.0.0 format).
|
|
533
|
-
* This is the core workflow definition without system fields.
|
|
534
|
-
* System fields ($schema, tenantId, createdAt, toolVersion, isPublished, id, version, isLatest, isReadonly, isSystem)
|
|
535
|
-
* are managed by the entity system and stored in entity model.
|
|
536
|
-
*/
|
|
537
|
-
interface AXPWorkflowDefinition {
|
|
538
|
-
/**
|
|
539
|
-
* Unique workflow name (used as key/identifier, same across all versions).
|
|
540
|
-
* This is the primary identifier for the workflow.
|
|
541
|
-
*/
|
|
542
|
-
name: string;
|
|
543
|
-
/**
|
|
544
|
-
* Display title (human-readable name shown in UI).
|
|
545
|
-
*/
|
|
546
|
-
title?: string | null;
|
|
547
|
-
/**
|
|
548
|
-
* Description.
|
|
549
|
-
*/
|
|
550
|
-
description?: string | null;
|
|
551
|
-
/**
|
|
552
|
-
* Workflow variables.
|
|
553
|
-
*/
|
|
554
|
-
variables?: AXPVariableDefinition[];
|
|
555
|
-
/**
|
|
556
|
-
* Workflow inputs.
|
|
557
|
-
*/
|
|
558
|
-
inputs?: AXPWorkflowInputDefinition[];
|
|
559
|
-
/**
|
|
560
|
-
* Workflow outputs.
|
|
561
|
-
*/
|
|
562
|
-
outputs?: AXPWorkflowOutputDefinition[];
|
|
563
|
-
/**
|
|
564
|
-
* Workflow outcomes.
|
|
565
|
-
*/
|
|
566
|
-
outcomes?: string[];
|
|
567
|
-
/**
|
|
568
|
-
* Custom properties.
|
|
569
|
-
*/
|
|
570
|
-
customProperties?: AXPCustomProperties;
|
|
571
|
-
/**
|
|
572
|
-
* Workflow options.
|
|
573
|
-
*/
|
|
574
|
-
options?: AXPWorkflowOptions;
|
|
575
|
-
/**
|
|
576
|
-
* @deprecated Use options.usableAsActivity instead.
|
|
577
|
-
*/
|
|
578
|
-
usableAsActivity?: boolean | null;
|
|
579
|
-
/**
|
|
580
|
-
* Root activity (Flowchart).
|
|
581
|
-
*/
|
|
582
|
-
root: AXPFlowchart;
|
|
583
|
-
}
|
|
584
|
-
/**
|
|
585
|
-
* Workflow configuration options.
|
|
586
|
-
*/
|
|
587
|
-
interface AXPWorkflowOptions {
|
|
588
|
-
/**
|
|
589
|
-
* Activation strategy type.
|
|
590
|
-
*/
|
|
591
|
-
activationStrategyType?: string | null;
|
|
592
|
-
/**
|
|
593
|
-
* Whether workflow can be used as an activity.
|
|
594
|
-
*/
|
|
595
|
-
usableAsActivity?: boolean | null;
|
|
596
|
-
/**
|
|
597
|
-
* Auto-update consuming workflows.
|
|
598
|
-
*/
|
|
599
|
-
autoUpdateConsumingWorkflows?: boolean;
|
|
600
|
-
/**
|
|
601
|
-
* Activity category (if usable as activity).
|
|
602
|
-
*/
|
|
603
|
-
activityCategory?: string | null;
|
|
604
|
-
/**
|
|
605
|
-
* Incident strategy type.
|
|
606
|
-
*/
|
|
607
|
-
incidentStrategyType?: string | null;
|
|
608
|
-
/**
|
|
609
|
-
* Commit strategy name.
|
|
610
|
-
*/
|
|
611
|
-
commitStrategyName?: string | null;
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
/**
|
|
615
|
-
* Workflow definition loader interface.
|
|
616
|
-
* Implement this to provide workflow definitions from various sources (JSON files, database, etc.).
|
|
617
|
-
*/
|
|
618
|
-
interface AXPWorkflowDefinitionLoader {
|
|
619
|
-
/**
|
|
620
|
-
* Get workflow definition by name (unique key).
|
|
621
|
-
* @param name - The workflow name (unique key)
|
|
622
|
-
* @returns Workflow definition or null if not found
|
|
623
|
-
*/
|
|
624
|
-
get(name: string): Promise<AXPWorkflowDefinition | null>;
|
|
625
|
-
/**
|
|
626
|
-
* Get all available workflow names.
|
|
627
|
-
* Used for preloading and discovery.
|
|
628
|
-
* @returns Array of workflow names
|
|
629
|
-
*/
|
|
630
|
-
getAllNames?(): Promise<string[]>;
|
|
631
|
-
}
|
|
632
|
-
/**
|
|
633
|
-
* Workflow definition preloader interface.
|
|
634
|
-
* Implement this to provide a list of workflow definitions that should be preloaded.
|
|
635
|
-
*/
|
|
636
|
-
interface AXPWorkflowDefinitionPreloader {
|
|
637
|
-
/**
|
|
638
|
-
* Get list of workflow definition IDs to preload.
|
|
639
|
-
* @returns Array of definition IDs
|
|
640
|
-
*/
|
|
641
|
-
preload(): string[];
|
|
642
|
-
}
|
|
643
|
-
/**
|
|
644
|
-
* Injection token for workflow definition loaders.
|
|
645
|
-
* Multiple loaders can be provided (multi: true).
|
|
646
|
-
*/
|
|
647
|
-
declare const AXP_WORKFLOW_DEFINITION_LOADER: InjectionToken<AXPWorkflowDefinitionLoader>;
|
|
648
|
-
/**
|
|
649
|
-
* Resolver service for workflow definitions.
|
|
650
|
-
* Aggregates all registered loaders and resolves workflow definitions.
|
|
651
|
-
*/
|
|
652
|
-
declare class AXPWorkflowDefinitionResolver {
|
|
653
|
-
private loaders;
|
|
654
|
-
/**
|
|
655
|
-
* Get workflow definition by name (unique key).
|
|
656
|
-
* Tries all registered loaders until one returns a definition.
|
|
657
|
-
* @param name - The workflow name (unique key)
|
|
658
|
-
* @returns Workflow definition or null if not found
|
|
659
|
-
*/
|
|
660
|
-
get(name: string): Promise<AXPWorkflowDefinition | null>;
|
|
661
|
-
/**
|
|
662
|
-
* Get all available workflow names from all loaders.
|
|
663
|
-
* @returns Array of unique workflow names
|
|
664
|
-
*/
|
|
665
|
-
getAllNames(): Promise<string[]>;
|
|
666
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowDefinitionResolver, never>;
|
|
667
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowDefinitionResolver>;
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
/**
|
|
671
|
-
* Registry service for workflow definitions.
|
|
672
|
-
* Caches loaded definitions and provides change notifications.
|
|
673
|
-
*/
|
|
674
|
-
declare class AXPWorkflowDefinitionRegistryService {
|
|
675
|
-
private resolver;
|
|
676
|
-
private cache;
|
|
677
|
-
private onChanged;
|
|
678
|
-
/**
|
|
679
|
-
* Observable for workflow definition changes.
|
|
680
|
-
*/
|
|
681
|
-
get onChanged$(): rxjs.Observable<{
|
|
682
|
-
name: string;
|
|
683
|
-
action: "registered" | "updated" | "removed";
|
|
684
|
-
}>;
|
|
685
|
-
/**
|
|
686
|
-
* Get workflow definition by name (unique key).
|
|
687
|
-
* Uses cache if available, otherwise loads from resolver.
|
|
688
|
-
* @param name - The workflow name (unique key)
|
|
689
|
-
* @returns Workflow definition or null if not found
|
|
690
|
-
*/
|
|
691
|
-
get(name: string): Promise<AXPWorkflowDefinition | null>;
|
|
692
|
-
/**
|
|
693
|
-
* Register a workflow definition in the cache.
|
|
694
|
-
* @param definition - The workflow definition to register
|
|
695
|
-
*/
|
|
696
|
-
register(definition: AXPWorkflowDefinition): void;
|
|
697
|
-
/**
|
|
698
|
-
* Update a workflow definition in the cache.
|
|
699
|
-
* @param definition - The updated workflow definition
|
|
700
|
-
*/
|
|
701
|
-
update(definition: AXPWorkflowDefinition): void;
|
|
702
|
-
/**
|
|
703
|
-
* Remove a workflow definition from the cache.
|
|
704
|
-
* @param name - The workflow name to remove
|
|
705
|
-
*/
|
|
706
|
-
remove(name: string): void;
|
|
707
|
-
/**
|
|
708
|
-
* Clear all cached workflow definitions.
|
|
709
|
-
*/
|
|
710
|
-
clear(): void;
|
|
711
|
-
/**
|
|
712
|
-
* Check if a workflow definition is cached.
|
|
713
|
-
* @param definitionId - The workflow definition ID
|
|
714
|
-
* @returns True if cached, false otherwise
|
|
715
|
-
*/
|
|
716
|
-
has(definitionId: string): boolean;
|
|
717
|
-
/**
|
|
718
|
-
* Get all cached workflow definition IDs.
|
|
719
|
-
* @returns Array of definition IDs (only those that have been loaded)
|
|
720
|
-
*/
|
|
721
|
-
getAllIds(): string[];
|
|
722
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowDefinitionRegistryService, never>;
|
|
723
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowDefinitionRegistryService>;
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
/**
|
|
727
|
-
* Workflow status.
|
|
728
|
-
*/
|
|
729
|
-
type AXPWorkflowStatus = 'Running' | 'Finished';
|
|
730
|
-
/**
|
|
731
|
-
* Workflow sub-status.
|
|
732
|
-
*/
|
|
733
|
-
type AXPWorkflowSubStatus = 'Pending' | 'Executing' | 'Suspended' | 'Finished' | 'Cancelled' | 'Faulted';
|
|
734
|
-
/**
|
|
735
|
-
* Activity status.
|
|
736
|
-
*/
|
|
737
|
-
type AXPActivityStatus = 'Running' | 'Completed' | 'Canceled' | 'Faulted';
|
|
738
|
-
/**
|
|
739
|
-
* Exception state.
|
|
740
|
-
*/
|
|
741
|
-
interface AXPExceptionState {
|
|
742
|
-
/**
|
|
743
|
-
* Exception type name.
|
|
744
|
-
*/
|
|
745
|
-
type: string;
|
|
746
|
-
/**
|
|
747
|
-
* Exception message.
|
|
748
|
-
*/
|
|
749
|
-
message: string;
|
|
750
|
-
/**
|
|
751
|
-
* Stack trace (nullable).
|
|
752
|
-
*/
|
|
753
|
-
stackTrace?: string | null;
|
|
754
|
-
/**
|
|
755
|
-
* Inner exception (nullable).
|
|
756
|
-
*/
|
|
757
|
-
innerException?: AXPExceptionState | null;
|
|
758
|
-
}
|
|
759
|
-
/**
|
|
760
|
-
* Activity incident.
|
|
761
|
-
*/
|
|
762
|
-
interface AXPActivityIncident {
|
|
763
|
-
/**
|
|
764
|
-
* Activity ID that caused the incident.
|
|
765
|
-
*/
|
|
766
|
-
activityId: string;
|
|
767
|
-
/**
|
|
768
|
-
* Activity node ID.
|
|
769
|
-
*/
|
|
770
|
-
activityNodeId: string;
|
|
771
|
-
/**
|
|
772
|
-
* Activity type.
|
|
773
|
-
*/
|
|
774
|
-
activityType: string;
|
|
775
|
-
/**
|
|
776
|
-
* Incident message.
|
|
777
|
-
*/
|
|
778
|
-
message: string;
|
|
779
|
-
/**
|
|
780
|
-
* Exception (nullable).
|
|
781
|
-
*/
|
|
782
|
-
exception?: AXPExceptionState | null;
|
|
783
|
-
/**
|
|
784
|
-
* Timestamp (ISO date-time).
|
|
785
|
-
*/
|
|
786
|
-
timestamp: string;
|
|
787
|
-
}
|
|
788
|
-
/**
|
|
789
|
-
* Workflow fault state.
|
|
790
|
-
*/
|
|
791
|
-
interface AXPWorkflowFaultState {
|
|
792
|
-
/**
|
|
793
|
-
* Exception (nullable).
|
|
794
|
-
*/
|
|
795
|
-
exception?: AXPExceptionState | null;
|
|
796
|
-
/**
|
|
797
|
-
* Fault message.
|
|
798
|
-
*/
|
|
799
|
-
message: string;
|
|
800
|
-
/**
|
|
801
|
-
* Faulted activity ID (nullable).
|
|
802
|
-
*/
|
|
803
|
-
faultedActivityId?: string | null;
|
|
804
|
-
}
|
|
805
|
-
/**
|
|
806
|
-
* Bookmark.
|
|
807
|
-
*/
|
|
808
|
-
interface AXPBookmark {
|
|
809
|
-
/**
|
|
810
|
-
* Bookmark ID.
|
|
811
|
-
*/
|
|
812
|
-
id: string;
|
|
813
|
-
/**
|
|
814
|
-
* Bookmark name.
|
|
815
|
-
*/
|
|
816
|
-
name: string;
|
|
817
|
-
/**
|
|
818
|
-
* Bookmark hash.
|
|
819
|
-
*/
|
|
820
|
-
hash: string;
|
|
821
|
-
/**
|
|
822
|
-
* Bookmark payload (nullable).
|
|
823
|
-
*/
|
|
824
|
-
payload?: any | null;
|
|
825
|
-
/**
|
|
826
|
-
* Activity node ID.
|
|
827
|
-
*/
|
|
828
|
-
activityNodeId: string;
|
|
829
|
-
/**
|
|
830
|
-
* Activity instance ID.
|
|
831
|
-
*/
|
|
832
|
-
activityInstanceId: string;
|
|
833
|
-
/**
|
|
834
|
-
* Auto burn flag.
|
|
835
|
-
*/
|
|
836
|
-
autoBurn?: boolean;
|
|
837
|
-
/**
|
|
838
|
-
* Callback method name (nullable).
|
|
839
|
-
*/
|
|
840
|
-
callbackMethodName?: string | null;
|
|
841
|
-
/**
|
|
842
|
-
* Metadata (nullable).
|
|
843
|
-
*/
|
|
844
|
-
metadata?: Record<string, string> | null;
|
|
845
|
-
}
|
|
846
|
-
/**
|
|
847
|
-
* Completion callback state.
|
|
848
|
-
*/
|
|
849
|
-
interface AXPCompletionCallbackState {
|
|
850
|
-
/**
|
|
851
|
-
* Owner activity instance ID.
|
|
852
|
-
*/
|
|
853
|
-
ownerInstanceId: string;
|
|
854
|
-
/**
|
|
855
|
-
* Child activity node ID.
|
|
856
|
-
*/
|
|
857
|
-
childNodeId: string;
|
|
858
|
-
/**
|
|
859
|
-
* Method name (nullable).
|
|
860
|
-
*/
|
|
861
|
-
methodName?: string | null;
|
|
862
|
-
}
|
|
863
|
-
/**
|
|
864
|
-
* Variable (for activity context).
|
|
865
|
-
*/
|
|
866
|
-
interface AXPActivityVariable {
|
|
867
|
-
/**
|
|
868
|
-
* Variable ID.
|
|
869
|
-
*/
|
|
870
|
-
id: string;
|
|
871
|
-
/**
|
|
872
|
-
* Variable name.
|
|
873
|
-
*/
|
|
874
|
-
name: string;
|
|
875
|
-
/**
|
|
876
|
-
* Type name.
|
|
877
|
-
*/
|
|
878
|
-
typeName: string;
|
|
879
|
-
/**
|
|
880
|
-
* Is array flag.
|
|
881
|
-
*/
|
|
882
|
-
isArray?: boolean;
|
|
883
|
-
/**
|
|
884
|
-
* Variable value (nullable).
|
|
885
|
-
*/
|
|
886
|
-
value?: any | null;
|
|
887
|
-
/**
|
|
888
|
-
* Storage driver type name (nullable).
|
|
889
|
-
*/
|
|
890
|
-
storageDriverTypeName?: string | null;
|
|
891
|
-
}
|
|
892
|
-
/**
|
|
893
|
-
* Activity execution context state.
|
|
894
|
-
*/
|
|
895
|
-
interface AXPActivityExecutionContextState {
|
|
896
|
-
/**
|
|
897
|
-
* Context ID (activity instance ID).
|
|
898
|
-
*/
|
|
899
|
-
id: string;
|
|
900
|
-
/**
|
|
901
|
-
* Parent context ID (nullable).
|
|
902
|
-
*/
|
|
903
|
-
parentContextId?: string | null;
|
|
904
|
-
/**
|
|
905
|
-
* Scheduled activity node ID.
|
|
906
|
-
*/
|
|
907
|
-
scheduledActivityNodeId: string;
|
|
908
|
-
/**
|
|
909
|
-
* Owner activity node ID (nullable).
|
|
910
|
-
*/
|
|
911
|
-
ownerActivityNodeId?: string | null;
|
|
912
|
-
/**
|
|
913
|
-
* Properties bag.
|
|
914
|
-
*/
|
|
915
|
-
properties: Record<string, any>;
|
|
916
|
-
/**
|
|
917
|
-
* Activity state (evaluated properties) (nullable).
|
|
918
|
-
*/
|
|
919
|
-
activityState?: Record<string, any> | null;
|
|
920
|
-
/**
|
|
921
|
-
* Dynamic variables.
|
|
922
|
-
*/
|
|
923
|
-
dynamicVariables: AXPActivityVariable[];
|
|
924
|
-
/**
|
|
925
|
-
* Activity status.
|
|
926
|
-
*/
|
|
927
|
-
status: AXPActivityStatus;
|
|
928
|
-
/**
|
|
929
|
-
* Is executing flag.
|
|
930
|
-
*/
|
|
931
|
-
isExecuting: boolean;
|
|
932
|
-
/**
|
|
933
|
-
* Fault count.
|
|
934
|
-
*/
|
|
935
|
-
faultCount: number;
|
|
936
|
-
/**
|
|
937
|
-
* Started at timestamp (ISO date-time).
|
|
938
|
-
*/
|
|
939
|
-
startedAt: string;
|
|
940
|
-
/**
|
|
941
|
-
* Completed at timestamp (ISO date-time, nullable).
|
|
942
|
-
*/
|
|
943
|
-
completedAt?: string | null;
|
|
944
|
-
/**
|
|
945
|
-
* Tag (nullable).
|
|
946
|
-
*/
|
|
947
|
-
tag?: any | null;
|
|
948
|
-
}
|
|
949
|
-
/**
|
|
950
|
-
* Workflow state (internal execution state).
|
|
951
|
-
*/
|
|
952
|
-
interface AXPWorkflowState {
|
|
953
|
-
/**
|
|
954
|
-
* State ID.
|
|
955
|
-
*/
|
|
956
|
-
id: string;
|
|
957
|
-
/**
|
|
958
|
-
* Workflow definition ID.
|
|
959
|
-
*/
|
|
960
|
-
definitionId: string;
|
|
961
|
-
/**
|
|
962
|
-
* Workflow definition version.
|
|
963
|
-
*/
|
|
964
|
-
definitionVersion: number;
|
|
965
|
-
/**
|
|
966
|
-
* Correlation ID (nullable).
|
|
967
|
-
*/
|
|
968
|
-
correlationId?: string | null;
|
|
969
|
-
/**
|
|
970
|
-
* Workflow status.
|
|
971
|
-
*/
|
|
972
|
-
status: AXPWorkflowStatus;
|
|
973
|
-
/**
|
|
974
|
-
* Workflow sub-status.
|
|
975
|
-
*/
|
|
976
|
-
subStatus: AXPWorkflowSubStatus;
|
|
977
|
-
/**
|
|
978
|
-
* Bookmarks.
|
|
979
|
-
*/
|
|
980
|
-
bookmarks: AXPBookmark[];
|
|
981
|
-
/**
|
|
982
|
-
* Incidents.
|
|
983
|
-
*/
|
|
984
|
-
incidents: AXPActivityIncident[];
|
|
985
|
-
/**
|
|
986
|
-
* Fault (nullable).
|
|
987
|
-
*/
|
|
988
|
-
fault?: AXPWorkflowFaultState | null;
|
|
989
|
-
/**
|
|
990
|
-
* Completion callbacks.
|
|
991
|
-
*/
|
|
992
|
-
completionCallbacks: AXPCompletionCallbackState[];
|
|
993
|
-
/**
|
|
994
|
-
* Activity execution contexts.
|
|
995
|
-
*/
|
|
996
|
-
activityExecutionContexts: AXPActivityExecutionContextState[];
|
|
997
|
-
/**
|
|
998
|
-
* Input data.
|
|
999
|
-
*/
|
|
1000
|
-
input: Record<string, any>;
|
|
1001
|
-
/**
|
|
1002
|
-
* Output data.
|
|
1003
|
-
*/
|
|
1004
|
-
output: Record<string, any>;
|
|
1005
|
-
/**
|
|
1006
|
-
* Properties bag.
|
|
1007
|
-
*/
|
|
1008
|
-
properties: Record<string, any>;
|
|
1009
|
-
/**
|
|
1010
|
-
* Created at timestamp (ISO date-time).
|
|
1011
|
-
*/
|
|
1012
|
-
createdAt: string;
|
|
1013
|
-
/**
|
|
1014
|
-
* Updated at timestamp (ISO date-time).
|
|
1015
|
-
*/
|
|
1016
|
-
updatedAt: string;
|
|
1017
|
-
/**
|
|
1018
|
-
* Finished at timestamp (ISO date-time, nullable).
|
|
1019
|
-
*/
|
|
1020
|
-
finishedAt?: string | null;
|
|
1021
|
-
}
|
|
1022
|
-
/**
|
|
1023
|
-
* Workflow instance (stored in database).
|
|
1024
|
-
* This matches the Elsa Workflow Instance schema for backend compatibility.
|
|
1025
|
-
*/
|
|
1026
|
-
interface AXPWorkflowInstance {
|
|
1027
|
-
/**
|
|
1028
|
-
* Schema reference.
|
|
1029
|
-
*/
|
|
1030
|
-
$schema?: string;
|
|
1031
|
-
/**
|
|
1032
|
-
* Unique instance ID.
|
|
1033
|
-
*/
|
|
1034
|
-
id: string;
|
|
1035
|
-
/**
|
|
1036
|
-
* Workflow definition ID.
|
|
1037
|
-
*/
|
|
1038
|
-
definitionId: string;
|
|
1039
|
-
/**
|
|
1040
|
-
* Workflow definition version ID.
|
|
1041
|
-
*/
|
|
1042
|
-
definitionVersionId: string;
|
|
1043
|
-
/**
|
|
1044
|
-
* Workflow definition version number.
|
|
1045
|
-
*/
|
|
1046
|
-
version: number;
|
|
1047
|
-
/**
|
|
1048
|
-
* Parent workflow instance ID (nullable, for child workflows).
|
|
1049
|
-
*/
|
|
1050
|
-
parentWorkflowInstanceId?: string | null;
|
|
1051
|
-
/**
|
|
1052
|
-
* Workflow state (internal execution state).
|
|
1053
|
-
*/
|
|
1054
|
-
workflowState: AXPWorkflowState;
|
|
1055
|
-
/**
|
|
1056
|
-
* Workflow status.
|
|
1057
|
-
*/
|
|
1058
|
-
status: AXPWorkflowStatus;
|
|
1059
|
-
/**
|
|
1060
|
-
* Workflow sub-status.
|
|
1061
|
-
*/
|
|
1062
|
-
subStatus: AXPWorkflowSubStatus;
|
|
1063
|
-
/**
|
|
1064
|
-
* Correlation ID (nullable).
|
|
1065
|
-
*/
|
|
1066
|
-
correlationId?: string | null;
|
|
1067
|
-
/**
|
|
1068
|
-
* Instance name (nullable).
|
|
1069
|
-
*/
|
|
1070
|
-
name?: string | null;
|
|
1071
|
-
/**
|
|
1072
|
-
* Incident count.
|
|
1073
|
-
*/
|
|
1074
|
-
incidentCount: number;
|
|
1075
|
-
/**
|
|
1076
|
-
* Created at timestamp (ISO date-time).
|
|
1077
|
-
*/
|
|
1078
|
-
createdAt: string;
|
|
1079
|
-
/**
|
|
1080
|
-
* Updated at timestamp (ISO date-time).
|
|
1081
|
-
*/
|
|
1082
|
-
updatedAt: string;
|
|
1083
|
-
/**
|
|
1084
|
-
* Finished at timestamp (ISO date-time, nullable).
|
|
1085
|
-
*/
|
|
1086
|
-
finishedAt?: string | null;
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
/**
|
|
1090
|
-
* Activity Category - Extends AXPCategoryEntity for consistency and performance
|
|
1091
|
-
*
|
|
1092
|
-
* Inherited properties from AXPCategoryEntity:
|
|
1093
|
-
* - id: string - Unique identifier
|
|
1094
|
-
* - title: string - Display name
|
|
1095
|
-
* - description?: string - Category description
|
|
1096
|
-
* - parentId?: string - Parent category ID
|
|
1097
|
-
* - childrenCount: number - Direct child categories count (enables lazy loading)
|
|
1098
|
-
* - itemsCount?: number - Direct activities count
|
|
1099
|
-
* - totalChildren?: number - Total nested categories (optional, for analytics)
|
|
1100
|
-
* - totalItems?: number - Total activities in tree (optional, for analytics)
|
|
1101
|
-
*/
|
|
1102
|
-
interface AXPActivityCategory extends AXPCategoryEntity {
|
|
1103
|
-
}
|
|
1104
|
-
interface ActivityPropertyWidget {
|
|
1105
|
-
type: AXPWidgetTypesMap[keyof AXPWidgetTypesMap] | string;
|
|
1106
|
-
options?: Record<string, any>;
|
|
1107
|
-
}
|
|
1108
|
-
/**
|
|
1109
|
-
* Activity Definition - Metadata for UI and tooling.
|
|
1110
|
-
* Contains all metadata needed for displaying activities in toolbox and designer.
|
|
1111
|
-
* The `name` property is used as the command key for execution.
|
|
1112
|
-
*/
|
|
1113
|
-
interface AXPActivityDefinition {
|
|
1114
|
-
/**
|
|
1115
|
-
* Activity name - used as command key for execution.
|
|
1116
|
-
* This is the unique identifier for the activity.
|
|
1117
|
-
*/
|
|
1118
|
-
name: string;
|
|
1119
|
-
/**
|
|
1120
|
-
* Activity type (e.g., "workflow-activity:check-permission").
|
|
1121
|
-
*/
|
|
1122
|
-
type: string;
|
|
1123
|
-
/**
|
|
1124
|
-
* Display name for UI.
|
|
1125
|
-
*/
|
|
1126
|
-
title?: string;
|
|
1127
|
-
/**
|
|
1128
|
-
* Description of what the activity does.
|
|
1129
|
-
*/
|
|
1130
|
-
description?: string;
|
|
1131
|
-
/**
|
|
1132
|
-
* Category for grouping in toolbox.
|
|
1133
|
-
*/
|
|
1134
|
-
category?: string;
|
|
1135
|
-
/**
|
|
1136
|
-
* Icon name or class.
|
|
1137
|
-
*/
|
|
1138
|
-
icon?: string;
|
|
1139
|
-
/**
|
|
1140
|
-
* Where this activity should be executed.
|
|
1141
|
-
* - 'frontend': Execute in browser (UI activities, console, events)
|
|
1142
|
-
* - 'backend': Execute in backend (business logic, API calls)
|
|
1143
|
-
* - 'both': Execute in both frontend and backend (hybrid activities)
|
|
1144
|
-
*
|
|
1145
|
-
* Default: 'frontend'
|
|
1146
|
-
*/
|
|
1147
|
-
executionMode?: 'frontend' | 'backend' | 'both';
|
|
1148
|
-
/**
|
|
1149
|
-
* Input descriptors.
|
|
1150
|
-
*/
|
|
1151
|
-
inputs?: InputDescriptor[];
|
|
1152
|
-
/**
|
|
1153
|
-
* Output descriptors.
|
|
1154
|
-
*/
|
|
1155
|
-
outputs?: OutputDescriptor[];
|
|
1156
|
-
/**
|
|
1157
|
-
* Static outcomes (exit points).
|
|
1158
|
-
* Example: ['Done', 'Success', 'Failed']
|
|
1159
|
-
*/
|
|
1160
|
-
outcomes?: string[];
|
|
1161
|
-
/**
|
|
1162
|
-
* Whether this activity is browsable in the toolbox.
|
|
1163
|
-
* Default: true
|
|
1164
|
-
*/
|
|
1165
|
-
isBrowsable?: boolean;
|
|
1166
|
-
/**
|
|
1167
|
-
* Whether this activity is a container (can have children).
|
|
1168
|
-
* Default: false
|
|
1169
|
-
*/
|
|
1170
|
-
isContainer?: boolean;
|
|
1171
|
-
}
|
|
1172
|
-
/**
|
|
1173
|
-
* Activity - Command with specific TResult structure.
|
|
1174
|
-
* Extends AXPCommand with a fixed TResult that includes output and outcomes.
|
|
1175
|
-
* No additional properties beyond AXPCommand - pure command interface.
|
|
1176
|
-
*/
|
|
1177
|
-
interface AXPActivity<TInput = any, TOutput = any> extends AXPCommand<TInput, {
|
|
1178
|
-
output: TOutput;
|
|
1179
|
-
outcomes: Record<string, any>;
|
|
1180
|
-
}> {
|
|
1181
|
-
/**
|
|
1182
|
-
* Execute the activity as a command.
|
|
1183
|
-
* @param input - Activity input data
|
|
1184
|
-
* @returns Promise with output and outcomes
|
|
1185
|
-
*/
|
|
1186
|
-
execute(input: TInput): AXPExecuteCommandResultPromise<{
|
|
1187
|
-
output: TOutput;
|
|
1188
|
-
outcomes: Record<string, any>;
|
|
1189
|
-
}>;
|
|
1190
|
-
}
|
|
1191
|
-
/**
|
|
1192
|
-
* Input property descriptor.
|
|
1193
|
-
* Similar to AXPEntityProperty structure.
|
|
1194
|
-
*/
|
|
1195
|
-
interface InputDescriptor {
|
|
1196
|
-
name: string;
|
|
1197
|
-
title: string;
|
|
1198
|
-
description?: string;
|
|
1199
|
-
schema: {
|
|
1200
|
-
dataType: string;
|
|
1201
|
-
nullable?: boolean;
|
|
1202
|
-
readonly?: boolean;
|
|
1203
|
-
hidden?: boolean | string;
|
|
1204
|
-
defaultValue?: any | string | ((context: any | null) => any);
|
|
1205
|
-
interface?: ActivityPropertyWidget;
|
|
1206
|
-
};
|
|
1207
|
-
validations?: AXPValidationRules;
|
|
1208
|
-
}
|
|
1209
|
-
/**
|
|
1210
|
-
* Output property descriptor.
|
|
1211
|
-
*/
|
|
1212
|
-
interface OutputDescriptor {
|
|
1213
|
-
name: string;
|
|
1214
|
-
title: string;
|
|
1215
|
-
description?: string;
|
|
1216
|
-
schema: {
|
|
1217
|
-
dataType: string;
|
|
1218
|
-
};
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
type AXPActivityProviderToken = AXPActivityProvider | Promise<AXPActivityProvider>;
|
|
1222
|
-
declare const AXP_ACTIVITY_PROVIDER: InjectionToken<AXPActivityProviderToken[]>;
|
|
1223
|
-
interface AXPActivityProvider {
|
|
1224
|
-
/**
|
|
1225
|
-
* Get list of activity definitions for a category.
|
|
1226
|
-
* @param categoryId - Category ID to filter activities
|
|
1227
|
-
* @returns Promise of activity definitions array
|
|
1228
|
-
*/
|
|
1229
|
-
getList(categoryId: string): Promise<AXPActivityDefinition[]>;
|
|
1230
|
-
/**
|
|
1231
|
-
* Get activity definition by name (unique identifier).
|
|
1232
|
-
* The name is used as the command key for execution.
|
|
1233
|
-
* @param name - Activity name (unique identifier and command key)
|
|
1234
|
-
* @returns Promise of activity definition or undefined if not found
|
|
1235
|
-
*/
|
|
1236
|
-
getById(name: string): Promise<AXPActivityDefinition | undefined>;
|
|
1237
|
-
}
|
|
1238
|
-
type AXPActivityCategoryProviderToken = AXPActivityCategoryProvider | Promise<AXPActivityCategoryProvider>;
|
|
1239
|
-
declare const AXP_ACTIVITY_CATEGORY_PROVIDER: InjectionToken<AXPActivityCategoryProviderToken[]>;
|
|
1240
|
-
interface AXPActivityCategoryProvider {
|
|
1241
|
-
getList(parentId?: string): Promise<AXPActivityCategory[]>;
|
|
1242
|
-
getById(id: string): Promise<AXPActivityCategory | undefined>;
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
/**
|
|
1246
|
-
* Optimized Activity Definition Service
|
|
1247
|
-
*
|
|
1248
|
-
* Manages activity definitions (metadata) for UI and tooling.
|
|
1249
|
-
* Similar to AXPReportDefinitionService - only handles metadata, not execution.
|
|
1250
|
-
*
|
|
1251
|
-
* Performance optimizations:
|
|
1252
|
-
* 1. Uses childrenCount to determine if category has children (no query needed)
|
|
1253
|
-
* 2. Uses itemsCount to determine if category has activities (no query needed)
|
|
1254
|
-
* 3. Aggressive caching prevents duplicate API calls
|
|
1255
|
-
* 4. Single pending request per resource prevents race conditions
|
|
1256
|
-
* 5. Lazy loading - only loads data when needed
|
|
1257
|
-
*/
|
|
1258
|
-
declare class AXPActivityDefinitionService {
|
|
1259
|
-
private readonly categoryProviders;
|
|
1260
|
-
private readonly activityProviders;
|
|
1261
|
-
/** Cache for categories by id - O(1) lookup */
|
|
1262
|
-
private categoriesById;
|
|
1263
|
-
/** Cache for categories by parentId - O(1) lookup */
|
|
1264
|
-
private categoriesByParentId;
|
|
1265
|
-
/** Cache for activity definitions by categoryId - O(1) lookup */
|
|
1266
|
-
private activitiesByCategory;
|
|
1267
|
-
/** Cache for individual activity definitions by name - O(1) lookup */
|
|
1268
|
-
private activitiesByName;
|
|
1269
|
-
/** Track which provider index owns each category (by category ID) */
|
|
1270
|
-
private categoryOwnership;
|
|
1271
|
-
/** Pending API requests to prevent duplicate calls */
|
|
1272
|
-
private pendingCategoriesRequests;
|
|
1273
|
-
private pendingActivitiesRequests;
|
|
1274
|
-
private pendingActivityRequests;
|
|
1275
|
-
/**
|
|
1276
|
-
* Get categories by parentId with aggressive caching
|
|
1277
|
-
*
|
|
1278
|
-
* Optimization: Returns cached result immediately if available,
|
|
1279
|
-
* preventing unnecessary API calls during navigation
|
|
1280
|
-
*
|
|
1281
|
-
* @param parentId - Parent category ID (undefined = root categories)
|
|
1282
|
-
* @returns Array of categories with count metadata (childrenCount, itemsCount)
|
|
1283
|
-
*/
|
|
1284
|
-
getCategories(parentId?: string): Promise<AXPActivityCategory[]>;
|
|
1285
|
-
/**
|
|
1286
|
-
* Get single category by ID with O(1) lookup
|
|
1287
|
-
*
|
|
1288
|
-
* Optimization: Uses Map for instant retrieval, falls back to
|
|
1289
|
-
* searching cache, then providers if not found
|
|
1290
|
-
*/
|
|
1291
|
-
getCategoryById(categoryId: string): Promise<AXPActivityCategory | undefined>;
|
|
1292
|
-
/**
|
|
1293
|
-
* Get category path from root to specified category
|
|
1294
|
-
*
|
|
1295
|
-
* Optimization: Builds path using cached categories only
|
|
1296
|
-
*/
|
|
1297
|
-
getCategoriesPathById(categoryId: string): Promise<AXPActivityCategory[]>;
|
|
1298
|
-
/**
|
|
1299
|
-
* Get activity definitions for a category with smart caching
|
|
1300
|
-
*
|
|
1301
|
-
* Optimization: Checks itemsCount before querying
|
|
1302
|
-
* - If itemsCount = 0, returns empty array (no API call)
|
|
1303
|
-
* - If itemsCount > 0, loads and caches activity definitions
|
|
1304
|
-
* - Returns cached result on subsequent calls
|
|
1305
|
-
*
|
|
1306
|
-
* @param categoryId - Category ID to get activity definitions from
|
|
1307
|
-
* @returns Array of activity definitions
|
|
1308
|
-
*/
|
|
1309
|
-
getActivitiesByCategoryId(categoryId: string): Promise<AXPActivityDefinition[]>;
|
|
1310
|
-
/**
|
|
1311
|
-
* Get single activity definition by name with O(1) lookup
|
|
1312
|
-
*
|
|
1313
|
-
* Optimization: Uses Map for instant retrieval
|
|
1314
|
-
*
|
|
1315
|
-
* @param name - Activity name (unique identifier and command key)
|
|
1316
|
-
* @returns Activity definition or undefined if not found
|
|
1317
|
-
*/
|
|
1318
|
-
getActivityByName(name: string): Promise<AXPActivityDefinition | undefined>;
|
|
1319
|
-
/**
|
|
1320
|
-
* Get category ID containing a specific activity definition
|
|
1321
|
-
*
|
|
1322
|
-
* Optimization: Searches cache first, loads on-demand if needed
|
|
1323
|
-
*/
|
|
1324
|
-
getCategoryIdByActivityName(activityName: string): Promise<string | undefined>;
|
|
1325
|
-
/**
|
|
1326
|
-
* Get category path for an activity
|
|
1327
|
-
*/
|
|
1328
|
-
getCategoriesPathByActivityName(activityName: string): Promise<AXPActivityCategory[]>;
|
|
1329
|
-
/**
|
|
1330
|
-
* Load categories from providers and cache results
|
|
1331
|
-
*
|
|
1332
|
-
* Optimization: Tracks provider ownership to avoid unnecessary API calls
|
|
1333
|
-
* - For root (parentId = undefined): Query ALL providers
|
|
1334
|
-
* - For children: Only query the provider that owns the parent
|
|
1335
|
-
*/
|
|
1336
|
-
private loadCategoriesFromProviders;
|
|
1337
|
-
/**
|
|
1338
|
-
* Get the provider index that owns a specific category
|
|
1339
|
-
*
|
|
1340
|
-
* @returns Array with provider index, or null if ownership unknown (query all)
|
|
1341
|
-
*/
|
|
1342
|
-
private getProviderIndexForCategory;
|
|
1343
|
-
/**
|
|
1344
|
-
* Load activity definitions from providers and cache results
|
|
1345
|
-
*
|
|
1346
|
-
* Optimization: Only queries the provider that owns the category
|
|
1347
|
-
* Uses provider INDEX to match category provider with activity provider
|
|
1348
|
-
*/
|
|
1349
|
-
private loadActivitiesFromProviders;
|
|
1350
|
-
/**
|
|
1351
|
-
* Load single activity definition from providers and cache result
|
|
1352
|
-
*/
|
|
1353
|
-
private loadActivityFromProviders;
|
|
1354
|
-
/**
|
|
1355
|
-
* Breadth-first search through category hierarchy
|
|
1356
|
-
*/
|
|
1357
|
-
private searchCategoryInHierarchy;
|
|
1358
|
-
/**
|
|
1359
|
-
* Check if category has children (uses cached count)
|
|
1360
|
-
*/
|
|
1361
|
-
categoryHasChildren(categoryId: string): boolean;
|
|
1362
|
-
/**
|
|
1363
|
-
* Check if category has activities (uses cached count)
|
|
1364
|
-
*/
|
|
1365
|
-
categoryHasActivities(categoryId: string): boolean;
|
|
1366
|
-
/**
|
|
1367
|
-
* Clear all caches
|
|
1368
|
-
*/
|
|
1369
|
-
clearAllCache(): void;
|
|
1370
|
-
/**
|
|
1371
|
-
* Clear categories cache only
|
|
1372
|
-
*/
|
|
1373
|
-
clearCategoriesCache(): void;
|
|
1374
|
-
/**
|
|
1375
|
-
* Clear activities cache only
|
|
1376
|
-
*/
|
|
1377
|
-
clearActivitiesCache(): void;
|
|
1378
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPActivityDefinitionService, never>;
|
|
1379
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPActivityDefinitionService>;
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
/**
|
|
1383
|
-
* Types and interfaces for Workflow Execution Service.
|
|
1384
|
-
*/
|
|
1385
|
-
|
|
1386
|
-
/**
|
|
1387
|
-
* Represents a workflow task that needs to be executed.
|
|
1388
|
-
* Inspired by Temporal's Activity Tasks and Camunda's External Tasks.
|
|
1389
|
-
*/
|
|
1390
|
-
interface AXPWorkflowTask {
|
|
1391
|
-
/**
|
|
1392
|
-
* Unique token for this task (used for completion/security).
|
|
1393
|
-
*/
|
|
1394
|
-
taskToken: string;
|
|
1395
|
-
/**
|
|
1396
|
-
* Activity ID from workflow definition.
|
|
1397
|
-
*/
|
|
1398
|
-
activityId: string;
|
|
1399
|
-
/**
|
|
1400
|
-
* Activity type (e.g., 'workflow-activity:show-toast').
|
|
1401
|
-
*/
|
|
1402
|
-
activityType: string;
|
|
1403
|
-
/**
|
|
1404
|
-
* Human-readable activity name.
|
|
1405
|
-
*/
|
|
1406
|
-
activityName?: string;
|
|
1407
|
-
/**
|
|
1408
|
-
* Where this task should be executed.
|
|
1409
|
-
* - 'frontend': Execute in browser (UI activities, console, events)
|
|
1410
|
-
* - 'backend': Execute in backend (business logic, API calls)
|
|
1411
|
-
* - 'both': Execute in both frontend and backend (hybrid activities)
|
|
1412
|
-
*/
|
|
1413
|
-
executionMode: 'frontend' | 'backend' | 'both';
|
|
1414
|
-
/**
|
|
1415
|
-
* Input data for the activity (for frontend activities).
|
|
1416
|
-
*/
|
|
1417
|
-
input?: Record<string, any>;
|
|
1418
|
-
/**
|
|
1419
|
-
* Configuration for the activity (for frontend activities).
|
|
1420
|
-
*/
|
|
1421
|
-
config?: Record<string, any>;
|
|
1422
|
-
}
|
|
1423
|
-
/**
|
|
1424
|
-
* Request to start a workflow execution.
|
|
1425
|
-
*/
|
|
1426
|
-
interface AXPStartWorkflowExecutionRequest {
|
|
1427
|
-
/**
|
|
1428
|
-
* Workflow ID to execute.
|
|
1429
|
-
*/
|
|
1430
|
-
workflowId: string;
|
|
1431
|
-
/**
|
|
1432
|
-
* Initial input data for workflow.
|
|
1433
|
-
*/
|
|
1434
|
-
input: Record<string, any>;
|
|
1435
|
-
}
|
|
1436
|
-
/**
|
|
1437
|
-
* Response after starting workflow execution.
|
|
1438
|
-
*/
|
|
1439
|
-
interface AXPStartWorkflowExecutionResponse {
|
|
1440
|
-
/**
|
|
1441
|
-
* Unique execution ID for this workflow run.
|
|
1442
|
-
*/
|
|
1443
|
-
executionId: string;
|
|
1444
|
-
/**
|
|
1445
|
-
* Current workflow state.
|
|
1446
|
-
*/
|
|
1447
|
-
state: AXPWorkflowExecutionState;
|
|
1448
|
-
/**
|
|
1449
|
-
* First task to execute (determined by backend).
|
|
1450
|
-
* Client should execute this task based on executionMode.
|
|
1451
|
-
*/
|
|
1452
|
-
pendingTask?: AXPWorkflowTask | null;
|
|
1453
|
-
}
|
|
1454
|
-
/**
|
|
1455
|
-
* Request to resume a suspended workflow.
|
|
1456
|
-
*/
|
|
1457
|
-
interface AXPResumeWorkflowExecutionRequest {
|
|
1458
|
-
/**
|
|
1459
|
-
* Execution ID.
|
|
1460
|
-
*/
|
|
1461
|
-
executionId: string;
|
|
1462
|
-
/**
|
|
1463
|
-
* Step ID that was waiting for user input.
|
|
1464
|
-
*/
|
|
1465
|
-
stepId: string;
|
|
1466
|
-
/**
|
|
1467
|
-
* Secure task token issued with the pending task.
|
|
1468
|
-
* Backend validates and resolves the step using this token.
|
|
1469
|
-
*/
|
|
1470
|
-
taskToken: string;
|
|
1471
|
-
/**
|
|
1472
|
-
* User action outcome (e.g., 'Confirmed', 'Cancelled').
|
|
1473
|
-
*/
|
|
1474
|
-
outcome: string;
|
|
1475
|
-
/**
|
|
1476
|
-
* Optional user input data.
|
|
1477
|
-
*/
|
|
1478
|
-
userInput?: any;
|
|
1479
|
-
}
|
|
1480
|
-
/**
|
|
1481
|
-
* Response after resuming workflow.
|
|
1482
|
-
*/
|
|
1483
|
-
interface AXPResumeWorkflowExecutionResponse {
|
|
1484
|
-
/**
|
|
1485
|
-
* Activity execution output.
|
|
1486
|
-
*/
|
|
1487
|
-
output: any;
|
|
1488
|
-
/**
|
|
1489
|
-
* Activity execution outcomes.
|
|
1490
|
-
*/
|
|
1491
|
-
outcomes: Record<string, any>;
|
|
1492
|
-
/**
|
|
1493
|
-
* Next task to execute (if any).
|
|
1494
|
-
*/
|
|
1495
|
-
nextTask?: AXPWorkflowTask | null;
|
|
1496
|
-
/**
|
|
1497
|
-
* Updated workflow state.
|
|
1498
|
-
*/
|
|
1499
|
-
state: AXPWorkflowExecutionState;
|
|
1500
|
-
}
|
|
1501
|
-
/**
|
|
1502
|
-
* Request to get workflow execution state.
|
|
1503
|
-
*/
|
|
1504
|
-
interface AXPGetWorkflowExecutionStateRequest {
|
|
1505
|
-
/**
|
|
1506
|
-
* Execution ID.
|
|
1507
|
-
*/
|
|
1508
|
-
executionId: string;
|
|
1509
|
-
}
|
|
1510
|
-
/**
|
|
1511
|
-
* Request to get workflow definition.
|
|
1512
|
-
*/
|
|
1513
|
-
interface AXPGetWorkflowDefinitionRequest {
|
|
1514
|
-
/**
|
|
1515
|
-
* Workflow ID or definition ID.
|
|
1516
|
-
*/
|
|
1517
|
-
workflowId: string;
|
|
1518
|
-
}
|
|
1519
|
-
/**
|
|
1520
|
-
* Response with workflow definition.
|
|
1521
|
-
*/
|
|
1522
|
-
interface AXPGetWorkflowDefinitionResponse {
|
|
1523
|
-
/**
|
|
1524
|
-
* Workflow definition.
|
|
1525
|
-
*/
|
|
1526
|
-
workflow: AXPWorkflowDefinition;
|
|
1527
|
-
}
|
|
1528
|
-
/**
|
|
1529
|
-
* Workflow execution state (managed by backend, cached in client).
|
|
1530
|
-
*/
|
|
1531
|
-
interface AXPWorkflowExecutionState {
|
|
1532
|
-
/**
|
|
1533
|
-
* Unique execution ID.
|
|
1534
|
-
*/
|
|
1535
|
-
executionId: string;
|
|
1536
|
-
/**
|
|
1537
|
-
* Workflow ID.
|
|
1538
|
-
*/
|
|
1539
|
-
workflowId: string;
|
|
1540
|
-
/**
|
|
1541
|
-
* Current execution status.
|
|
1542
|
-
*/
|
|
1543
|
-
status: 'running' | 'completed' | 'suspended' | 'error';
|
|
1544
|
-
/**
|
|
1545
|
-
* Current step ID (if suspended or running).
|
|
1546
|
-
*/
|
|
1547
|
-
currentStepId?: string;
|
|
1548
|
-
/**
|
|
1549
|
-
* Workflow variables (state).
|
|
1550
|
-
*/
|
|
1551
|
-
variables: Record<string, any>;
|
|
1552
|
-
/**
|
|
1553
|
-
* Initial input data.
|
|
1554
|
-
*/
|
|
1555
|
-
input: Record<string, any>;
|
|
1556
|
-
/**
|
|
1557
|
-
* Final output data (if completed).
|
|
1558
|
-
*/
|
|
1559
|
-
output?: Record<string, any>;
|
|
1560
|
-
/**
|
|
1561
|
-
* Last update timestamp.
|
|
1562
|
-
*/
|
|
1563
|
-
lastUpdated: Date;
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1566
|
-
/**
|
|
1567
|
-
* Workflow execution result.
|
|
1568
|
-
*/
|
|
1569
|
-
interface WorkflowExecutionResult {
|
|
1570
|
-
success: boolean;
|
|
1571
|
-
output?: any;
|
|
1572
|
-
error?: string;
|
|
1573
|
-
nextTask?: AXPWorkflowTask | null;
|
|
1574
|
-
executionId?: string;
|
|
1575
|
-
state?: AXPWorkflowExecutionState;
|
|
1576
|
-
}
|
|
1577
|
-
/**
|
|
1578
|
-
* Production Workflow Coordinator.
|
|
1579
|
-
*
|
|
1580
|
-
* Separates frontend/backend execution:
|
|
1581
|
-
* - Frontend activities: Execute with AXPCommand in browser
|
|
1582
|
-
* - Backend activities: Execute via API calls to backend
|
|
1583
|
-
* - State caching: Caches workflow state in client for performance
|
|
1584
|
-
*
|
|
1585
|
-
*/
|
|
1586
|
-
declare class WorkflowCoordinator {
|
|
1587
|
-
private readonly workflowExecutionService;
|
|
1588
|
-
private readonly commandService;
|
|
1589
|
-
/**
|
|
1590
|
-
* Cache workflow states in memory for quick access.
|
|
1591
|
-
* Key: executionId
|
|
1592
|
-
* Value: AXPWorkflowExecutionState
|
|
1593
|
-
*/
|
|
1594
|
-
private stateCache;
|
|
1595
|
-
/**
|
|
1596
|
-
* Start workflow execution in backend.
|
|
1597
|
-
*
|
|
1598
|
-
* Backend decides what to do: returns pendingTask or indicates completion.
|
|
1599
|
-
* Frontend only calls API - no business logic here.
|
|
1600
|
-
*
|
|
1601
|
-
* @param workflowId - Workflow ID
|
|
1602
|
-
* @param input - Initial input data
|
|
1603
|
-
* @returns Execution result with pendingTask (if any)
|
|
1604
|
-
*
|
|
1605
|
-
* @example
|
|
1606
|
-
* ```typescript
|
|
1607
|
-
* const result = await coordinator.startWorkflow('my-workflow', { userId: '123' });
|
|
1608
|
-
*
|
|
1609
|
-
* if (result.pendingTask) {
|
|
1610
|
-
* // Execute task if frontend, or wait for backend to complete
|
|
1611
|
-
* if (result.pendingTask.executionMode === 'frontend') {
|
|
1612
|
-
* await coordinator.executeTask(result.pendingTask);
|
|
1613
|
-
* await coordinator.completeTask(result.executionId, result.pendingTask, outcome, output);
|
|
1614
|
-
* }
|
|
1615
|
-
* }
|
|
1616
|
-
* ```
|
|
1617
|
-
*/
|
|
1618
|
-
startWorkflow(workflowId: string, input?: Record<string, any>): Promise<WorkflowExecutionResult>;
|
|
1619
|
-
/**
|
|
1620
|
-
* Execute a frontend task using AXPCommand.
|
|
1621
|
-
*
|
|
1622
|
-
* Only executes if task.executionMode is 'frontend' or 'both'.
|
|
1623
|
-
* Backend tasks are handled automatically by backend.
|
|
1624
|
-
*
|
|
1625
|
-
* @param task - Task to execute
|
|
1626
|
-
* @returns Execution result with output and outcome
|
|
1627
|
-
*/
|
|
1628
|
-
executeTask(task: AXPWorkflowTask): Promise<{
|
|
1629
|
-
output: any;
|
|
1630
|
-
outcome: string;
|
|
1631
|
-
}>;
|
|
1632
|
-
/**
|
|
1633
|
-
* Complete a task and get next task from backend.
|
|
1634
|
-
*
|
|
1635
|
-
* Sends task result to backend API.
|
|
1636
|
-
* Backend decides: next task, fail, or complete workflow.
|
|
1637
|
-
*
|
|
1638
|
-
* @param executionId - Execution ID
|
|
1639
|
-
* @param task - Completed task
|
|
1640
|
-
* @param outcome - Task outcome (e.g., 'Done', 'Confirmed', 'Cancelled')
|
|
1641
|
-
* @param output - Task output/result
|
|
1642
|
-
* @returns Next task from backend (if any)
|
|
1643
|
-
*/
|
|
1644
|
-
completeTask(executionId: string, task: AXPWorkflowTask, outcome: string, output?: any): Promise<WorkflowExecutionResult>;
|
|
1645
|
-
/**
|
|
1646
|
-
* Execute workflow by ID (backward compatibility).
|
|
1647
|
-
*
|
|
1648
|
-
* @deprecated Use startWorkflow + executeTask + completeTask pattern instead.
|
|
1649
|
-
* This method is kept for backward compatibility but will be removed.
|
|
1650
|
-
*/
|
|
1651
|
-
executeWorkflowById(workflowId: string, input?: Record<string, any>): Promise<WorkflowExecutionResult>;
|
|
1652
|
-
/**
|
|
1653
|
-
* Resume a suspended workflow (e.g., after user interaction).
|
|
1654
|
-
*
|
|
1655
|
-
* Backend determines nextStep based on outcome and outcomeConnections.
|
|
1656
|
-
* Client only provides executionId, stepId, outcome, and optional userInput.
|
|
1657
|
-
*
|
|
1658
|
-
* @param executionId - Workflow execution ID
|
|
1659
|
-
* @param stepId - Step ID that was waiting for user input
|
|
1660
|
-
* @param outcome - User action outcome (e.g., 'Confirmed', 'Cancelled', 'Submitted')
|
|
1661
|
-
* @param userInput - Optional user input data
|
|
1662
|
-
*/
|
|
1663
|
-
resumeWorkflow(executionId: string, stepId: string, outcome: string, userInput?: any, taskToken?: string): Promise<WorkflowExecutionResult>;
|
|
1664
|
-
/**
|
|
1665
|
-
* Get workflow execution state (from cache or backend).
|
|
1666
|
-
*/
|
|
1667
|
-
getWorkflowState(executionId: string): Promise<AXPWorkflowExecutionState | null>;
|
|
1668
|
-
/**
|
|
1669
|
-
* Execute a frontend activity using CommandBus.
|
|
1670
|
-
*
|
|
1671
|
-
* Frontend activities are executed in the browser using AXPCommandService.
|
|
1672
|
-
* Activities can also be executed in both frontend and backend (hybrid mode).
|
|
1673
|
-
*
|
|
1674
|
-
* @param task - Frontend task to execute
|
|
1675
|
-
* @returns Execution result with output and outcome
|
|
1676
|
-
*/
|
|
1677
|
-
private executeFrontendActivity;
|
|
1678
|
-
/**
|
|
1679
|
-
* Start workflow execution in backend.
|
|
1680
|
-
* Backend returns executionId, initial state, and first task to execute.
|
|
1681
|
-
*/
|
|
1682
|
-
private startWorkflowExecution;
|
|
1683
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<WorkflowCoordinator, never>;
|
|
1684
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<WorkflowCoordinator>;
|
|
1685
|
-
}
|
|
1686
|
-
|
|
1687
|
-
/**
|
|
1688
|
-
* Abstract service for workflow execution operations.
|
|
1689
|
-
*
|
|
1690
|
-
* This service handles communication with backend for workflow execution.
|
|
1691
|
-
*
|
|
1692
|
-
* Implementation should be provided in connectivity layer:
|
|
1693
|
-
* - Mock implementation: @acorex/connectivity/mock
|
|
1694
|
-
* - API implementation: @acorex/connectivity/api
|
|
1695
|
-
*
|
|
1696
|
-
* @example
|
|
1697
|
-
* ```typescript
|
|
1698
|
-
* // In connectivity/mock
|
|
1699
|
-
* @Injectable()
|
|
1700
|
-
* export class AXCWorkflowExecutionService implements AXPWorkflowExecutionService {
|
|
1701
|
-
* async startExecution(request: AXPStartWorkflowExecutionRequest): Promise<AXPStartWorkflowExecutionResponse> {
|
|
1702
|
-
* // Mock implementation
|
|
1703
|
-
* }
|
|
1704
|
-
* }
|
|
1705
|
-
*
|
|
1706
|
-
* // In connectivity/api
|
|
1707
|
-
* @Injectable()
|
|
1708
|
-
* export class AXCWorkflowExecutionService implements AXPWorkflowExecutionService {
|
|
1709
|
-
* constructor(private http: HttpClient) {}
|
|
1710
|
-
*
|
|
1711
|
-
* async startExecution(request: AXPStartWorkflowExecutionRequest): Promise<AXPStartWorkflowExecutionResponse> {
|
|
1712
|
-
* return firstValueFrom(
|
|
1713
|
-
* this.http.post<AXPStartWorkflowExecutionResponse>(
|
|
1714
|
-
* `${this.config.baseUrl}/api/workflows/${request.workflowId}/start`,
|
|
1715
|
-
* { input: request.input }
|
|
1716
|
-
* )
|
|
1717
|
-
* );
|
|
1718
|
-
* }
|
|
1719
|
-
* }
|
|
1720
|
-
* ```
|
|
1721
|
-
*/
|
|
1722
|
-
declare abstract class AXPWorkflowExecutionService {
|
|
1723
|
-
/**
|
|
1724
|
-
* Start a new workflow execution.
|
|
1725
|
-
*
|
|
1726
|
-
* Creates a new workflow execution instance in backend and returns execution ID.
|
|
1727
|
-
*
|
|
1728
|
-
* @param request - Start execution request
|
|
1729
|
-
* @returns Execution response with executionId and initial state
|
|
1730
|
-
*
|
|
1731
|
-
* @example
|
|
1732
|
-
* ```typescript
|
|
1733
|
-
* const response = await workflowExecutionService.startExecution({
|
|
1734
|
-
* workflowId: 'my-workflow',
|
|
1735
|
-
* input: { userId: '123', action: 'create' }
|
|
1736
|
-
* });
|
|
1737
|
-
*
|
|
1738
|
-
* console.log('Execution ID:', response.executionId);
|
|
1739
|
-
* console.log('Initial State:', response.state);
|
|
1740
|
-
* ```
|
|
1741
|
-
*/
|
|
1742
|
-
abstract startExecution(request: AXPStartWorkflowExecutionRequest): Promise<AXPStartWorkflowExecutionResponse>;
|
|
1743
|
-
/**
|
|
1744
|
-
* Resume a suspended workflow execution.
|
|
1745
|
-
*
|
|
1746
|
-
* Resumes workflow execution after user interaction (e.g., after show-dialog).
|
|
1747
|
-
*
|
|
1748
|
-
* @param request - Resume execution request
|
|
1749
|
-
* @returns Resume response with next step and updated state
|
|
1750
|
-
*
|
|
1751
|
-
* @example
|
|
1752
|
-
* ```typescript
|
|
1753
|
-
* const response = await workflowExecutionService.resumeExecution({
|
|
1754
|
-
* executionId: 'exec-123',
|
|
1755
|
-
* stepId: 'step-dialog-1',
|
|
1756
|
-
* taskToken: 'sec-task-token',
|
|
1757
|
-
* outcome: 'Confirmed',
|
|
1758
|
-
* userInput: { confirmed: true }
|
|
1759
|
-
* });
|
|
1760
|
-
*
|
|
1761
|
-
* console.log('Next Step:', response.nextStep);
|
|
1762
|
-
* console.log('Updated State:', response.state);
|
|
1763
|
-
* ```
|
|
1764
|
-
*/
|
|
1765
|
-
abstract resumeExecution(request: AXPResumeWorkflowExecutionRequest): Promise<AXPResumeWorkflowExecutionResponse>;
|
|
1766
|
-
/**
|
|
1767
|
-
* Get current workflow execution state.
|
|
1768
|
-
*
|
|
1769
|
-
* Retrieves current state of a workflow execution from backend.
|
|
1770
|
-
*
|
|
1771
|
-
* @param request - Get state request
|
|
1772
|
-
* @returns Current workflow execution state
|
|
1773
|
-
*
|
|
1774
|
-
* @example
|
|
1775
|
-
* ```typescript
|
|
1776
|
-
* const state = await workflowExecutionService.getExecutionState({
|
|
1777
|
-
* executionId: 'exec-123'
|
|
1778
|
-
* });
|
|
1779
|
-
*
|
|
1780
|
-
* console.log('Status:', state.status);
|
|
1781
|
-
* console.log('Variables:', state.variables);
|
|
1782
|
-
* ```
|
|
1783
|
-
*/
|
|
1784
|
-
abstract getExecutionState(request: AXPGetWorkflowExecutionStateRequest): Promise<AXPWorkflowExecutionState>;
|
|
1785
|
-
/**
|
|
1786
|
-
* Get workflow definition by ID.
|
|
1787
|
-
*
|
|
1788
|
-
* Retrieves workflow definition from backend.
|
|
1789
|
-
*
|
|
1790
|
-
* @param request - Get workflow definition request
|
|
1791
|
-
* @returns Workflow definition in executable format
|
|
1792
|
-
*
|
|
1793
|
-
* @example
|
|
1794
|
-
* ```typescript
|
|
1795
|
-
* const response = await workflowExecutionService.getWorkflowDefinition({
|
|
1796
|
-
* workflowId: 'my-workflow'
|
|
1797
|
-
* });
|
|
1798
|
-
*
|
|
1799
|
-
* console.log('Workflow:', response.workflow);
|
|
1800
|
-
* ```
|
|
1801
|
-
*/
|
|
1802
|
-
abstract getWorkflowDefinition(request: AXPGetWorkflowDefinitionRequest): Promise<AXPGetWorkflowDefinitionResponse>;
|
|
1803
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowExecutionService, never>;
|
|
1804
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowExecutionService>;
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
|
-
export { AXPActivityDefinitionService, AXPWorkflowAction, AXPWorkflowContext, AXPWorkflowDefinitionRegistryService, AXPWorkflowDefinitionResolver, AXPWorkflowError, AXPWorkflowEventService, AXPWorkflowExecutionService, AXPWorkflowFunction, AXPWorkflowModule, AXPWorkflowRegistryService, AXPWorkflowService, AXP_ACTIVITY_CATEGORY_PROVIDER, AXP_ACTIVITY_PROVIDER, AXP_WORKFLOW_DEFINITION_LOADER, WorkflowCoordinator, createWorkFlowEvent, ofType };
|
|
1808
|
-
export type { AXPActivity, AXPActivityCategory, AXPActivityCategoryProvider, AXPActivityCategoryProviderToken, AXPActivityDefinition, AXPActivityExecutionContextState, AXPActivityIncident, AXPActivityProvider, AXPActivityProviderToken, 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, AXPActivity$1 as AXPWorkflowActivity, AXPWorkflowCondition, AXPWorkflowConditionType, AXPWorkflowDefinition, AXPWorkflowDefinitionJson, AXPWorkflowDefinitionLoader, AXPWorkflowDefinitionPreloader, AXPWorkflowEvent, AXPWorkflowExecutionState, AXPWorkflowFaultState, AXPWorkflowInputDefinition, AXPWorkflowInstance, AXPWorkflowModuleConfigs, AXPWorkflowNextStep, AXPWorkflowOptions, AXPWorkflowOutputDefinition, AXPWorkflowState, AXPWorkflowStatus, AXPWorkflowStep, AXPWorkflowSubStatus, AXPWorkflowTask, ActivityPropertyWidget, InputDescriptor, OutputDescriptor, WorkflowExecutionResult };
|