@yuuvis/bpm-management-app 1.0.4 → 1.1.0-alpha.2

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.
@@ -3,16 +3,29 @@ import { Observable } from 'rxjs';
3
3
  import { TranslateService } from '@yuuvis/client-core';
4
4
  import * as i0 from '@angular/core';
5
5
 
6
+ /**
7
+ * Deployments, process definitions, processes and tasks are rendered by the same master/details
8
+ * container, the entity comes from the route data. Deployments and process definitions are optional. The empty path opens the first enabled entity.
9
+ */
6
10
  declare const YuvBpmManagementRoutes: Route[];
7
11
 
8
12
  declare const APP_ID = "io.yuuvis.app.bpm-management";
13
+ /**
14
+ * Custom data a shell client can set on the app's route (`App.data`) to configure the app.
15
+ */
16
+ interface BpmManagementAppData {
17
+ /** Show the deployments tab. Shown unless set to `false`. */
18
+ showDeployments?: boolean;
19
+ /** Show the process definitions tab. Shown unless set to `false`. */
20
+ showProcessDefinitions?: boolean;
21
+ }
9
22
  interface DeploymentInstance {
10
23
  id: string;
11
24
  name: string;
12
25
  category: string;
13
26
  deploymentTime: string;
14
- resources: DeploymentResourceData[];
15
- definitions: ProcessDefinitionInstance[];
27
+ resources?: DeploymentResourceData[];
28
+ definitions?: ProcessDefinitionInstance[];
16
29
  }
