@codex-ts/core-lib 1.1.6 → 2.0.0
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/codex-ts-core-lib.mjs +239 -20
- package/fesm2022/codex-ts-core-lib.mjs.map +1 -1
- package/lib/components/base-task-dashboard.component.d.ts +5 -0
- package/lib/models/base-task.model.d.ts +5 -0
- package/lib/models/workflow.model.d.ts +9 -0
- package/lib/services/base-task.service.d.ts +7 -0
- package/lib/services/http-utility.service.d.ts +3 -0
- package/lib/services/task-entity-service.interface.d.ts +3 -0
- package/lib/workflow-engine/workflow-engine-api.service.d.ts +104 -0
- package/lib/workflow-engine/workflow-engine.models.d.ts +236 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -10,6 +10,11 @@ import * as i0 from "@angular/core";
|
|
|
10
10
|
* Base component for all task dashboard components in the application.
|
|
11
11
|
* Provides common functionality for task management operations while
|
|
12
12
|
* inheriting table functionality from BaseTableComponent.
|
|
13
|
+
*
|
|
14
|
+
* @deprecated Depends on {@link TaskEntityService}, which targets a Java controller
|
|
15
|
+
* (`BaseTaskController`) that no longer exists — see that interface's `@deprecated` note. Build
|
|
16
|
+
* queue/dashboard UIs against `WorkflowEngineApiService` from `workflow-engine/` instead, which
|
|
17
|
+
* targets `workflow-engine-lib`'s actual `/workflow/queue` endpoints.
|
|
13
18
|
*/
|
|
14
19
|
export declare abstract class BaseTaskDashboardComponent<T extends BaseTask, S extends string = string, E extends string = string> extends BaseTableComponent<T> {
|
|
15
20
|
protected entityService: TaskEntityService<T, S, E>;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { Workflow } from './workflow.model';
|
|
2
2
|
import { BaseComment } from './base.comment.model';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Models `io.codex.library.core.task.BaseTaskDto`, paired with the same removed
|
|
5
|
+
* controller as {@link Workflow} — see that interface's `@deprecated` note. Use `WorkflowTask`
|
|
6
|
+
* from `workflow-engine/` instead.
|
|
7
|
+
*/
|
|
3
8
|
export interface BaseTask<S = string, C = BaseComment> extends Workflow<S, C> {
|
|
4
9
|
title: string;
|
|
5
10
|
description: string;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { BaseEntity } from './base.entity.model';
|
|
2
2
|
import { BaseComment } from './base.comment.model';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Models `io.codex.library.core.task.WorkflowDto`, which paired with
|
|
5
|
+
* `microservice-starter-lib`'s Spring-State-Machine-based `BaseWorkflowController`. That
|
|
6
|
+
* controller was deleted (see `WORKFLOW_ENGINE_MIGRATION.md`) in favor of `workflow-engine-lib`,
|
|
7
|
+
* a completely different engine with its own REST API and its own Angular client — see
|
|
8
|
+
* `WorkflowTask`/`WorkflowInstance`/`WorkflowEngineApiService` in `workflow-engine/`. Nothing in
|
|
9
|
+
* this codebase serves the endpoints this interface's shape assumes; kept only for source
|
|
10
|
+
* compatibility with any existing consumer, not as a working feature.
|
|
11
|
+
*/
|
|
3
12
|
export interface Workflow<S = string, C = BaseComment> extends BaseEntity {
|
|
4
13
|
status: S;
|
|
5
14
|
comments: C[];
|
|
@@ -11,6 +11,13 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
/**
|
|
12
12
|
* Base service for task-related operations that extends the BaseCrudService.
|
|
13
13
|
* Implements endpoints defined in Java BaseTaskController.
|
|
14
|
+
*
|
|
15
|
+
* @deprecated `BaseTaskController` (the Java controller this service's `sendEvent`/`PUT
|
|
16
|
+
* /{uuid}/event/{event}` call targets) no longer exists — it was deleted along with
|
|
17
|
+
* `microservice-starter-lib`'s Spring-State-Machine-based workflow subsystem in favor of
|
|
18
|
+
* `workflow-engine-lib`. Calling `sendEvent` against any current backend will 404. Use
|
|
19
|
+
* `WorkflowEngineApiService` from `workflow-engine/` instead, which targets the actual current
|
|
20
|
+
* engine API (`claim`/`unclaim`/`start`/`complete`/`reject`/`reassign` on `/workflow/tasks`).
|
|
14
21
|
*/
|
|
15
22
|
export declare abstract class BaseTaskService<T extends BaseTask, AU = any, S extends string = string, E extends string = string> extends BaseEntityService<T> implements TaskEntityService<T, S, E> {
|
|
16
23
|
protected httpUtility: HttpUtilityService;
|
|
@@ -16,7 +16,10 @@ export declare class HttpUtilityService {
|
|
|
16
16
|
private messageService?;
|
|
17
17
|
private loading;
|
|
18
18
|
loading$: Observable<boolean>;
|
|
19
|
+
private inFlight;
|
|
19
20
|
constructor(http: HttpClient, messageService?: MessageService | undefined);
|
|
21
|
+
private startLoading;
|
|
22
|
+
private endLoading;
|
|
20
23
|
/**
|
|
21
24
|
* Perform a GET request with enhanced options
|
|
22
25
|
* @param url The endpoint URL
|
|
@@ -6,6 +6,9 @@ import { BaseTask } from "../models/base-task.model";
|
|
|
6
6
|
* @template T - The entity type (must extend BaseTaskModel)
|
|
7
7
|
* @template S - The status enum type (for task status)
|
|
8
8
|
* @template E - The event enum type (for task events)
|
|
9
|
+
*
|
|
10
|
+
* @deprecated Paired with {@link BaseTaskService}, which targets a Java controller that no
|
|
11
|
+
* longer exists — see that class's `@deprecated` note. Use `WorkflowEngineApiService` instead.
|
|
9
12
|
*/
|
|
10
13
|
export interface TaskEntityService<T extends BaseTask, S extends string = string, E extends string = string> extends EntityService<T> {
|
|
11
14
|
/**
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { MessageService } from 'primeng/api';
|
|
3
|
+
import { HttpUtilityService } from '../services/http-utility.service';
|
|
4
|
+
import { UtilsService } from '../services/utils.service';
|
|
5
|
+
import { BusinessObject, CancelInstanceRequest, CompleteTaskRequest, DeployWorkflowRequest, QueueSearchCriteria, QueueView, ReassignTaskRequest, RegisterBusinessObjectRequest, RegisterFormRequest, SetVariablesRequest, SignalEventRequest, StartInstanceRequest, WorkflowAuditEntry, WorkflowDefinitionSummary, WorkflowForm, WorkflowInstance, WorkflowPage, WorkflowTask, WorkflowVersionDetail, WorkflowVersionSummary } from './workflow-engine.models';
|
|
6
|
+
/**
|
|
7
|
+
* Client for `workflow-engine-lib`'s REST API — the data-driven engine that replaced
|
|
8
|
+
* `microservice-starter-lib`'s Spring-State-Machine-based workflow subsystem.
|
|
9
|
+
*
|
|
10
|
+
* Follows this library's established DI convention (see {@link BaseEntityService}): not
|
|
11
|
+
* `providedIn: 'root'`, constructed with the backend base URL by the consuming application —
|
|
12
|
+
* *
|
|
13
|
+
* ```ts
|
|
14
|
+
* providers: [{
|
|
15
|
+
* provide: WorkflowEngineApiService,
|
|
16
|
+
* useFactory: (http: HttpUtilityService, utils: UtilsService, msg: MessageService) =>
|
|
17
|
+
* new WorkflowEngineApiService(http, utils, 'https://api.example.com/workflow', msg),
|
|
18
|
+
* deps: [HttpUtilityService, UtilsService, MessageService],
|
|
19
|
+
* }]
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* Every method maps one-to-one onto an engine endpoint; nothing here is business-specific.
|
|
23
|
+
*
|
|
24
|
+
* Deliberately not decorated with {@code @Injectable()} — like {@link BaseEntityService}, this
|
|
25
|
+
* class is always provided via an explicit `useFactory`/`useClass` provider (see above), never
|
|
26
|
+
* auto-constructed by Angular's injector, so its constructor isn't required to be fully
|
|
27
|
+
* DI-resolvable (`backendBaseUrl: string` isn't a valid injection token on its own).
|
|
28
|
+
*/
|
|
29
|
+
export declare class WorkflowEngineApiService {
|
|
30
|
+
protected httpUtility: HttpUtilityService;
|
|
31
|
+
protected utilsService: UtilsService;
|
|
32
|
+
protected backendBaseUrl: string;
|
|
33
|
+
protected messageService: MessageService | undefined;
|
|
34
|
+
protected apiUrl: string;
|
|
35
|
+
/**
|
|
36
|
+
* Creates the client.
|
|
37
|
+
*
|
|
38
|
+
* @param httpUtility HTTP requests, loading state, standardised error handling
|
|
39
|
+
* @param utilsService UUID validation
|
|
40
|
+
* @param backendBaseUrl base URL of the service hosting `workflow-engine-lib`, e.g.
|
|
41
|
+
* `https://api.example.com/workflow`
|
|
42
|
+
* @param messageService optional, shown on client-side validation failures
|
|
43
|
+
*/
|
|
44
|
+
constructor(httpUtility: HttpUtilityService, utilsService: UtilsService, backendBaseUrl: string, messageService: MessageService | undefined);
|
|
45
|
+
private requireUuid;
|
|
46
|
+
/** Finds a task by id. `GET /tasks/{id}` */
|
|
47
|
+
getTask(id: string): Observable<WorkflowTask>;
|
|
48
|
+
/** Claims a task out of a shared queue. `POST /tasks/{id}/claim` */
|
|
49
|
+
claimTask(id: string): Observable<WorkflowTask>;
|
|
50
|
+
/** Releases a claim, returning the task to its queue. `POST /tasks/{id}/unclaim` */
|
|
51
|
+
unclaimTask(id: string): Observable<WorkflowTask>;
|
|
52
|
+
/** Marks work on a task as actively started. `POST /tasks/{id}/start` */
|
|
53
|
+
startTask(id: string): Observable<WorkflowTask>;
|
|
54
|
+
/** Completes a task and resumes its workflow. `POST /tasks/{id}/complete` */
|
|
55
|
+
completeTask(id: string, request?: CompleteTaskRequest): Observable<WorkflowTask>;
|
|
56
|
+
/** Rejects a task, resuming its workflow down a different path. `POST /tasks/{id}/reject` */
|
|
57
|
+
rejectTask(id: string, request?: CompleteTaskRequest): Observable<WorkflowTask>;
|
|
58
|
+
/** Reassigns a task to a different subject. `POST /tasks/{id}/reassign` */
|
|
59
|
+
reassignTask(id: string, request: ReassignTaskRequest): Observable<WorkflowTask>;
|
|
60
|
+
/** Starts a new workflow instance. `POST /instances` */
|
|
61
|
+
startInstance(request: StartInstanceRequest): Observable<WorkflowInstance>;
|
|
62
|
+
/** Finds an instance by id. `GET /instances/{id}` */
|
|
63
|
+
getInstance(id: string): Observable<WorkflowInstance>;
|
|
64
|
+
/** Finds instances by business key. `GET /instances?businessKey=...` */
|
|
65
|
+
findInstancesByBusinessKey(businessKey: string): Observable<WorkflowInstance[]>;
|
|
66
|
+
/** Loads an instance's audit history, oldest first. `GET /instances/{id}/history` */
|
|
67
|
+
instanceHistory(id: string): Observable<WorkflowAuditEntry[]>;
|
|
68
|
+
/** Reads an instance's current variables. `GET /instances/{id}/variables` */
|
|
69
|
+
getInstanceVariables(id: string): Observable<Record<string, unknown>>;
|
|
70
|
+
/** Sets or replaces instance variables outside of any node execution. `PUT /instances/{id}/variables` */
|
|
71
|
+
setInstanceVariables(id: string, request: SetVariablesRequest): Observable<WorkflowInstance>;
|
|
72
|
+
/** Signals an external event to a waiting instance. `POST /instances/{id}/signal` */
|
|
73
|
+
signalInstance(id: string, request: SignalEventRequest): Observable<WorkflowInstance>;
|
|
74
|
+
/** Cancels a running instance and withdraws its open tasks. `POST /instances/{id}/cancel` */
|
|
75
|
+
cancelInstance(id: string, request?: CancelInstanceRequest): Observable<WorkflowInstance>;
|
|
76
|
+
/** Deploys a workflow definition, creating a new immutable version. `POST /definitions` */
|
|
77
|
+
deployDefinition(request: DeployWorkflowRequest): Observable<WorkflowVersionSummary>;
|
|
78
|
+
/** Lists every workflow definition. `GET /definitions` */
|
|
79
|
+
listDefinitions(): Observable<WorkflowDefinitionSummary[]>;
|
|
80
|
+
/** Finds a definition by key. `GET /definitions/{key}` */
|
|
81
|
+
getDefinition(key: string): Observable<WorkflowDefinitionSummary>;
|
|
82
|
+
/** Lists every deployed version of a definition. `GET /definitions/{key}/versions` */
|
|
83
|
+
listVersions(key: string): Observable<WorkflowVersionSummary[]>;
|
|
84
|
+
/** Loads the active version's authored document. `GET /definitions/{key}/versions/active` */
|
|
85
|
+
activeVersion(key: string): Observable<WorkflowVersionDetail>;
|
|
86
|
+
/** Activates a specific version. `POST /definitions/{key}/versions/{versionNumber}/activate` */
|
|
87
|
+
activateVersion(key: string, versionNumber: number): Observable<WorkflowVersionSummary>;
|
|
88
|
+
/** Loads one of the queue views. `GET /queue/{view}` */
|
|
89
|
+
queue(view: QueueView, page?: number, size?: number): Observable<WorkflowPage<WorkflowTask>>;
|
|
90
|
+
/** Searches the queue with structured criteria. `POST /queue/search` */
|
|
91
|
+
searchQueue(criteria?: QueueSearchCriteria, page?: number, size?: number): Observable<WorkflowPage<WorkflowTask>>;
|
|
92
|
+
/** Registers a business object type, or updates one with the same code. `POST /business-objects` */
|
|
93
|
+
registerBusinessObject(request: RegisterBusinessObjectRequest): Observable<BusinessObject>;
|
|
94
|
+
/** Lists every registered business object. `GET /business-objects` */
|
|
95
|
+
listBusinessObjects(): Observable<BusinessObject[]>;
|
|
96
|
+
/** Finds one business object, including the workflows bound to it. `GET /business-objects/{code}` */
|
|
97
|
+
getBusinessObject(code: string): Observable<BusinessObject>;
|
|
98
|
+
/** Registers a new version of a form under a business object. `POST /business-objects/{code}/forms` */
|
|
99
|
+
registerForm(code: string, request: RegisterFormRequest): Observable<WorkflowForm>;
|
|
100
|
+
/** Lists every form registered under a business object. `GET /business-objects/{code}/forms` */
|
|
101
|
+
listForms(code: string): Observable<WorkflowForm[]>;
|
|
102
|
+
/** Finds the active form version a new task would render. `GET /business-objects/{code}/forms/{formKey}` */
|
|
103
|
+
activeForm(code: string, formKey: string): Observable<WorkflowForm>;
|
|
104
|
+
}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types mirroring `workflow-engine-lib`'s REST contract (`WorkflowDtos.java`), field-for-field.
|
|
3
|
+
*
|
|
4
|
+
* This is a separate concept from this library's older `Workflow`/`BaseTask` models, which
|
|
5
|
+
* targeted a different, now-removed Java controller (`microservice-starter-lib`'s
|
|
6
|
+
* Spring-State-Machine-based `BaseWorkflowController`/`BaseTaskController`, deleted in favor of
|
|
7
|
+
* `workflow-engine-lib`). See those models' `@deprecated` notices for the distinction.
|
|
8
|
+
*/
|
|
9
|
+
/** Lifecycle state of a task (`domain/task/TaskState.java`). */
|
|
10
|
+
export type TaskState = 'CREATED' | 'ASSIGNED' | 'CLAIMED' | 'STARTED' | 'COMPLETED' | 'REJECTED' | 'CANCELLED';
|
|
11
|
+
/** Queue ordering. */
|
|
12
|
+
export type TaskPriority = 'LOW' | 'NORMAL' | 'HIGH' | 'CRITICAL';
|
|
13
|
+
/** Lifecycle status of a workflow instance (`domain/instance/InstanceStatus.java`). */
|
|
14
|
+
export type InstanceStatus = 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED';
|
|
15
|
+
/** How urgently an attribute's value should read. */
|
|
16
|
+
export type Severity = 'critical' | 'warn' | 'ok';
|
|
17
|
+
/** Which queue view to load. */
|
|
18
|
+
export type QueueView = 'my' | 'team' | 'completed' | 'overdue';
|
|
19
|
+
/** The group name whose attributes belong in the queue row rather than a detail panel. */
|
|
20
|
+
export declare const WORKFLOW_PRIMARY_GROUP = "primary";
|
|
21
|
+
/**
|
|
22
|
+
* One display attribute captured on a task when it was raised, or declared on a business object
|
|
23
|
+
* type (`WorkflowDtos.AttributeResponse`). `value` is only ever populated on a task snapshot —
|
|
24
|
+
* declaration-only attributes (e.g. from `BusinessObject.attributes`) always carry `value: null`.
|
|
25
|
+
*/
|
|
26
|
+
export interface WorkflowTaskAttribute {
|
|
27
|
+
key: string;
|
|
28
|
+
label: string;
|
|
29
|
+
value: string | null;
|
|
30
|
+
type: 'TEXT' | 'NUMBER' | 'MONEY' | 'DATE' | 'DATETIME' | 'BOOLEAN' | 'ENUM';
|
|
31
|
+
group: string;
|
|
32
|
+
order: number;
|
|
33
|
+
severity: Severity | null;
|
|
34
|
+
}
|
|
35
|
+
/** A unit of work (`WorkflowDtos.TaskResponse`). */
|
|
36
|
+
export interface WorkflowTask {
|
|
37
|
+
id: string;
|
|
38
|
+
instanceId: string;
|
|
39
|
+
nodeKey: string;
|
|
40
|
+
type: 'HUMAN' | 'SYSTEM';
|
|
41
|
+
state: TaskState;
|
|
42
|
+
name: string;
|
|
43
|
+
formKey: string | null;
|
|
44
|
+
assigneeType: string | null;
|
|
45
|
+
assignee: string | null;
|
|
46
|
+
claimedBy: string | null;
|
|
47
|
+
priority: TaskPriority;
|
|
48
|
+
dueDate: string | null;
|
|
49
|
+
slaMinutes: number | null;
|
|
50
|
+
outcome: string | null;
|
|
51
|
+
createdAt: string;
|
|
52
|
+
claimedAt: string | null;
|
|
53
|
+
startedAt: string | null;
|
|
54
|
+
completedAt: string | null;
|
|
55
|
+
completedBy: string | null;
|
|
56
|
+
definitionKey: string | null;
|
|
57
|
+
category: string | null;
|
|
58
|
+
subject: string | null;
|
|
59
|
+
businessObject: string | null;
|
|
60
|
+
businessKey: string | null;
|
|
61
|
+
/** Worst severity across all attributes, for a single row-level indicator. */
|
|
62
|
+
severity: Severity | null;
|
|
63
|
+
attributes: WorkflowTaskAttribute[];
|
|
64
|
+
}
|
|
65
|
+
/** One execution of a workflow (`WorkflowDtos.InstanceResponse`). */
|
|
66
|
+
export interface WorkflowInstance {
|
|
67
|
+
id: string;
|
|
68
|
+
definitionKey: string;
|
|
69
|
+
versionNumber: number;
|
|
70
|
+
businessKey: string | null;
|
|
71
|
+
status: InstanceStatus;
|
|
72
|
+
currentNodeKey: string | null;
|
|
73
|
+
variables: Record<string, unknown>;
|
|
74
|
+
startedBy: string | null;
|
|
75
|
+
startedAt: string;
|
|
76
|
+
completedAt: string | null;
|
|
77
|
+
failureReason: string | null;
|
|
78
|
+
}
|
|
79
|
+
/** One entry in the audit trail (`WorkflowDtos.AuditResponse`). */
|
|
80
|
+
export interface WorkflowAuditEntry {
|
|
81
|
+
id: string;
|
|
82
|
+
instanceId: string;
|
|
83
|
+
taskId: string | null;
|
|
84
|
+
nodeKey: string | null;
|
|
85
|
+
action: string;
|
|
86
|
+
actor: string | null;
|
|
87
|
+
occurredAt: string;
|
|
88
|
+
detail: Record<string, unknown>;
|
|
89
|
+
}
|
|
90
|
+
/** A workflow definition (`WorkflowDtos.DefinitionResponse`). */
|
|
91
|
+
export interface WorkflowDefinitionSummary {
|
|
92
|
+
id: string;
|
|
93
|
+
key: string;
|
|
94
|
+
name: string;
|
|
95
|
+
description: string | null;
|
|
96
|
+
category: string | null;
|
|
97
|
+
businessObject: string | null;
|
|
98
|
+
}
|
|
99
|
+
/** One deployed version of a workflow, without its authored document (`WorkflowDtos.VersionResponse`). */
|
|
100
|
+
export interface WorkflowVersionSummary {
|
|
101
|
+
id: string;
|
|
102
|
+
definitionKey: string;
|
|
103
|
+
versionNumber: number;
|
|
104
|
+
status: string;
|
|
105
|
+
nodeCount: number;
|
|
106
|
+
deployedBy: string | null;
|
|
107
|
+
deployedAt: string;
|
|
108
|
+
}
|
|
109
|
+
/** One deployed version of a workflow, including its authored document (`WorkflowDtos.VersionDetailResponse`). */
|
|
110
|
+
export interface WorkflowVersionDetail {
|
|
111
|
+
id: string;
|
|
112
|
+
definitionKey: string;
|
|
113
|
+
versionNumber: number;
|
|
114
|
+
status: string;
|
|
115
|
+
definition: string;
|
|
116
|
+
deployedBy: string | null;
|
|
117
|
+
deployedAt: string;
|
|
118
|
+
}
|
|
119
|
+
/** A registered business object type (`WorkflowDtos.BusinessObjectResponse`). */
|
|
120
|
+
export interface BusinessObject {
|
|
121
|
+
id: string;
|
|
122
|
+
code: string;
|
|
123
|
+
name: string;
|
|
124
|
+
description: string | null;
|
|
125
|
+
category: string | null;
|
|
126
|
+
keyLabel: string;
|
|
127
|
+
active: boolean;
|
|
128
|
+
attributes: WorkflowTaskAttribute[];
|
|
129
|
+
workflows: string[];
|
|
130
|
+
}
|
|
131
|
+
/** A registered form under a business object (`WorkflowDtos.FormResponse`). */
|
|
132
|
+
export interface WorkflowForm {
|
|
133
|
+
id: string;
|
|
134
|
+
businessObject: string | null;
|
|
135
|
+
formKey: string;
|
|
136
|
+
name: string;
|
|
137
|
+
version: number;
|
|
138
|
+
schema: string | null;
|
|
139
|
+
active: boolean;
|
|
140
|
+
createdBy: string | null;
|
|
141
|
+
createdAt: string;
|
|
142
|
+
}
|
|
143
|
+
/** A page of results, as returned by the engine's queue endpoints (`WorkflowDtos.PageResponse`). */
|
|
144
|
+
export interface WorkflowPage<T> {
|
|
145
|
+
content: T[];
|
|
146
|
+
pageNumber: number;
|
|
147
|
+
pageSize: number;
|
|
148
|
+
totalElements: number;
|
|
149
|
+
totalPages: number;
|
|
150
|
+
}
|
|
151
|
+
/** An engine error response (`WorkflowDtos.ErrorResponse`). */
|
|
152
|
+
export interface WorkflowErrorResponse {
|
|
153
|
+
error: string;
|
|
154
|
+
message: string;
|
|
155
|
+
timestamp: string;
|
|
156
|
+
}
|
|
157
|
+
/** Request body for deploying a workflow definition. */
|
|
158
|
+
export interface DeployWorkflowRequest {
|
|
159
|
+
key: string;
|
|
160
|
+
name?: string;
|
|
161
|
+
description?: string;
|
|
162
|
+
category?: string;
|
|
163
|
+
definition: string;
|
|
164
|
+
businessObject?: string;
|
|
165
|
+
activate?: boolean;
|
|
166
|
+
}
|
|
167
|
+
/** Request body for starting a new instance. */
|
|
168
|
+
export interface StartInstanceRequest {
|
|
169
|
+
definitionKey: string;
|
|
170
|
+
versionNumber?: number;
|
|
171
|
+
businessKey?: string;
|
|
172
|
+
variables?: Record<string, unknown>;
|
|
173
|
+
}
|
|
174
|
+
/** Request body for completing or rejecting a task. */
|
|
175
|
+
export interface CompleteTaskRequest {
|
|
176
|
+
outcome?: string;
|
|
177
|
+
variables?: Record<string, unknown>;
|
|
178
|
+
comment?: string;
|
|
179
|
+
}
|
|
180
|
+
/** Request body for reassigning a task. */
|
|
181
|
+
export interface ReassignTaskRequest {
|
|
182
|
+
assigneeType: string;
|
|
183
|
+
assignee: string;
|
|
184
|
+
}
|
|
185
|
+
/** Request body for cancelling an instance. */
|
|
186
|
+
export interface CancelInstanceRequest {
|
|
187
|
+
reason?: string;
|
|
188
|
+
}
|
|
189
|
+
/** Request body for signalling an external event to an instance. */
|
|
190
|
+
export interface SignalEventRequest {
|
|
191
|
+
eventName: string;
|
|
192
|
+
variables?: Record<string, unknown>;
|
|
193
|
+
}
|
|
194
|
+
/** Request body for setting instance variables directly. */
|
|
195
|
+
export interface SetVariablesRequest {
|
|
196
|
+
variables?: Record<string, unknown>;
|
|
197
|
+
}
|
|
198
|
+
/** Search criteria for `POST /workflow/queue/search`. */
|
|
199
|
+
export interface QueueSearchCriteria {
|
|
200
|
+
definitionKey?: string;
|
|
201
|
+
nodeKey?: string;
|
|
202
|
+
claimedBy?: string;
|
|
203
|
+
searchText?: string;
|
|
204
|
+
/** ISO instant. */
|
|
205
|
+
dueBefore?: string;
|
|
206
|
+
minPriority?: TaskPriority;
|
|
207
|
+
states?: TaskState[];
|
|
208
|
+
types?: Array<'HUMAN' | 'SYSTEM'>;
|
|
209
|
+
assignees?: string[];
|
|
210
|
+
}
|
|
211
|
+
/** One declared attribute in a business-object registration request. */
|
|
212
|
+
export interface RegisterAttributeRequest {
|
|
213
|
+
key: string;
|
|
214
|
+
label?: string;
|
|
215
|
+
type?: string;
|
|
216
|
+
group?: string;
|
|
217
|
+
order?: number;
|
|
218
|
+
valueTemplate?: string;
|
|
219
|
+
severityExpression?: string;
|
|
220
|
+
}
|
|
221
|
+
/** Request body for registering a business object type. */
|
|
222
|
+
export interface RegisterBusinessObjectRequest {
|
|
223
|
+
code: string;
|
|
224
|
+
name?: string;
|
|
225
|
+
description?: string;
|
|
226
|
+
category?: string;
|
|
227
|
+
keyLabel?: string;
|
|
228
|
+
attributes?: RegisterAttributeRequest[];
|
|
229
|
+
}
|
|
230
|
+
/** Request body for registering a form under a business object. */
|
|
231
|
+
export interface RegisterFormRequest {
|
|
232
|
+
formKey: string;
|
|
233
|
+
name?: string;
|
|
234
|
+
schema?: string;
|
|
235
|
+
activate?: boolean;
|
|
236
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -56,3 +56,5 @@ export * from './lib/validators/common-validators';
|
|
|
56
56
|
export * from './lib/components/keycloak-error-banner/keycloak-error-page.component';
|
|
57
57
|
export * from './lib/components/not-found/not-found.component';
|
|
58
58
|
export * from './lib/components/unauthorized/unauthorized.component';
|
|
59
|
+
export * from './lib/workflow-engine/workflow-engine.models';
|
|
60
|
+
export * from './lib/workflow-engine/workflow-engine-api.service';
|