@acorex-platform/module-workflow-management-client 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/acorex-platform-module-workflow-management-client-acorex-platform-module-workflow-management-client-B_Sl7G2v.mjs +4990 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-acorex-platform-module-workflow-management-client-B_Sl7G2v.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-activity-command-configurator-widget-column.component-BPa0Sh6Z.mjs +57 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-activity-command-configurator-widget-column.component-BPa0Sh6Z.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-activity-command-configurator-widget-edit.component-DuYGXzAL.mjs +482 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-activity-command-configurator-widget-edit.component-DuYGXzAL.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts.mjs +163 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-execute-workflow-with-input.command-BFdyJ4rC.mjs +127 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-execute-workflow-with-input.command-BFdyJ4rC.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-execute-workflow.command-Cfdm1QAy.mjs +142 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-execute-workflow.command-Cfdm1QAy.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-index-C8nsbDAw.mjs +142 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-index-C8nsbDAw.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-index-CttfExOC.mjs +417 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-index-CttfExOC.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-index-DKZTLui4.mjs +1329 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-index-DKZTLui4.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-save-workflow-definition-activities.command-spFF77AO.mjs +60 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-save-workflow-definition-activities.command-spFF77AO.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-activity-instance-rows.utils-CMVZYS4y.mjs +172 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-activity-instance-rows.utils-CMVZYS4y.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-configurator-widget-column.component-D0E2zjIA.mjs +81 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-configurator-widget-column.component-D0E2zjIA.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-configurator-widget-edit.component-CVTeOv-q.mjs +538 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-configurator-widget-edit.component-CVTeOv-q.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-live-dashboard.queries--9NtYkau.mjs +218 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-live-dashboard.queries--9NtYkau.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-run-history-popup.component-BWOyivC5.mjs +588 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-run-history-popup.component-BWOyivC5.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-run-history-timeline-tab.component-AnJ-Pywf.mjs +33 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-run-history-timeline-tab.component-AnJ-Pywf.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-run-history-visual-tab.component-Bw68Jwcb.mjs +227 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-run-history-visual-tab.component-Bw68Jwcb.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-task-popover.component-Cg4gODGo.mjs +300 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-task-popover.component-Cg4gODGo.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client.mjs +2 -0
- package/fesm2022/acorex-platform-module-workflow-management-client.mjs.map +1 -0
- package/package.json +28 -0
- package/types/acorex-platform-module-workflow-management-client-contracts.d.ts +341 -0
- package/types/acorex-platform-module-workflow-management-client.d.ts +1026 -0
|
@@ -0,0 +1,1026 @@
|
|
|
1
|
+
import { AXPMenuProvider, AXPMenuProviderContext } from '@acorex-platform/framework-client/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { Type, InjectionToken, Injector } from '@angular/core';
|
|
4
|
+
import * as i1 from '@acorex-platform/module-calendar-management-client';
|
|
5
|
+
import * as i2 from '@acorex-platform/framework-client/domain';
|
|
6
|
+
import * as i4 from '@acorex-platform/framework-client/layout/widget-core';
|
|
7
|
+
import { AXPActivityCategory, AXPWidgetNode, AXPActionMenuItem, AXPActivityDefinition, AXPMultiLanguageString, AXPExecuteCommand } from '@acorex-platform/framework-shared/core';
|
|
8
|
+
import { AXPActivityCategoryProvider, AXPActivityProvider, AXPWorkflowContinuationStepContext, AXPWorkflowTask, AXPWorkflowContinuationHook, AXPWorkflowContinuationOfferResult, WorkflowResumeResult } from '@acorex-platform/framework-client/workflow';
|
|
9
|
+
import { AXPCommand, AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';
|
|
10
|
+
import { AXStyleColorType } from '@acorex/cdk/common';
|
|
11
|
+
import { AXPopupSizeType } from '@acorex/components/popup';
|
|
12
|
+
import { AXPWorkflowTaskProvider, AXPTaskFilter, AXPTask, AXPTaskActionMenuItem, AXPExtraField, AXPTaskStatus, AXPTaskPopoverMetadata, AXPTaskPopoverComponent, AXPWorkflowTaskProviderResolveOptions } from '@acorex-platform/module-task-management-client';
|
|
13
|
+
import { AXPSessionService } from '@acorex-platform/framework-client/auth';
|
|
14
|
+
import { AXMWorkflowManagementWorkflowInstanceEntityModel } from '@acorex-platform/module-workflow-management-client/contracts';
|
|
15
|
+
import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
|
|
16
|
+
|
|
17
|
+
declare class AXMMenuProvider implements AXPMenuProvider {
|
|
18
|
+
private entityService;
|
|
19
|
+
private sessionService;
|
|
20
|
+
provide(context: AXPMenuProviderContext): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Registers workflow-management entity plugins:
|
|
25
|
+
* - workflow-run: workflow-capable entities and workflow-run list actions
|
|
26
|
+
* - workflow-selector: workflow definition + template input configurator
|
|
27
|
+
* - automation: related WorkflowManagement.Automation entity
|
|
28
|
+
*/
|
|
29
|
+
declare class AXMWorkflowPluginsModule {
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXMWorkflowPluginsModule, never>;
|
|
31
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXMWorkflowPluginsModule, never, never, never>;
|
|
32
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AXMWorkflowPluginsModule>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare class AXMWorkflowManagementModule {
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXMWorkflowManagementModule, never>;
|
|
37
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXMWorkflowManagementModule, never, [typeof i1.AXMCalendarManagementModule, typeof i2.AXPDomainModule, typeof AXMWorkflowPluginsModule, typeof i4.AXPWidgetCoreModule], never>;
|
|
38
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AXMWorkflowManagementModule>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Provider for activity categories.
|
|
43
|
+
* Reads categories from entity service (mock data).
|
|
44
|
+
*/
|
|
45
|
+
declare class AXCCategoryProvider implements AXPActivityCategoryProvider {
|
|
46
|
+
private readonly entityService;
|
|
47
|
+
/** Category entity is provided by category plugin (ActivityDefinition → ActivityDefinitionCategory). */
|
|
48
|
+
private categoryService;
|
|
49
|
+
getList(parentId?: string): Promise<AXPActivityCategory[]>;
|
|
50
|
+
getById(id: string): Promise<AXPActivityCategory | undefined>;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXCCategoryProvider, never>;
|
|
52
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXCCategoryProvider>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Input for ShowConfirmPopup activity.
|
|
57
|
+
*/
|
|
58
|
+
interface ShowConfirmPopupInput {
|
|
59
|
+
/**
|
|
60
|
+
* Title of the confirmation dialog
|
|
61
|
+
*/
|
|
62
|
+
title: string;
|
|
63
|
+
/**
|
|
64
|
+
* Message/content of the confirmation dialog
|
|
65
|
+
*/
|
|
66
|
+
message: string;
|
|
67
|
+
/**
|
|
68
|
+
* Dialog type/color (e.g., 'warning', 'danger', 'info', 'success')
|
|
69
|
+
*/
|
|
70
|
+
type?: AXStyleColorType;
|
|
71
|
+
/**
|
|
72
|
+
* Button layout direction ('horizontal' or 'vertical')
|
|
73
|
+
*/
|
|
74
|
+
direction?: 'horizontal' | 'vertical';
|
|
75
|
+
/**
|
|
76
|
+
* Whether dialog is closable
|
|
77
|
+
*/
|
|
78
|
+
closable?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Default action button ('confirm' or 'cancel')
|
|
81
|
+
*/
|
|
82
|
+
defaultAction?: 'confirm' | 'cancel';
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Output for ShowConfirmPopup activity.
|
|
86
|
+
* Outcome is determined by the outcomes object (ok or cancel).
|
|
87
|
+
*/
|
|
88
|
+
interface ShowConfirmPopupOutput {
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* ShowConfirmPopup Activity (Frontend)
|
|
92
|
+
*
|
|
93
|
+
* Shows a confirmation popup dialog with OK and Cancel buttons.
|
|
94
|
+
* This activity runs on the frontend and requires user interaction.
|
|
95
|
+
*
|
|
96
|
+
* Execution Mode: frontend
|
|
97
|
+
* Activity Type: workflow-activity:show-confirm-popup
|
|
98
|
+
*
|
|
99
|
+
* Outcomes:
|
|
100
|
+
* - ok: User clicked OK button
|
|
101
|
+
* - cancel: User clicked Cancel button or closed the dialog
|
|
102
|
+
*/
|
|
103
|
+
declare class ShowConfirmPopupActivity implements AXPCommand<ShowConfirmPopupInput, ShowConfirmPopupOutput> {
|
|
104
|
+
private readonly dialogService;
|
|
105
|
+
private readonly translationService;
|
|
106
|
+
execute(input: ShowConfirmPopupInput): AXPCommandExecuteResultPromise<ShowConfirmPopupOutput>;
|
|
107
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShowConfirmPopupActivity, never>;
|
|
108
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ShowConfirmPopupActivity>;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Input for ShowLayoutPopup activity.
|
|
113
|
+
*/
|
|
114
|
+
interface ShowLayoutPopupInput {
|
|
115
|
+
/**
|
|
116
|
+
* Layout definition as JSON string or AXPWidgetNode object
|
|
117
|
+
*/
|
|
118
|
+
layout: string | AXPWidgetNode;
|
|
119
|
+
/**
|
|
120
|
+
* Dialog title
|
|
121
|
+
*/
|
|
122
|
+
title?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Dialog size
|
|
125
|
+
*/
|
|
126
|
+
size?: AXPopupSizeType;
|
|
127
|
+
/**
|
|
128
|
+
* Whether to show close button
|
|
129
|
+
*/
|
|
130
|
+
closeButton?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Initial context data for the form
|
|
133
|
+
*/
|
|
134
|
+
context?: Record<string, any>;
|
|
135
|
+
/**
|
|
136
|
+
* Dialog actions (buttons) to display in footer
|
|
137
|
+
* Each action will create a corresponding outcome
|
|
138
|
+
*/
|
|
139
|
+
actions?: {
|
|
140
|
+
prefix?: AXPActionMenuItem[];
|
|
141
|
+
suffix?: AXPActionMenuItem[];
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* ShowLayoutPopup Activity (Frontend)
|
|
146
|
+
*
|
|
147
|
+
* Shows a popup dialog with a custom layout built using layout builder.
|
|
148
|
+
* The layout can be provided as JSON string or AXPWidgetNode object.
|
|
149
|
+
*
|
|
150
|
+
* Execution Mode: frontend
|
|
151
|
+
* Activity Type: workflow-activity:show-layout-popup
|
|
152
|
+
*
|
|
153
|
+
* Outcomes:
|
|
154
|
+
* Outcomes are dynamically generated based on the actions provided in the input.
|
|
155
|
+
* Each action creates a corresponding outcome with the action name (from command.name or action.name).
|
|
156
|
+
* If no actions are provided, default actions (cancel, submit) are used.
|
|
157
|
+
*
|
|
158
|
+
* Examples:
|
|
159
|
+
* - If action has command.name = 'save', outcome will be { save: true }
|
|
160
|
+
* - If action has name = 'delete', outcome will be { delete: true }
|
|
161
|
+
* - Default outcomes: { cancel: true } or { submit: true }
|
|
162
|
+
*/
|
|
163
|
+
declare class ShowLayoutPopupActivity implements AXPCommand<ShowLayoutPopupInput, Record<string, any>> {
|
|
164
|
+
private readonly popupService;
|
|
165
|
+
execute(input: ShowLayoutPopupInput): AXPCommandExecuteResultPromise<Record<string, any>>;
|
|
166
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShowLayoutPopupActivity, never>;
|
|
167
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ShowLayoutPopupActivity>;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Input for Human Task activity.
|
|
172
|
+
*/
|
|
173
|
+
interface HumanTaskInput {
|
|
174
|
+
/**
|
|
175
|
+
* Task title
|
|
176
|
+
*/
|
|
177
|
+
title?: string;
|
|
178
|
+
/**
|
|
179
|
+
* Task description
|
|
180
|
+
*/
|
|
181
|
+
description?: string;
|
|
182
|
+
/**
|
|
183
|
+
* Assigned user IDs (direct assignment)
|
|
184
|
+
*/
|
|
185
|
+
assignedUserIds?: string[];
|
|
186
|
+
/**
|
|
187
|
+
* Candidate user IDs (users who can claim the task)
|
|
188
|
+
*/
|
|
189
|
+
candidateUserIds?: string[];
|
|
190
|
+
/**
|
|
191
|
+
* Candidate role IDs (roles whose members can claim the task)
|
|
192
|
+
*/
|
|
193
|
+
candidateRoleIds?: string[];
|
|
194
|
+
/**
|
|
195
|
+
* Task priority
|
|
196
|
+
*/
|
|
197
|
+
priority?: 'Low' | 'Normal' | 'High' | 'Urgent';
|
|
198
|
+
/**
|
|
199
|
+
* Task due date (ISO date string or Date)
|
|
200
|
+
*/
|
|
201
|
+
dueDate?: string | Date;
|
|
202
|
+
/**
|
|
203
|
+
* Initial context data for the form
|
|
204
|
+
*/
|
|
205
|
+
context?: Record<string, any>;
|
|
206
|
+
/**
|
|
207
|
+
* Actions (buttons) for this task. Format: { prefix?: Array<Action>, suffix?: Array<Action> } (or JSON string).
|
|
208
|
+
* Each action name becomes an outcome when the task is completed.
|
|
209
|
+
*/
|
|
210
|
+
actions?: {
|
|
211
|
+
prefix?: Array<{
|
|
212
|
+
name?: string;
|
|
213
|
+
command?: {
|
|
214
|
+
name?: string;
|
|
215
|
+
};
|
|
216
|
+
}>;
|
|
217
|
+
suffix?: Array<{
|
|
218
|
+
name?: string;
|
|
219
|
+
command?: {
|
|
220
|
+
name?: string;
|
|
221
|
+
};
|
|
222
|
+
}>;
|
|
223
|
+
} | string;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Output for Human Task activity.
|
|
227
|
+
*/
|
|
228
|
+
interface HumanTaskOutput {
|
|
229
|
+
/**
|
|
230
|
+
* Result data from task completion (form values)
|
|
231
|
+
*/
|
|
232
|
+
result: Record<string, any>;
|
|
233
|
+
/**
|
|
234
|
+
* Action that was clicked (e.g., 'approve', 'reject', 'cancel')
|
|
235
|
+
*/
|
|
236
|
+
action: string;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Human Task Activity (Frontend)
|
|
240
|
+
*
|
|
241
|
+
* Generic human task activity that suspends workflow and waits for user interaction.
|
|
242
|
+
* Supports assignment and actions (displayed inline). For dialog-style flow, use a follow-up activity.
|
|
243
|
+
*
|
|
244
|
+
* Execution Mode: frontend
|
|
245
|
+
* Task Type: human-task
|
|
246
|
+
* Activity Type: workflow-activity:human-task
|
|
247
|
+
*
|
|
248
|
+
* Outcomes:
|
|
249
|
+
* Outcomes are dynamically generated based on the actions provided in the input.
|
|
250
|
+
* Each action creates a corresponding outcome with the action name (from command.name or action.name).
|
|
251
|
+
* If no actions are provided, default actions (cancel, submit) are used.
|
|
252
|
+
*
|
|
253
|
+
* Examples:
|
|
254
|
+
* - If action has command.name = 'approve', outcome will be { approve: true }
|
|
255
|
+
* - If action has name = 'reject', outcome will be { reject: true }
|
|
256
|
+
* - Default outcomes: { cancel: true } or { submit: true }
|
|
257
|
+
*
|
|
258
|
+
* Assignment:
|
|
259
|
+
* - assignedUserIds: Direct assignment to specific users
|
|
260
|
+
* - candidateUserIds: Users who can claim the task
|
|
261
|
+
* - candidateRoleIds: Roles whose members can claim the task
|
|
262
|
+
*
|
|
263
|
+
* Display Modes:
|
|
264
|
+
* - 'dialog': Traditional modal dialog (default)
|
|
265
|
+
* - 'inline': Actions displayed directly on page before resume
|
|
266
|
+
*/
|
|
267
|
+
declare class HumanTaskActivity implements AXPCommand<HumanTaskInput, HumanTaskOutput> {
|
|
268
|
+
/**
|
|
269
|
+
* Execute human task activity.
|
|
270
|
+
*
|
|
271
|
+
* This method doesn't actually show UI - it just validates input and returns success.
|
|
272
|
+
* The workflow engine will suspend at this activity and create a bookmark.
|
|
273
|
+
* The Generic Task Provider will handle displaying the task UI inline.
|
|
274
|
+
*/
|
|
275
|
+
execute(input: HumanTaskInput): AXPCommandExecuteResultPromise<HumanTaskOutput>;
|
|
276
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HumanTaskActivity, never>;
|
|
277
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HumanTaskActivity>;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Input for Cartable (pooled) task activity.
|
|
282
|
+
* Does not use direct assignment: only candidates may claim the task on the task board.
|
|
283
|
+
*/
|
|
284
|
+
interface CartableTaskInput {
|
|
285
|
+
title?: string;
|
|
286
|
+
description?: string;
|
|
287
|
+
candidateUserIds?: string[];
|
|
288
|
+
candidateRoleIds?: string[];
|
|
289
|
+
priority?: 'Low' | 'Normal' | 'High' | 'Urgent';
|
|
290
|
+
dueDate?: string | Date;
|
|
291
|
+
context?: Record<string, any>;
|
|
292
|
+
actions?: {
|
|
293
|
+
prefix?: Array<{
|
|
294
|
+
name?: string;
|
|
295
|
+
command?: {
|
|
296
|
+
name?: string;
|
|
297
|
+
};
|
|
298
|
+
}>;
|
|
299
|
+
suffix?: Array<{
|
|
300
|
+
name?: string;
|
|
301
|
+
command?: {
|
|
302
|
+
name?: string;
|
|
303
|
+
};
|
|
304
|
+
}>;
|
|
305
|
+
} | string;
|
|
306
|
+
}
|
|
307
|
+
interface CartableTaskOutput {
|
|
308
|
+
result: Record<string, any>;
|
|
309
|
+
action: string;
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Cartable task activity (frontend): suspends workflow with candidate users only.
|
|
313
|
+
* Assignee is set when a candidate claims the task on the task board (bookmark update).
|
|
314
|
+
*
|
|
315
|
+
* Activity Type: workflow-activity:cartable
|
|
316
|
+
*/
|
|
317
|
+
declare class CartableTaskActivity implements AXPCommand<CartableTaskInput, CartableTaskOutput> {
|
|
318
|
+
execute(input: CartableTaskInput): AXPCommandExecuteResultPromise<CartableTaskOutput>;
|
|
319
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CartableTaskActivity, never>;
|
|
320
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CartableTaskActivity>;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Input for ShowToast activity.
|
|
325
|
+
*/
|
|
326
|
+
interface ShowToastInput {
|
|
327
|
+
/**
|
|
328
|
+
* Message/content of the toast
|
|
329
|
+
*/
|
|
330
|
+
message: string;
|
|
331
|
+
/**
|
|
332
|
+
* Toast type/color (e.g., 'success', 'danger', 'info', 'warning')
|
|
333
|
+
*/
|
|
334
|
+
type?: AXStyleColorType;
|
|
335
|
+
/**
|
|
336
|
+
* Toast title (optional)
|
|
337
|
+
*/
|
|
338
|
+
title?: string;
|
|
339
|
+
/**
|
|
340
|
+
* Whether to show close button
|
|
341
|
+
*/
|
|
342
|
+
closeButton?: boolean;
|
|
343
|
+
/**
|
|
344
|
+
* Timeout in milliseconds (0 = no timeout)
|
|
345
|
+
*/
|
|
346
|
+
timeOut?: number;
|
|
347
|
+
/**
|
|
348
|
+
* Whether to show timeout progress
|
|
349
|
+
*/
|
|
350
|
+
timeOutProgress?: boolean;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Wrapper used when {@link ShowToastActivity} is invoked from entity/command dispatchers
|
|
354
|
+
* (`options` mirrors toolbar `command.options`).
|
|
355
|
+
*/
|
|
356
|
+
interface ShowToastEntityCommandEnvelope {
|
|
357
|
+
options?: ShowToastInput;
|
|
358
|
+
}
|
|
359
|
+
/** Plain toast fields or entity-toolbar envelope — both are supported. */
|
|
360
|
+
type ShowToastCommandInput = ShowToastInput | ShowToastEntityCommandEnvelope;
|
|
361
|
+
/**
|
|
362
|
+
* Output for ShowToast activity.
|
|
363
|
+
*/
|
|
364
|
+
interface ShowToastOutput {
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* ShowToast Activity (Frontend)
|
|
368
|
+
*
|
|
369
|
+
* Shows a toast notification message to the user.
|
|
370
|
+
* This activity runs on the frontend and displays a temporary notification.
|
|
371
|
+
*
|
|
372
|
+
* Execution Mode: frontend
|
|
373
|
+
* Activity Type: workflow-activity:show-toast
|
|
374
|
+
*
|
|
375
|
+
* Outcomes:
|
|
376
|
+
* - done: Toast was displayed successfully
|
|
377
|
+
*/
|
|
378
|
+
declare class ShowToastActivity implements AXPCommand<ShowToastCommandInput, ShowToastOutput> {
|
|
379
|
+
private readonly toastService;
|
|
380
|
+
private readonly translationService;
|
|
381
|
+
execute(input: ShowToastCommandInput): AXPCommandExecuteResultPromise<ShowToastOutput>;
|
|
382
|
+
/**
|
|
383
|
+
* Resolves {@link ShowToastInput} from a direct workflow payload or entity command envelope.
|
|
384
|
+
*/
|
|
385
|
+
private static resolvePayload;
|
|
386
|
+
private static tryDirectPayload;
|
|
387
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShowToastActivity, never>;
|
|
388
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ShowToastActivity>;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/** Input for the sign-off activity (approval with digital signature). */
|
|
392
|
+
interface SignOffActivityInput {
|
|
393
|
+
/** Optional dialog message; translated when it is an i18n key. */
|
|
394
|
+
message?: string;
|
|
395
|
+
/** Optional entity record id for workflow context. */
|
|
396
|
+
refId?: string;
|
|
397
|
+
/** Optional entity type key (`Module.Entity`). */
|
|
398
|
+
refType?: string;
|
|
399
|
+
}
|
|
400
|
+
/** Output when the user completes or cancels sign-off. */
|
|
401
|
+
interface SignOffActivityOutput {
|
|
402
|
+
signature: string;
|
|
403
|
+
note?: string;
|
|
404
|
+
signedAt: string;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Sign-off activity (frontend).
|
|
408
|
+
*
|
|
409
|
+
* Collects a required digital signature and optional note from the current user.
|
|
410
|
+
* Use after review/approval paths in workflows that require an auditable sign-off.
|
|
411
|
+
*
|
|
412
|
+
* Activity type: `workflow-activity:sign-off`
|
|
413
|
+
* Outcomes: `Signed` | `Cancelled`
|
|
414
|
+
*/
|
|
415
|
+
declare class SignOffActivity implements AXPCommand<SignOffActivityInput, SignOffActivityOutput> {
|
|
416
|
+
private readonly layoutBuilder;
|
|
417
|
+
private readonly translationService;
|
|
418
|
+
execute(input: SignOffActivityInput): AXPCommandExecuteResultPromise<SignOffActivityOutput>;
|
|
419
|
+
private showSignOffDialog;
|
|
420
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SignOffActivity, never>;
|
|
421
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SignOffActivity>;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/** Input for the rejection-reason activity. */
|
|
425
|
+
interface RejectionReasonActivityInput {
|
|
426
|
+
/** Optional dialog message; translated when it is an i18n key. */
|
|
427
|
+
message?: string;
|
|
428
|
+
/** When true, reason must be non-empty before submit (default: true). */
|
|
429
|
+
requireReason?: boolean;
|
|
430
|
+
}
|
|
431
|
+
/** Output when the user submits or cancels the rejection dialog. */
|
|
432
|
+
interface RejectionReasonActivityOutput {
|
|
433
|
+
reason: string;
|
|
434
|
+
rejectedAt: string;
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* Rejection-reason activity (frontend).
|
|
438
|
+
*
|
|
439
|
+
* Shows a dialog to capture a rejection reason.
|
|
440
|
+
* Use on workflow reject branches instead of ad-hoc show-layout-popup layouts.
|
|
441
|
+
*
|
|
442
|
+
* Activity type: `workflow-activity:rejection-reason`
|
|
443
|
+
* Outcomes: `Submitted` | `Cancelled`
|
|
444
|
+
*/
|
|
445
|
+
declare class RejectionReasonActivity implements AXPCommand<RejectionReasonActivityInput, RejectionReasonActivityOutput> {
|
|
446
|
+
private readonly layoutBuilder;
|
|
447
|
+
private readonly translationService;
|
|
448
|
+
execute(input: RejectionReasonActivityInput): AXPCommandExecuteResultPromise<RejectionReasonActivityOutput>;
|
|
449
|
+
private showRejectionDialog;
|
|
450
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RejectionReasonActivity, never>;
|
|
451
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RejectionReasonActivity>;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Input for Create Entity Form activity.
|
|
456
|
+
*/
|
|
457
|
+
interface CreateEntityFormInput {
|
|
458
|
+
/**
|
|
459
|
+
* Module name (e.g. HumanCapitalManagement)
|
|
460
|
+
*/
|
|
461
|
+
module: string;
|
|
462
|
+
/**
|
|
463
|
+
* Entity name (e.g. LeaveRequest)
|
|
464
|
+
*/
|
|
465
|
+
entity: string;
|
|
466
|
+
/**
|
|
467
|
+
* If true, form only collects data and the next workflow step (e.g. entity-create) persists.
|
|
468
|
+
* If false, entity create is executed on frontend and outcome is 'Done'.
|
|
469
|
+
*/
|
|
470
|
+
persistInWorkflow?: boolean;
|
|
471
|
+
/**
|
|
472
|
+
* Property names to show. Only these properties are displayed. If both includes and excludes are set, only includes is applied.
|
|
473
|
+
*/
|
|
474
|
+
includes?: string[];
|
|
475
|
+
/**
|
|
476
|
+
* Property names to hide. Ignored when includes is also set.
|
|
477
|
+
*/
|
|
478
|
+
excludes?: string[];
|
|
479
|
+
/**
|
|
480
|
+
* Property names that should be displayed as readonly.
|
|
481
|
+
*/
|
|
482
|
+
readonlys?: string[];
|
|
483
|
+
/**
|
|
484
|
+
* Default values for form properties. Keys are property names; filled values are applied as initial context.
|
|
485
|
+
*/
|
|
486
|
+
data?: Record<string, any>;
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Output for Create Entity Form activity.
|
|
490
|
+
*/
|
|
491
|
+
interface CreateEntityFormOutput {
|
|
492
|
+
/**
|
|
493
|
+
* Form data for the next workflow step (when persistInWorkflow is true).
|
|
494
|
+
*/
|
|
495
|
+
result?: Record<string, any>;
|
|
496
|
+
/**
|
|
497
|
+
* Created entity ID (when persistInWorkflow is false and entity create succeeds).
|
|
498
|
+
*/
|
|
499
|
+
id?: string;
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Create Entity Form Activity (Frontend)
|
|
503
|
+
*
|
|
504
|
+
* Shows a create-entity form as an interactive dialog. When persistInWorkflow is true,
|
|
505
|
+
* returns form data and outcome 'Submitted'/'Cancelled' so the workflow handles persistence.
|
|
506
|
+
* When false, executes entity create on frontend and returns outcome 'Done'.
|
|
507
|
+
*
|
|
508
|
+
* Execution Mode: frontend
|
|
509
|
+
* Task Type: human-task
|
|
510
|
+
* Activity Type: workflow-activity:create-entity-form
|
|
511
|
+
*
|
|
512
|
+
* Outcomes:
|
|
513
|
+
* - Submitted: User submitted form (persistInWorkflow true → next step persists)
|
|
514
|
+
* - Cancelled: User cancelled the form
|
|
515
|
+
* - Done: Entity was created on frontend (persistInWorkflow false)
|
|
516
|
+
*/
|
|
517
|
+
declare class CreateEntityFormActivity implements AXPCommand<CreateEntityFormInput, CreateEntityFormOutput> {
|
|
518
|
+
private readonly entityForm;
|
|
519
|
+
private readonly entityService;
|
|
520
|
+
private readonly translationService;
|
|
521
|
+
execute(input: CreateEntityFormInput): AXPCommandExecuteResultPromise<CreateEntityFormOutput>;
|
|
522
|
+
/**
|
|
523
|
+
* Maps dialog.show() result to a command result with a stable workflow outcome in metadata.
|
|
524
|
+
* Some dialog hosts return only the data payload without the metadata wrapper.
|
|
525
|
+
*/
|
|
526
|
+
private normalizeDialogShowResult;
|
|
527
|
+
private normalizePersistInWorkflow;
|
|
528
|
+
/**
|
|
529
|
+
* Normalizes property list input (array, JSON string, or expression result).
|
|
530
|
+
*/
|
|
531
|
+
private normalizePropertyList;
|
|
532
|
+
/**
|
|
533
|
+
* Normalizes data input (object or JSON string).
|
|
534
|
+
*/
|
|
535
|
+
private normalizeData;
|
|
536
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CreateEntityFormActivity, never>;
|
|
537
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CreateEntityFormActivity>;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* Workflow Activities Definition Provider
|
|
542
|
+
*
|
|
543
|
+
* Provides activity definitions (metadata only).
|
|
544
|
+
* Activity definitions contain metadata for UI and tooling.
|
|
545
|
+
* The `name` property is used as the command key for execution.
|
|
546
|
+
* Reads from entity service (mock data).
|
|
547
|
+
*/
|
|
548
|
+
declare class AXMWorkflowActivitiesDefinitionProvider implements AXPActivityProvider {
|
|
549
|
+
private readonly entityService;
|
|
550
|
+
private activityDefinitionService;
|
|
551
|
+
getList(categoryId: string): Promise<AXPActivityDefinition[]>;
|
|
552
|
+
getById(name: string): Promise<AXPActivityDefinition | undefined>;
|
|
553
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXMWorkflowActivitiesDefinitionProvider, never>;
|
|
554
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXMWorkflowActivitiesDefinitionProvider>;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
interface CreateEnityInput {
|
|
558
|
+
module: string;
|
|
559
|
+
entity: string;
|
|
560
|
+
}
|
|
561
|
+
interface CreateEnityOutput {
|
|
562
|
+
id: string;
|
|
563
|
+
}
|
|
564
|
+
declare class AXPCreateEntityActivity implements AXPCommand<CreateEnityInput, CreateEnityOutput> {
|
|
565
|
+
private entityForm;
|
|
566
|
+
private entityService;
|
|
567
|
+
private translationService;
|
|
568
|
+
execute(input: CreateEnityInput): AXPCommandExecuteResultPromise<CreateEnityOutput>;
|
|
569
|
+
private normalizeDialogShowResult;
|
|
570
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPCreateEntityActivity, never>;
|
|
571
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXPCreateEntityActivity>;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Configuration for a workflow-specific task provider.
|
|
576
|
+
* One provider per workflow definition – pass definitionId to scope tasks to that definition only.
|
|
577
|
+
*/
|
|
578
|
+
interface AXPGenericWorkflowTaskProviderConfig {
|
|
579
|
+
/** Unique provider name (e.g. 'leave-request-workflow-tasks', 'document-review-workflow-tasks'). */
|
|
580
|
+
name: string;
|
|
581
|
+
/**
|
|
582
|
+
* Original translatable title source (i18n key or MLS).
|
|
583
|
+
* When set, {@link AXPGenericWorkflowTaskProvider.getTitle} resolves from this on each read.
|
|
584
|
+
*/
|
|
585
|
+
titleSource?: AXPMultiLanguageString;
|
|
586
|
+
/** Display title in task board type selector (i18n key, MLS, or plain string). */
|
|
587
|
+
title: AXPMultiLanguageString;
|
|
588
|
+
/** Optional icon (default: 'fa-light fa-diagram-project'). */
|
|
589
|
+
icon?: string;
|
|
590
|
+
/**
|
|
591
|
+
* When set, only workflow instances for this definition are shown.
|
|
592
|
+
* One provider = one definition. Omit to show all suspended workflow tasks (single generic provider).
|
|
593
|
+
*/
|
|
594
|
+
definitionId?: string;
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* Injection token for provider config. Use when registering via DI (provide token + useFactory with deps).
|
|
598
|
+
* Prefer {@link provideGenericWorkflowTaskProvider} (dynamic import) instead of a static class import in NgModule providers.
|
|
599
|
+
*/
|
|
600
|
+
declare const AXP_GENERIC_WORKFLOW_TASK_PROVIDER_CONFIG: InjectionToken<AXPGenericWorkflowTaskProviderConfig>;
|
|
601
|
+
/**
|
|
602
|
+
* Generic Workflow Task Provider
|
|
603
|
+
*
|
|
604
|
+
* Provides tasks from Workflow Instances directly (no Work Items).
|
|
605
|
+
* Queries suspended workflow instances and extracts tasks from bookmarks.
|
|
606
|
+
*
|
|
607
|
+
* Create one provider per workflow definition by passing a config (name, title, definitionId).
|
|
608
|
+
* E.g. leave request: { name: 'leave-request-workflow-tasks', title: 'Leave Request', definitionId: 'LeaveRequestWorkflow' }
|
|
609
|
+
*
|
|
610
|
+
* Architecture:
|
|
611
|
+
* - Queries Workflow Instances with subStatus = 'Suspended'
|
|
612
|
+
* - Filters by config.definitionId when set (one provider = one definition)
|
|
613
|
+
* - Extracts active bookmarks for each instance
|
|
614
|
+
* - Parses bookmark payload for assignment/actions
|
|
615
|
+
* - Maps to task board format
|
|
616
|
+
*/
|
|
617
|
+
declare class AXPGenericWorkflowTaskProvider extends AXPWorkflowTaskProvider<Record<string, any>> {
|
|
618
|
+
private readonly config;
|
|
619
|
+
private readonly entityService;
|
|
620
|
+
private readonly workflowInstanceQuery;
|
|
621
|
+
private readonly userEntityData;
|
|
622
|
+
private readonly translationService;
|
|
623
|
+
private readonly formatService;
|
|
624
|
+
private readonly settingsService;
|
|
625
|
+
private readonly entityRegistry;
|
|
626
|
+
private readonly statusDefinitionService;
|
|
627
|
+
private readonly workflowDefinitionService;
|
|
628
|
+
private readonly workflowManager;
|
|
629
|
+
private readonly humanTaskService;
|
|
630
|
+
private readonly sessionService;
|
|
631
|
+
private readonly toastService;
|
|
632
|
+
private readonly commandService;
|
|
633
|
+
private readonly dueStatusProviderService;
|
|
634
|
+
private readonly expressionScopeService;
|
|
635
|
+
private readonly expressionEvaluator;
|
|
636
|
+
/** Primary entity type (with status plugin) inferred from the workflow definition. */
|
|
637
|
+
private primaryEntityTypeWithStatus;
|
|
638
|
+
/** Per-provider caches (one instance per workflow definition). */
|
|
639
|
+
private readonly entityDefinitionCache;
|
|
640
|
+
private readonly statusDefinitionKeyByEntityType;
|
|
641
|
+
private readonly statusProviderByDefinitionKey;
|
|
642
|
+
private readonly userReferenceCache;
|
|
643
|
+
private readonly entityStatusIdCache;
|
|
644
|
+
constructor(config: AXPGenericWorkflowTaskProviderConfig);
|
|
645
|
+
get name(): string;
|
|
646
|
+
getTitle(): Promise<string>;
|
|
647
|
+
getIcon(): Promise<string>;
|
|
648
|
+
/** Bookmark types shown on the workflow task board. */
|
|
649
|
+
private isTaskBoardBookmarkPayload;
|
|
650
|
+
/** Pooled task: must be claimed before submit/cancel (cartable, or human-task with candidates only). */
|
|
651
|
+
private isPooledClaimablePayload;
|
|
652
|
+
/** Normalizes bookmark assignee/candidate ids (array or single string from expressions). */
|
|
653
|
+
private normalizeUserIdList;
|
|
654
|
+
/** Human-task assigned to another user; current user may take over when permitted. */
|
|
655
|
+
private isReassignableHumanTaskPayload;
|
|
656
|
+
private canTakeOverTask;
|
|
657
|
+
private isWorkflowRunCommand;
|
|
658
|
+
/**
|
|
659
|
+
* Secondary popover menu: workflow run utilities (history, take over).
|
|
660
|
+
*/
|
|
661
|
+
private appendWorkflowMoreMenuActions;
|
|
662
|
+
/**
|
|
663
|
+
* Get tasks from suspended workflow instances.
|
|
664
|
+
*
|
|
665
|
+
* Queries workflow instances filtered by:
|
|
666
|
+
* - subStatus = 'Suspended'
|
|
667
|
+
* - entityRefType (if provided in filter)
|
|
668
|
+
* - definitionId (if provided in filter)
|
|
669
|
+
* - assignee/claimant (if filter provided)
|
|
670
|
+
*
|
|
671
|
+
* Then extracts active bookmarks and maps to task board format.
|
|
672
|
+
*/
|
|
673
|
+
getTasks(options: AXPTaskFilter): Promise<{
|
|
674
|
+
items: AXPTask<Record<string, any>>[];
|
|
675
|
+
total: number;
|
|
676
|
+
}>;
|
|
677
|
+
/**
|
|
678
|
+
* Get active (non-consumed) bookmarks from workflow instance entity.
|
|
679
|
+
* Reads from instance.workflowInstance?.bookmarks — no direct DB access.
|
|
680
|
+
*/
|
|
681
|
+
private getActiveBookmarksFromInstance;
|
|
682
|
+
/**
|
|
683
|
+
* Task-board "started by": workflow instance creator (initiator), never the current viewer.
|
|
684
|
+
* Uses audit creator when present; otherwise resolves `initiatorUserId` from workflow variables.
|
|
685
|
+
*/
|
|
686
|
+
private buildStartedByFromInstance;
|
|
687
|
+
private getWorkflowStateFromInstance;
|
|
688
|
+
/**
|
|
689
|
+
* Formats dates for task popover metadata using regional short-date settings.
|
|
690
|
+
*/
|
|
691
|
+
private formatDateForTaskDisplay;
|
|
692
|
+
private parseIsoDateString;
|
|
693
|
+
private parseBookmarkDueDate;
|
|
694
|
+
/** Resolve platform user id to a display label for the task board grid. */
|
|
695
|
+
private resolveAssigneeReference;
|
|
696
|
+
private loadUserReference;
|
|
697
|
+
/** Task copy evaluation with legacy workflow input title rehydration. */
|
|
698
|
+
private buildTaskTranslationDeps;
|
|
699
|
+
/** Map bookmark to task board task format. */
|
|
700
|
+
private mapBookmarkToTask;
|
|
701
|
+
/** @deprecated Use normalizeTaskPriority from task-management instead. */
|
|
702
|
+
private mapPriorityToTaskPriority;
|
|
703
|
+
/**
|
|
704
|
+
* Update tasks (not applicable for workflow instances - they are read-only from task provider perspective).
|
|
705
|
+
*/
|
|
706
|
+
updateTasks(tasksToUpdate: AXPTask<Record<string, any>>[]): Promise<AXPTask<Record<string, any>>[]>;
|
|
707
|
+
/**
|
|
708
|
+
* Execute commands on tasks.
|
|
709
|
+
*
|
|
710
|
+
* Supports:
|
|
711
|
+
* - Workflow resume commands (Complete, Cancel)
|
|
712
|
+
*/
|
|
713
|
+
executeCommand(command: AXPExecuteCommand): AXPCommandExecuteResultPromise;
|
|
714
|
+
/** Keeps workflow action labels as i18n keys for the popover translate pipe. */
|
|
715
|
+
private resolveWorkflowActionTitle;
|
|
716
|
+
/**
|
|
717
|
+
* Get available actions for a task.
|
|
718
|
+
*
|
|
719
|
+
* Extracts actions from bookmark payload.
|
|
720
|
+
*/
|
|
721
|
+
getActions(task?: AXPTask<Record<string, any>>): Promise<AXPTaskActionMenuItem[]>;
|
|
722
|
+
getExtraFields(): Promise<AXPExtraField[]>;
|
|
723
|
+
getStatuses(): Promise<AXPTaskStatus[]>;
|
|
724
|
+
/** Resolves task status from bookmark context `statusId` and entity status plugin; falls back to workflow Pending. */
|
|
725
|
+
private resolveTaskStatus;
|
|
726
|
+
/**
|
|
727
|
+
* Loads display status from {@link TaskManagement.Task} (lookup-backed status snapshot).
|
|
728
|
+
*/
|
|
729
|
+
private loadTaskRowStatus;
|
|
730
|
+
private resolveEntityTypeForTask;
|
|
731
|
+
/** True when a bookmark value was stored without expression evaluation. */
|
|
732
|
+
private isUnresolvedWorkflowExpression;
|
|
733
|
+
/**
|
|
734
|
+
* Loads `statusId` from the linked entity row when bookmark context omits or stale-fails it.
|
|
735
|
+
*/
|
|
736
|
+
private loadEntityStatusIdFromContext;
|
|
737
|
+
/**
|
|
738
|
+
* Finds a row of `entityType` linked to this workflow instance (e.g. LifecycleEvent.workflowInfo.instanceId).
|
|
739
|
+
*/
|
|
740
|
+
private loadEntityStatusIdByWorkflowInstance;
|
|
741
|
+
private fetchEntityStatusIdByWorkflowInstance;
|
|
742
|
+
private loadEntityStatusId;
|
|
743
|
+
private fetchEntityStatusIdByKey;
|
|
744
|
+
/** Fallback workflow task-board status when no entity status plugin applies. */
|
|
745
|
+
private getWorkflowPendingStatus;
|
|
746
|
+
private getWorkflowTaskStatuses;
|
|
747
|
+
private mapStatusProviderToTaskStatuses;
|
|
748
|
+
private translateStatusTitle;
|
|
749
|
+
private readContextString;
|
|
750
|
+
private parseQualifiedEntityType;
|
|
751
|
+
private resolveEntityDefinition;
|
|
752
|
+
private fetchEntityDefinition;
|
|
753
|
+
private getStatusPluginDefinitionKey;
|
|
754
|
+
private entityTypeHasStatusPlugin;
|
|
755
|
+
private getStatusDefinitionKeyForEntityType;
|
|
756
|
+
/**
|
|
757
|
+
* Warms status-definition-key cache for an entity type (call after resolveEntityDefinition).
|
|
758
|
+
*/
|
|
759
|
+
private rememberStatusDefinitionKeyForEntityType;
|
|
760
|
+
private getEntityStatusProvider;
|
|
761
|
+
private getStatusProviderByDefinitionKey;
|
|
762
|
+
private findStatusDefinition;
|
|
763
|
+
private warmStatusDefinitionKeyCache;
|
|
764
|
+
/**
|
|
765
|
+
* First `entity-create` target in this workflow whose entity has a status plugin (cached per provider).
|
|
766
|
+
*/
|
|
767
|
+
private resolvePrimaryEntityTypeForProvider;
|
|
768
|
+
getPopoverMetadata(task: AXPTask<Record<string, unknown>>): Promise<AXPTaskPopoverMetadata>;
|
|
769
|
+
/**
|
|
770
|
+
* Builds label/value metadata rows for the workflow task popover (view-mode widgets).
|
|
771
|
+
*/
|
|
772
|
+
private buildPopoverMetadata;
|
|
773
|
+
private hasMeaningfulPopoverValue;
|
|
774
|
+
private formatUserReferenceLabel;
|
|
775
|
+
private resolveDueDate;
|
|
776
|
+
private resolveEffectiveDateValue;
|
|
777
|
+
/** Parses `yyyy-mm-dd` (and ISO date prefixes) in local time to avoid UTC day shifts in the date widget. */
|
|
778
|
+
private parseDateOnlyString;
|
|
779
|
+
private resolveTaskPriorityColor;
|
|
780
|
+
getComponent(): (() => Promise<Type<AXPTaskPopoverComponent>>) | Type<AXPTaskPopoverComponent> | null;
|
|
781
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPGenericWorkflowTaskProvider, never>;
|
|
782
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXPGenericWorkflowTaskProvider>;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/** Minimal bookmark payload shape for continuation eligibility checks. */
|
|
786
|
+
interface WorkflowTaskContinuationPayload {
|
|
787
|
+
activityType: string;
|
|
788
|
+
assignedUserIds?: string[] | null;
|
|
789
|
+
candidateUserIds?: string[] | null;
|
|
790
|
+
}
|
|
791
|
+
/** Bookmark row shape stored on WorkflowInstance.workflowInstance.bookmarks. */
|
|
792
|
+
interface WorkflowTaskContinuationBookmark {
|
|
793
|
+
id: string;
|
|
794
|
+
activityId: string;
|
|
795
|
+
type: string;
|
|
796
|
+
payload?: Record<string, unknown> | null;
|
|
797
|
+
payloadJson?: string;
|
|
798
|
+
consumed?: boolean;
|
|
799
|
+
isConsumed?: boolean;
|
|
800
|
+
createdAt?: string;
|
|
801
|
+
}
|
|
802
|
+
interface WorkflowTaskContinuationContext {
|
|
803
|
+
instance: AXMWorkflowManagementWorkflowInstanceEntityModel;
|
|
804
|
+
bookmark: WorkflowTaskContinuationBookmark;
|
|
805
|
+
payload: WorkflowTaskContinuationPayload;
|
|
806
|
+
sessionService: AXPSessionService;
|
|
807
|
+
/** Bookmark id of the task that was just completed (excluded from next-step detection). */
|
|
808
|
+
completedBookmarkId?: string;
|
|
809
|
+
/** Activity id that was just completed (excluded from next-step detection). */
|
|
810
|
+
completedActivityId?: string;
|
|
811
|
+
}
|
|
812
|
+
/** Normalizes platform user id lists on bookmark payloads. */
|
|
813
|
+
declare function normalizeWorkflowTaskUserIds(value: string[] | null | undefined): string[];
|
|
814
|
+
/**
|
|
815
|
+
* Workflow instance creator (task-board "started by" / continuation initiator checks).
|
|
816
|
+
* Prefers audit creator, then workflow `initiatorUserId` (properties / variables table).
|
|
817
|
+
* Never falls back to the current session user.
|
|
818
|
+
*/
|
|
819
|
+
declare function getWorkflowInstanceInitiatorUserId(instance: AXMWorkflowManagementWorkflowInstanceEntityModel): string | null;
|
|
820
|
+
/** Reads `initiatorUserId` from persisted workflow state / variables table. */
|
|
821
|
+
declare function resolveWorkflowInitiatorUserIdFromVariables(instance: AXMWorkflowManagementWorkflowInstanceEntityModel): string | null;
|
|
822
|
+
/** Bookmark types rendered on the workflow task board. */
|
|
823
|
+
declare function isWorkflowTaskBoardBookmarkPayload(payload: WorkflowTaskContinuationPayload): boolean;
|
|
824
|
+
/** Pooled task that must be claimed before acting (no direct continuation offer). */
|
|
825
|
+
declare function isWorkflowPooledClaimablePayload(payload: WorkflowTaskContinuationPayload): boolean;
|
|
826
|
+
/** Human-task assigned to another user; may be taken over when permitted. */
|
|
827
|
+
declare function isWorkflowReassignableHumanTaskPayload(payload: WorkflowTaskContinuationPayload): boolean;
|
|
828
|
+
/** Parses bookmark payload from entity storage. */
|
|
829
|
+
declare function parseWorkflowTaskContinuationPayload(bookmark: WorkflowTaskContinuationBookmark): WorkflowTaskContinuationPayload | null;
|
|
830
|
+
/**
|
|
831
|
+
* Whether the workflow moved forward enough to prompt "continue to next step".
|
|
832
|
+
* Skips draft save / cancel on questionnaire (same human-task bookmark remains).
|
|
833
|
+
*/
|
|
834
|
+
declare function shouldOfferWorkflowContinuationAfterStep(context: AXPWorkflowContinuationStepContext, activeBookmarkActivityIds: string[]): boolean;
|
|
835
|
+
/**
|
|
836
|
+
* Assignee of the first active human-task / cartable bookmark (used for interactive-step continuation).
|
|
837
|
+
*/
|
|
838
|
+
declare function findActiveHumanTaskAssigneeId(bookmarks: WorkflowTaskContinuationBookmark[]): string | null;
|
|
839
|
+
/**
|
|
840
|
+
* Assignee on a completed human-task activity (when inbox bookmarks are already consumed).
|
|
841
|
+
*/
|
|
842
|
+
declare function findHumanTaskAssigneeIdForActivity(bookmarks: WorkflowTaskContinuationBookmark[], activityId: string): string | null;
|
|
843
|
+
/** Latest human-task assignee on the instance (active first, then any bookmark). */
|
|
844
|
+
declare function resolveWorkflowHumanTaskAssigneeId(instance: AXMWorkflowManagementWorkflowInstanceEntityModel, preferredActivityId?: string): string | null;
|
|
845
|
+
/**
|
|
846
|
+
* Whether a bookmark row (including consumed) was a task-board human-task / cartable step.
|
|
847
|
+
*/
|
|
848
|
+
declare function wasWorkflowTaskBoardActivity(bookmarks: WorkflowTaskContinuationBookmark[], activityId: string): boolean;
|
|
849
|
+
/**
|
|
850
|
+
* Whether to show "continue?" before an inline interactive activity (sign-off, assessment, etc.).
|
|
851
|
+
*/
|
|
852
|
+
declare function shouldOfferWorkflowInteractiveStepContinuation(instance: AXMWorkflowManagementWorkflowInstanceEntityModel, sessionService: AXPSessionService, humanTaskAssigneeId: string | null): boolean;
|
|
853
|
+
/**
|
|
854
|
+
* Skips a redundant pre-interactive prompt when the next UI would run immediately anyway.
|
|
855
|
+
*/
|
|
856
|
+
declare function shouldSkipContinuationBeforeInteractive(context: AXPWorkflowContinuationStepContext, nextTask: AXPWorkflowTask, sessionService: AXPSessionService, instance: AXMWorkflowManagementWorkflowInstanceEntityModel, bookmarks: WorkflowTaskContinuationBookmark[], humanTaskAssigneeId: string | null): boolean;
|
|
857
|
+
/** Take-over copy before interactive steps when a human-task is owned by someone else. */
|
|
858
|
+
declare function needsTakeOverForWorkflowInteractiveContinuation(instance: AXMWorkflowManagementWorkflowInstanceEntityModel, sessionService: AXPSessionService, humanTaskAssigneeId: string | null): boolean;
|
|
859
|
+
/**
|
|
860
|
+
* Whether the UI should offer "continue to next step" after a successful resume.
|
|
861
|
+
*
|
|
862
|
+
* - Current user is the assignee (sequential tasks for the same person, e.g. line manager).
|
|
863
|
+
* - Workflow initiator and assignee are the same person and that person is the current user.
|
|
864
|
+
* - Current user may take over a human-task assigned to someone else.
|
|
865
|
+
*/
|
|
866
|
+
/**
|
|
867
|
+
* Resolves assignee id from bookmark payload, falling back to instance bookmarks / pending task input.
|
|
868
|
+
*/
|
|
869
|
+
declare function resolveWorkflowTaskContinuationAssigneeId(instance: AXMWorkflowManagementWorkflowInstanceEntityModel, payload: WorkflowTaskContinuationPayload, pendingActivityId?: string): string | null;
|
|
870
|
+
declare function shouldOfferWorkflowTaskContinuation(ctx: WorkflowTaskContinuationContext): boolean;
|
|
871
|
+
/** True when the user must take over the next bookmark before acting on it. */
|
|
872
|
+
declare function needsTakeOverForWorkflowTaskContinuation(ctx: WorkflowTaskContinuationContext): boolean;
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* Offers "continue to next step" / take-over after workflow start, resume, and interactive chains.
|
|
876
|
+
* Uses {@link AXPWorkflowInstanceHumanTaskService} only — not task board or popover.
|
|
877
|
+
*/
|
|
878
|
+
declare class AXPWorkflowTaskContinuationService implements AXPWorkflowContinuationHook {
|
|
879
|
+
private readonly sessionService;
|
|
880
|
+
private readonly translationService;
|
|
881
|
+
private readonly dialogService;
|
|
882
|
+
private readonly humanTaskService;
|
|
883
|
+
private readonly bookmarkAccess;
|
|
884
|
+
offerBeforeInteractiveFlow(context: AXPWorkflowContinuationStepContext): Promise<AXPWorkflowContinuationOfferResult>;
|
|
885
|
+
offerAfterWorkflowStep(context: AXPWorkflowContinuationStepContext): Promise<AXPWorkflowContinuationOfferResult>;
|
|
886
|
+
private offerFromPendingNextTask;
|
|
887
|
+
private offerFromInstanceBookmarks;
|
|
888
|
+
private confirmAndAdvance;
|
|
889
|
+
private isCompletedBookmark;
|
|
890
|
+
private enrichPayloadFromInstance;
|
|
891
|
+
private buildPayloadFromWorkflowTask;
|
|
892
|
+
private confirmContinueToNextStep;
|
|
893
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowTaskContinuationService, never>;
|
|
894
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowTaskContinuationService>;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
/** Bookmark row on WorkflowInstance.workflowInstance.bookmarks. */
|
|
898
|
+
interface WorkflowInstanceBookmarkRow {
|
|
899
|
+
id: string;
|
|
900
|
+
activityId: string;
|
|
901
|
+
type: string;
|
|
902
|
+
payload?: Record<string, unknown> | null;
|
|
903
|
+
payloadJson?: string;
|
|
904
|
+
consumed?: boolean;
|
|
905
|
+
isConsumed?: boolean;
|
|
906
|
+
}
|
|
907
|
+
interface HumanTaskBookmarkPayload extends WorkflowTaskContinuationPayload {
|
|
908
|
+
activityType: string;
|
|
909
|
+
activityName: string;
|
|
910
|
+
taskToken: string;
|
|
911
|
+
title?: string;
|
|
912
|
+
description?: string;
|
|
913
|
+
actions?: {
|
|
914
|
+
prefix?: unknown[];
|
|
915
|
+
suffix?: unknown[];
|
|
916
|
+
};
|
|
917
|
+
context?: Record<string, unknown>;
|
|
918
|
+
}
|
|
919
|
+
declare function getActiveBookmarks(instance: AXMWorkflowManagementWorkflowInstanceEntityModel): WorkflowInstanceBookmarkRow[];
|
|
920
|
+
/**
|
|
921
|
+
* Loads workflow instance entity rows (including embedded bookmarks).
|
|
922
|
+
*/
|
|
923
|
+
declare function createWorkflowInstanceBookmarkAccess(entityService?: AXPEntityService): {
|
|
924
|
+
loadInstance(instanceId: string): Promise<AXMWorkflowManagementWorkflowInstanceEntityModel | null>;
|
|
925
|
+
/**
|
|
926
|
+
* Reloads the instance until the expected human-task bookmark exists (post-submit race).
|
|
927
|
+
*/
|
|
928
|
+
loadInstanceForContinuation(instanceId: string, expectedPendingActivityId?: string): Promise<AXMWorkflowManagementWorkflowInstanceEntityModel | null>;
|
|
929
|
+
getActiveBookmarks: typeof getActiveBookmarks;
|
|
930
|
+
findActiveBookmark(instanceId: string, activityId: string): Promise<{
|
|
931
|
+
instance: AXMWorkflowManagementWorkflowInstanceEntityModel;
|
|
932
|
+
bookmark: WorkflowInstanceBookmarkRow;
|
|
933
|
+
} | null>;
|
|
934
|
+
parseHumanTaskPayload(bookmark: WorkflowInstanceBookmarkRow): HumanTaskBookmarkPayload | null;
|
|
935
|
+
};
|
|
936
|
+
type WorkflowInstanceBookmarkAccess = ReturnType<typeof createWorkflowInstanceBookmarkAccess>;
|
|
937
|
+
|
|
938
|
+
interface ResumeSuspendedHumanTaskRequest {
|
|
939
|
+
instanceId: string;
|
|
940
|
+
bookmarkId: string;
|
|
941
|
+
activityId: string;
|
|
942
|
+
taskToken: string;
|
|
943
|
+
outcome: string;
|
|
944
|
+
userInput?: Record<string, unknown>;
|
|
945
|
+
/** When true, skips the post-resume "continue to next step?" prompt on this resume. */
|
|
946
|
+
suppressContinuation?: boolean;
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* Workflow-instance human-task operations (resume, take-over, primary action).
|
|
950
|
+
* Independent of task board / popover — task board delegates here for the same behavior.
|
|
951
|
+
*/
|
|
952
|
+
declare class AXPWorkflowInstanceHumanTaskService {
|
|
953
|
+
private readonly injector;
|
|
954
|
+
private readonly sessionService;
|
|
955
|
+
private readonly translationService;
|
|
956
|
+
private readonly dialogService;
|
|
957
|
+
private readonly toastService;
|
|
958
|
+
private readonly eventService;
|
|
959
|
+
private readonly workflowEngine;
|
|
960
|
+
private readonly bookmarkAccess;
|
|
961
|
+
/** Resolved lazily to avoid DI cycle with {@link AXPWorkflowManager} continuation hook. */
|
|
962
|
+
private get workflowManager();
|
|
963
|
+
/**
|
|
964
|
+
* Resumes a suspended human-task bookmark (runs interactive activities via the workflow manager).
|
|
965
|
+
*/
|
|
966
|
+
resumeSuspendedHumanTask(request: ResumeSuspendedHumanTaskRequest): Promise<WorkflowResumeResult>;
|
|
967
|
+
/**
|
|
968
|
+
* Runs the first configured action on a suspended human-task bookmark (e.g. start-fill → questionnaire).
|
|
969
|
+
*/
|
|
970
|
+
executePrimaryHumanTaskAction(instanceId: string, activityId: string, options?: {
|
|
971
|
+
suppressContinuation?: boolean;
|
|
972
|
+
notifyViews?: boolean;
|
|
973
|
+
}): Promise<WorkflowResumeResult | null>;
|
|
974
|
+
/**
|
|
975
|
+
* Reassigns a human-task bookmark to the current user (take over) without advancing the workflow.
|
|
976
|
+
*/
|
|
977
|
+
reassignBookmarkToCurrentUser(instanceId: string, bookmarkId: string, activityId: string): Promise<boolean>;
|
|
978
|
+
/**
|
|
979
|
+
* Take over with confirmation dialog (task board "Take Over" action).
|
|
980
|
+
*/
|
|
981
|
+
reassignBookmarkToCurrentUserWithConfirm(instanceId: string, bookmarkId: string, activityId: string): Promise<boolean>;
|
|
982
|
+
/** First action command name on the human-task bookmark (e.g. start-fill, approve). */
|
|
983
|
+
resolvePrimaryTaskOutcome(payload: HumanTaskBookmarkPayload): string;
|
|
984
|
+
private canTakeOver;
|
|
985
|
+
private confirmReassignToSelf;
|
|
986
|
+
private showResumeError;
|
|
987
|
+
private showToast;
|
|
988
|
+
/** Optional broadcast so open task-board views refresh; does not require task-board module at runtime. */
|
|
989
|
+
notifyWorkflowTaskViewsChanged(provider?: string): void;
|
|
990
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowInstanceHumanTaskService, never>;
|
|
991
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowInstanceHumanTaskService>;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
/**
|
|
995
|
+
* Shared suspended {@link WorkflowManagement.WorkflowInstance} query for task-board providers.
|
|
996
|
+
* One API round-trip serves all per-definition workflow task providers.
|
|
997
|
+
*/
|
|
998
|
+
declare class AXPWorkflowTaskInstanceQueryService {
|
|
999
|
+
private readonly entityService;
|
|
1000
|
+
private readonly destroyRef;
|
|
1001
|
+
private readonly eventService;
|
|
1002
|
+
private readonly workflowInstanceData;
|
|
1003
|
+
private readonly cacheTtlMs;
|
|
1004
|
+
private cachedInstances;
|
|
1005
|
+
private cacheExpiresAt;
|
|
1006
|
+
private inFlight;
|
|
1007
|
+
constructor();
|
|
1008
|
+
invalidate(): void;
|
|
1009
|
+
/**
|
|
1010
|
+
* Returns suspended workflow instances, optionally scoped to one definition.
|
|
1011
|
+
* The underlying entity query always loads the full suspended set once per cache window.
|
|
1012
|
+
*/
|
|
1013
|
+
getSuspendedInstances(definitionId?: string): Promise<AXMWorkflowManagementWorkflowInstanceEntityModel[]>;
|
|
1014
|
+
private loadAllSuspendedInstances;
|
|
1015
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowTaskInstanceQueryService, never>;
|
|
1016
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowTaskInstanceQueryService>;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
/**
|
|
1020
|
+
* Discovers one workflow task provider per workflow definition.
|
|
1021
|
+
* Re-runs discovery when {@link AXPWorkflowTaskProviderResolveOptions.force} is set.
|
|
1022
|
+
*/
|
|
1023
|
+
declare function discoverWorkflowTaskProviders(injector: Injector, options?: AXPWorkflowTaskProviderResolveOptions): Promise<AXPWorkflowTaskProvider[]>;
|
|
1024
|
+
|
|
1025
|
+
export { AXCCategoryProvider, AXMMenuProvider, AXMWorkflowActivitiesDefinitionProvider, AXMWorkflowManagementModule, AXPCreateEntityActivity, AXPGenericWorkflowTaskProvider, AXPWorkflowInstanceHumanTaskService, AXPWorkflowTaskContinuationService, AXPWorkflowTaskInstanceQueryService, AXP_GENERIC_WORKFLOW_TASK_PROVIDER_CONFIG, CartableTaskActivity, CreateEntityFormActivity, HumanTaskActivity, RejectionReasonActivity, ShowConfirmPopupActivity, ShowLayoutPopupActivity, ShowToastActivity, SignOffActivity, createWorkflowInstanceBookmarkAccess, discoverWorkflowTaskProviders, findActiveHumanTaskAssigneeId, findHumanTaskAssigneeIdForActivity, getWorkflowInstanceInitiatorUserId, isWorkflowPooledClaimablePayload, isWorkflowReassignableHumanTaskPayload, isWorkflowTaskBoardBookmarkPayload, needsTakeOverForWorkflowInteractiveContinuation, needsTakeOverForWorkflowTaskContinuation, normalizeWorkflowTaskUserIds, parseWorkflowTaskContinuationPayload, resolveWorkflowHumanTaskAssigneeId, resolveWorkflowInitiatorUserIdFromVariables, resolveWorkflowTaskContinuationAssigneeId, shouldOfferWorkflowContinuationAfterStep, shouldOfferWorkflowInteractiveStepContinuation, shouldOfferWorkflowTaskContinuation, shouldSkipContinuationBeforeInteractive, wasWorkflowTaskBoardActivity };
|
|
1026
|
+
export type { AXPGenericWorkflowTaskProviderConfig, CartableTaskInput, CartableTaskOutput, CreateEnityInput, CreateEnityOutput, CreateEntityFormInput, CreateEntityFormOutput, HumanTaskBookmarkPayload, HumanTaskInput, HumanTaskOutput, RejectionReasonActivityInput, RejectionReasonActivityOutput, ResumeSuspendedHumanTaskRequest, ShowConfirmPopupInput, ShowConfirmPopupOutput, ShowLayoutPopupInput, ShowToastCommandInput, ShowToastEntityCommandEnvelope, ShowToastInput, ShowToastOutput, SignOffActivityInput, SignOffActivityOutput, WorkflowInstanceBookmarkAccess, WorkflowInstanceBookmarkRow, WorkflowTaskContinuationBookmark, WorkflowTaskContinuationContext, WorkflowTaskContinuationPayload };
|