17
30
  interface DeploymentResourceData {
18
31
  id: string;
@@ -60,7 +73,7 @@ interface ProcessInstance {
60
73
  durationInMillis: number | null;
61
74
  endTime: string | null;
62
75
  suspended: boolean;
63
- variables: ProcessVariable[];
76
+ variables?: ProcessVariable[];
64
77
  }
65
78
  interface ProcessHistory {
66
79
  tasks: TaskInstance[];
@@ -110,12 +123,12 @@ interface TaskAssignmentHistoryEntry {
110
123
  declare const ProcessDefinitionScope: {
111
124
  readonly GLOBAL: {
112
125
  readonly value: "GLOBAL";
113
- readonly label: "yuv.app.bpm-management.processdefinitions.scope.global";
126
+ readonly label: "yuv.app.bpm-management.definitions.scope.global";
114
127
  readonly icon: "globe";
115
128
  };
116
129
  readonly TENANT: {
117
130
  readonly value: "TENANT";
118
- readonly label: "yuv.app.bpm-management.processdefinitions.scope.tenant";
131
+ readonly label: "yuv.app.bpm-management.definitions.scope.tenant";
119
132
  readonly icon: "tenant";
120
133
  };
121
134
  };
@@ -146,12 +159,22 @@ declare const ProcessStatus: {
146
159
  readonly value: "COMPLETED";
147
160
  readonly label: "yuv.app.bpm-management.status.completed";
148
161
  };
162
+ /** Display only, not a filter value: an ended process with a delete reason was cancelled. */
163
+ readonly CANCELED: {
164
+ readonly value: "CANCELED";
165
+ readonly label: "yuv.app.bpm-management.status.canceled";
166
+ };
149
167
  };
150
168
  declare const TaskStatus: {
151
169
  readonly RUNNING: {
152
170
  readonly value: "RUNNING";
153
171
  readonly label: "yuv.app.bpm-management.status.running";
154
172
  };
173
+ /** Display only, not a filter value: the task (or its process) is suspended. */
174
+ readonly SUSPENDED: {
175
+ readonly value: "SUSPENDED";
176
+ readonly label: "yuv.app.bpm-management.status.suspended";
177
+ };
155
178
  readonly COMPLETED: {
156
179
  readonly value: "COMPLETED";
157
180
  readonly label: "yuv.app.bpm-management.status.completed";
@@ -318,6 +341,31 @@ interface FilterValue {
318
341
  }
319
342
  type DateFormatType = 'datetime' | 'date' | 'time';
320
343
  declare function formatDateTime(utcDateString: string, locale: string, type?: DateFormatType): string;
344
+ /** The entities of the app. The value is also the route path. */
345
+ type BpmEntity = 'deployments' | 'definitions' | 'processes' | 'tasks';
346
+ declare const BPM_ENTITIES: BpmEntity[];
347
+ /** `icon` stands for the entity as a whole (navigation, list header), `itemIcon` for one item of it (details header, list row, references from other lists). */
348
+ declare const BPM_ENTITY_META: Record<BpmEntity, {
349
+ icon: string;
350
+ itemIcon: string;
351
+ label: string;
352
+ }>;
353
+ /** An item of any entity of the app. */
354
+ type BpmItem = DeploymentInstance | ProcessDefinitionInstance | ProcessInstance | TaskInstance;
355
+ /** Severity of a status badge (see `ymt-badge`). */
356
+ type BadgeSeverity = 'primary' | 'success' | 'warning' | 'neutral';
357
+ declare function processSeverity(p: ProcessInstance): BadgeSeverity;
358
+ /** Material icon for the status badge of a process. */
359
+ declare function processStatusIcon(p: ProcessInstance): string;
360
+ declare function processStatusLabel(p: ProcessInstance): string;
361
+ declare function taskSeverity(t: TaskInstance): BadgeSeverity;
362
+ /** Material icon for the status badge of a task. */
363
+ declare function taskStatusIcon(t: TaskInstance): string;
364
+ declare function taskStatusLabel(t: TaskInstance): string;
365
+ declare function definitionSeverity(d: ProcessDefinitionInstance): BadgeSeverity;
366
+ /** The icon of a process definition. Always the default for now, definitions will get custom icons. */
367
+ declare function definitionIcon(_d: ProcessDefinitionInstance): string;
368
+ declare function definitionStatusLabel(d: ProcessDefinitionInstance): string;
321
369
 
322
370
  /**
323
371
  * Base class for BPM filter conversion with shared logic
@@ -400,6 +448,8 @@ declare class TaskFilter extends BaseBpmFilter {
400
448
  id: string;
401
449
  name: string;
402
450
  status: string;
451
+ processDefinitionId: string;
452
+ processInstanceId: string;
403
453
  assignee: string;
404
454
  owner: string;
405
455
  createTimeBefore: string;
@@ -410,39 +460,54 @@ declare class TaskFilter extends BaseBpmFilter {
410
460
  id: FilterValue | undefined;
411
461
  name: FilterValue | undefined;
412
462
  status: FilterValue | undefined;
463
+ processDefinitionId: FilterValue | undefined;
464
+ processInstanceId: FilterValue | undefined;
413
465
  assignee: FilterValue | undefined;
414
466
  owner: FilterValue | undefined;
415
467
  createTimeBefore: FilterValue | undefined;
416
- createimeAfter: FilterValue | undefined;
468
+ createTimeAfter: FilterValue | undefined;
417
469
  endTimeBefore: FilterValue | undefined;
418
470
  endTimeAfter: FilterValue | undefined;
419
471
  static fromAgFilterModel(tableFilters: TableFilters, ts: TranslateService): TaskFilter;
420
472
  protected static handleSelectFilter(filterInstance: any, columnFilter: string, columnFilterData: any): void;
421
473
  }
422
474
 
423
- declare class YuvBpmAdminService {
475
+ declare class YuvBpmManagementService {
424
476
  #private;
425
477
  static DEFAULT_PAGE_SIZE: number;
426
478
  private readonly bpmApiBase;
427
- getDeployments(page: number, size: number, filter?: DeploymentFilter): Observable<any>;
479
+ getDeployments(page: number, size: number, filter?: DeploymentFilter, sort?: {
480
+ by: string;
481
+ order: 'asc' | 'desc';
482
+ }): Observable<any>;
428
483
  getDeployment(deploymentId: string): Observable<DeploymentInstance | null>;
429
484
  getDeploymentResources(deploymentId: string): Observable<any>;
430
- getProcessDefinitions(page: number, size: number, filter?: ProcessDefinitionFilter): Observable<any>;
485
+ getProcessDefinitions(page: number, size: number, filter?: ProcessDefinitionFilter, sort?: {
486
+ by: string;
487
+ order: 'asc' | 'desc';
488
+ }): Observable<any>;
431
489
  getProcessDefinition(processDefinitionInstanceId: string): Observable<ProcessDefinitionInstance | null>;
432
490
  executeProcessDefinitionAction(processDefinitionInstanceId: string, action: string, includeProcesses: boolean): Observable<any>;
433
- getProcesses(page: number, size: number, filter?: ProcessFilter): Observable<any>;
491
+ executeProcessAction(processInstanceId: string, action: 'suspend' | 'activate'): Observable<any>;
492
+ getProcesses(page: number, size: number, filter?: ProcessFilter, sort?: {
493
+ by: string;
494
+ order: 'asc' | 'desc';
495
+ }): Observable<any>;
434
496
  getProcess(processInstanceId: string): Observable<ProcessInstance | null>;
435
497
  getProcessHistory(processInstanceId: string): Observable<ProcessHistory | null>;
436
- getTasks(page: number, size: number, filter?: TaskFilter): Observable<any>;
498
+ getTasks(page: number, size: number, filter?: TaskFilter, sort?: {
499
+ by: string;
500
+ order: 'asc' | 'desc';
501
+ }): Observable<any>;
437
502
  getTask(taskId: string): Observable<TaskInstance | null>;
438
503
  assignTask(taskId: string, assignee: string | null): Observable<any>;
439
504
  setTaskCandidates(taskId: string, body: {
440
505
  users?: string[];
441
506
  roles?: string[];
442
507
  }): Observable<any>;
443
- static ɵfac: i0.ɵɵFactoryDeclaration<YuvBpmAdminService, never>;
444
- static ɵprov: i0.ɵɵInjectableDeclaration<YuvBpmAdminService>;
508
+ static ɵfac: i0.ɵɵFactoryDeclaration<YuvBpmManagementService, never>;
509
+ static ɵprov: i0.ɵɵInjectableDeclaration<YuvBpmManagementService>;
445
510
  }
446
511
 
447
- export { APP_ICONS, APP_ID, FILTER_OPERATORS, FILTER_TYPES, ProcessDefinitionScope, ProcessDefinitionStatus, ProcessStatus, TaskStatus, YuvBpmAdminService, YuvBpmManagementRoutes, formatDateTime };
448
- export type { Column, ColumnFilter, DateColumnFilter, DateFormatType, DeploymentInstance, DeploymentResourceData, DeploymentsSearchResponse, FilterOption, FilterValue, NumberColumnFilter, Pagination, ProcessDefinitionInstance, ProcessDefinitionSearchResponse, ProcessHistory, ProcessInstance, ProcessVariable, ProcessdefinitionStatisticsData, ProcessesSearchResponse, ProcessinstanceCountData, SelectColumnFilter, TableFilters, TaskAssignmentHistoryEntry, TaskIdentityLinks, TaskInstance, TaskVariable, TasksSearchResponse, TextColumnFilter, UserColumnFilter };
512
+ export { APP_ICONS, APP_ID, BPM_ENTITIES, BPM_ENTITY_META, FILTER_OPERATORS, FILTER_TYPES, ProcessDefinitionScope, ProcessDefinitionStatus, ProcessStatus, TaskStatus, YuvBpmManagementRoutes, YuvBpmManagementService, definitionIcon, definitionSeverity, definitionStatusLabel, formatDateTime, processSeverity, processStatusIcon, processStatusLabel, taskSeverity, taskStatusIcon, taskStatusLabel };
513
+ export type { BadgeSeverity, BpmEntity, BpmItem, BpmManagementAppData, Column, ColumnFilter, DateColumnFilter, DateFormatType, DeploymentInstance, DeploymentResourceData, DeploymentsSearchResponse, FilterOption, FilterValue, NumberColumnFilter, Pagination, ProcessDefinitionInstance, ProcessDefinitionSearchResponse, ProcessHistory, ProcessInstance, ProcessVariable, ProcessdefinitionStatisticsData, ProcessesSearchResponse, ProcessinstanceCountData, SelectColumnFilter, TableFilters, TaskAssignmentHistoryEntry, TaskIdentityLinks, TaskInstance, TaskVariable, TasksSearchResponse, TextColumnFilter, UserColumnFilter };
package/yuv-manifest.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "id": "io.yuuvis.app.bpm-management",
3
- "title": "yuuvis BPM Admin",
3
+ "title": "yuuvis bpm-management",
4
4
  "ui": {
5
5
  "path": "bpm-management",
6
6
  "iconName": "flowchart",
7
- "routes": "YuvBpmAdminRoutes",
7
+ "routes": "YuvBpmManagementRoutes",
8
8
  "options": {
9
9
  "appHeader": true
10
10
  }
11
11
  },
12
- "extension": "YuvBpmAdminExtension"
12
+ "extension": "YuvBpmManagementExtension"
13
13
  }