@rytass/bpm-core-nestjs-module 0.22.0 → 0.23.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/CHANGELOG.md +64 -0
- package/package.json +2 -2
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/index.js.map +1 -1
- package/src/lib/bpm/bpm-root-options.d.ts +57 -0
- package/src/lib/bpm/bpm-root-options.js.map +1 -1
- package/src/lib/bpm/bpm-root.module.d.ts +21 -0
- package/src/lib/bpm/bpm-root.module.js +6 -0
- package/src/lib/bpm/bpm-root.module.js.map +1 -1
- package/src/lib/form/dto/form-definition.input.d.ts +5 -0
- package/src/lib/form/dto/form-definition.input.js.map +1 -1
- package/src/lib/form/form-definition.entity.d.ts +5 -0
- package/src/lib/form/form-definition.entity.js +7 -0
- package/src/lib/form/form-definition.entity.js.map +1 -1
- package/src/lib/form/form-schema.validator.js +17 -5
- package/src/lib/form/form-schema.validator.js.map +1 -1
- package/src/lib/form/form.queries.d.ts +2 -2
- package/src/lib/form/form.queries.js +17 -5
- package/src/lib/form/form.queries.js.map +1 -1
- package/src/lib/form/form.service.d.ts +2 -1
- package/src/lib/form/form.service.js +10 -5
- package/src/lib/form/form.service.js.map +1 -1
- package/src/lib/form-data-source/form-data-source-value-resolver.service.js +22 -2
- package/src/lib/form-data-source/form-data-source-value-resolver.service.js.map +1 -1
- package/src/lib/form-data-source/form-data-source.errors.d.ts +11 -0
- package/src/lib/form-data-source/form-data-source.errors.js +14 -1
- package/src/lib/form-data-source/form-data-source.errors.js.map +1 -1
- package/src/lib/form-data-source/form-data-source.service.d.ts +6 -0
- package/src/lib/form-data-source/form-data-source.service.js +37 -3
- package/src/lib/form-data-source/form-data-source.service.js.map +1 -1
- package/src/lib/instance-event/approval-instance-event.entity.d.ts +27 -0
- package/src/lib/instance-event/approval-instance-event.entity.js +93 -0
- package/src/lib/instance-event/approval-instance-event.entity.js.map +1 -0
- package/src/lib/instance-event/index.d.ts +13 -0
- package/src/lib/instance-event/index.js +17 -0
- package/src/lib/instance-event/index.js.map +1 -0
- package/src/lib/instance-event/instance-event.delivery-scheduler.service.d.ts +21 -0
- package/src/lib/instance-event/instance-event.delivery-scheduler.service.js +81 -0
- package/src/lib/instance-event/instance-event.delivery-scheduler.service.js.map +1 -0
- package/src/lib/instance-event/instance-event.delivery.service.d.ts +69 -0
- package/src/lib/instance-event/instance-event.delivery.service.js +259 -0
- package/src/lib/instance-event/instance-event.delivery.service.js.map +1 -0
- package/src/lib/instance-event/instance-event.delivery.subscriber.d.ts +24 -0
- package/src/lib/instance-event/instance-event.delivery.subscriber.js +85 -0
- package/src/lib/instance-event/instance-event.delivery.subscriber.js.map +1 -0
- package/src/lib/instance-event/instance-event.enums.d.ts +12 -0
- package/src/lib/instance-event/instance-event.enums.js +28 -0
- package/src/lib/instance-event/instance-event.enums.js.map +1 -0
- package/src/lib/instance-event/instance-event.module.d.ts +13 -0
- package/src/lib/instance-event/instance-event.module.js +52 -0
- package/src/lib/instance-event/instance-event.module.js.map +1 -0
- package/src/lib/instance-event/instance-event.object.d.ts +24 -0
- package/src/lib/instance-event/instance-event.object.js +73 -0
- package/src/lib/instance-event/instance-event.object.js.map +1 -0
- package/src/lib/instance-event/instance-event.options.d.ts +26 -0
- package/src/lib/instance-event/instance-event.options.js +35 -0
- package/src/lib/instance-event/instance-event.options.js.map +1 -0
- package/src/lib/instance-event/instance-event.resolver.d.ts +10 -0
- package/src/lib/instance-event/instance-event.resolver.js +75 -0
- package/src/lib/instance-event/instance-event.resolver.js.map +1 -0
- package/src/lib/instance-event/instance-event.service.d.ts +18 -0
- package/src/lib/instance-event/instance-event.service.js +37 -0
- package/src/lib/instance-event/instance-event.service.js.map +1 -0
- package/src/lib/instance-event/instance-event.token.d.ts +19 -0
- package/src/lib/instance-event/instance-event.token.js +9 -0
- package/src/lib/instance-event/instance-event.token.js.map +1 -0
- package/src/lib/instance-event/instance-event.types.d.ts +67 -0
- package/src/lib/instance-event/instance-event.types.js +9 -0
- package/src/lib/instance-event/instance-event.types.js.map +1 -0
- package/src/lib/instance-event/instance-event.writer.d.ts +21 -0
- package/src/lib/instance-event/instance-event.writer.js +45 -0
- package/src/lib/instance-event/instance-event.writer.js.map +1 -0
- package/src/lib/migrations/0000000032000-host-integration-round.d.ts +25 -0
- package/src/lib/migrations/0000000032000-host-integration-round.js +104 -0
- package/src/lib/migrations/0000000032000-host-integration-round.js.map +1 -0
- package/src/lib/migrations/index.d.ts +1 -0
- package/src/lib/migrations/index.js +3 -0
- package/src/lib/migrations/index.js.map +1 -1
- package/src/lib/notification/notification.service.js +50 -9
- package/src/lib/notification/notification.service.js.map +1 -1
- package/src/lib/template/approval-template-version.entity.d.ts +9 -1
- package/src/lib/template/approval-template-version.entity.js +11 -1
- package/src/lib/template/approval-template-version.entity.js.map +1 -1
- package/src/lib/template/approval-template.entity.d.ts +18 -0
- package/src/lib/template/approval-template.entity.js +23 -0
- package/src/lib/template/approval-template.entity.js.map +1 -1
- package/src/lib/template/dto/approval-template.input.d.ts +21 -0
- package/src/lib/template/dto/approval-template.input.js +38 -0
- package/src/lib/template/dto/approval-template.input.js.map +1 -1
- package/src/lib/template/dto/compose-approval-template.input.d.ts +23 -0
- package/src/lib/template/dto/compose-approval-template.input.js +37 -0
- package/src/lib/template/dto/compose-approval-template.input.js.map +1 -1
- package/src/lib/template/template-key.d.ts +26 -0
- package/src/lib/template/template-key.js +67 -0
- package/src/lib/template/template-key.js.map +1 -0
- package/src/lib/template/template.enums.d.ts +11 -0
- package/src/lib/template/template.enums.js +17 -1
- package/src/lib/template/template.enums.js.map +1 -1
- package/src/lib/template/template.queries.d.ts +3 -2
- package/src/lib/template/template.queries.js +29 -4
- package/src/lib/template/template.queries.js.map +1 -1
- package/src/lib/template/template.service.d.ts +8 -1
- package/src/lib/template/template.service.js +94 -17
- package/src/lib/template/template.service.js.map +1 -1
- package/src/lib/workflow-engine/approver-filled-table-columns.d.ts +91 -0
- package/src/lib/workflow-engine/approver-filled-table-columns.js +301 -0
- package/src/lib/workflow-engine/approver-filled-table-columns.js.map +1 -0
- package/src/lib/workflow-engine/dto/dry-run-approval-workflow.input.d.ts +7 -0
- package/src/lib/workflow-engine/dto/dry-run-approval-workflow.input.js +9 -0
- package/src/lib/workflow-engine/dto/dry-run-approval-workflow.input.js.map +1 -1
- package/src/lib/workflow-engine/index.d.ts +1 -0
- package/src/lib/workflow-engine/index.js +1 -0
- package/src/lib/workflow-engine/index.js.map +1 -1
- package/src/lib/workflow-engine/instance-guard.runner.d.ts +19 -0
- package/src/lib/workflow-engine/instance-guard.runner.js +102 -0
- package/src/lib/workflow-engine/instance-guard.runner.js.map +1 -0
- package/src/lib/workflow-engine/instance-guard.token.d.ts +101 -0
- package/src/lib/workflow-engine/instance-guard.token.js +9 -0
- package/src/lib/workflow-engine/instance-guard.token.js.map +1 -0
- package/src/lib/workflow-engine/missing-form-fields.d.ts +12 -0
- package/src/lib/workflow-engine/missing-form-fields.js +27 -0
- package/src/lib/workflow-engine/missing-form-fields.js.map +1 -0
- package/src/lib/workflow-engine/workflow-engine.module.d.ts +2 -0
- package/src/lib/workflow-engine/workflow-engine.module.js +3 -0
- package/src/lib/workflow-engine/workflow-engine.module.js.map +1 -1
- package/src/lib/workflow-engine/workflow-engine.mutations.d.ts +1 -1
- package/src/lib/workflow-engine/workflow-engine.mutations.js +8 -3
- package/src/lib/workflow-engine/workflow-engine.mutations.js.map +1 -1
- package/src/lib/workflow-engine/workflow-engine.queries.d.ts +7 -7
- package/src/lib/workflow-engine/workflow-engine.queries.js +97 -28
- package/src/lib/workflow-engine/workflow-engine.queries.js.map +1 -1
- package/src/lib/workflow-engine/workflow-engine.service.d.ts +141 -7
- package/src/lib/workflow-engine/workflow-engine.service.js +653 -75
- package/src/lib/workflow-engine/workflow-engine.service.js.map +1 -1
- package/src/lib/workflow-engine/workflow-engine.tokens.d.ts +5 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var InstanceEventDeliverySubscriber_1;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.InstanceEventDeliverySubscriber = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const common_1 = require("@nestjs/common");
|
|
7
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
8
|
+
const typeorm_2 = require("typeorm");
|
|
9
|
+
const approval_instance_event_entity_1 = require("./approval-instance-event.entity");
|
|
10
|
+
const instance_event_delivery_service_1 = require("./instance-event.delivery.service");
|
|
11
|
+
/**
|
|
12
|
+
* Starts delivery of a lifecycle event the moment the transaction that wrote
|
|
13
|
+
* it commits (ADR 27 §1.3), without every engine entry point having to
|
|
14
|
+
* remember to.
|
|
15
|
+
*
|
|
16
|
+
* Inserted ids are held per query runner and released on commit; a rollback
|
|
17
|
+
* drops them, so an event whose state change was rolled back is never
|
|
18
|
+
* delivered. The kick is best effort and never awaited: the scheduler
|
|
19
|
+
* releases anything it misses.
|
|
20
|
+
*/
|
|
21
|
+
let InstanceEventDeliverySubscriber = InstanceEventDeliverySubscriber_1 = class InstanceEventDeliverySubscriber {
|
|
22
|
+
constructor(dataSource, deliveryService) {
|
|
23
|
+
this.deliveryService = deliveryService;
|
|
24
|
+
this.logger = new common_1.Logger(InstanceEventDeliverySubscriber_1.name);
|
|
25
|
+
this.pending = new WeakMap();
|
|
26
|
+
// The documented way to register a Nest-managed subscriber; guarded so a
|
|
27
|
+
// stand-in data source in tests does not break the module graph.
|
|
28
|
+
if (Array.isArray(dataSource?.subscribers)) {
|
|
29
|
+
dataSource.subscribers.push(this);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
listenTo() {
|
|
33
|
+
return approval_instance_event_entity_1.ApprovalInstanceEventEntity;
|
|
34
|
+
}
|
|
35
|
+
afterInsert(event) {
|
|
36
|
+
const row = event.entity;
|
|
37
|
+
if (!row?.id || row.status !== 'PENDING') {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (!event.queryRunner?.isTransactionActive) {
|
|
41
|
+
this.kick([row.id]);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const queued = this.pending.get(event.queryRunner) ?? [];
|
|
45
|
+
this.pending.set(event.queryRunner, [...queued, row.id]);
|
|
46
|
+
}
|
|
47
|
+
afterTransactionCommit(event) {
|
|
48
|
+
// Releasing a savepoint broadcasts the same event while the outer
|
|
49
|
+
// transaction is still open and its rows still invisible. Wait for the
|
|
50
|
+
// real COMMIT, after which TypeORM has cleared `isTransactionActive`.
|
|
51
|
+
if (event.queryRunner.isTransactionActive) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const ids = this.pending.get(event.queryRunner) ?? [];
|
|
55
|
+
this.pending.delete(event.queryRunner);
|
|
56
|
+
if (ids.length > 0) {
|
|
57
|
+
this.kick(ids);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
afterTransactionRollback(event) {
|
|
61
|
+
// Rolling back to a savepoint leaves the outer transaction, and the rows
|
|
62
|
+
// it queued outside that savepoint, intact.
|
|
63
|
+
if (event.queryRunner.isTransactionActive) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
this.pending.delete(event.queryRunner);
|
|
67
|
+
}
|
|
68
|
+
kick(ids) {
|
|
69
|
+
setImmediate(() => {
|
|
70
|
+
this.deliveryService
|
|
71
|
+
.deliverByIds([...new Set(ids)])
|
|
72
|
+
.catch((error) => {
|
|
73
|
+
this.logger.warn(`Immediate instance event delivery failed; the scheduler will retry: ${error instanceof Error ? error.message : String(error)}`);
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
exports.InstanceEventDeliverySubscriber = InstanceEventDeliverySubscriber;
|
|
79
|
+
exports.InstanceEventDeliverySubscriber = InstanceEventDeliverySubscriber = InstanceEventDeliverySubscriber_1 = tslib_1.__decorate([
|
|
80
|
+
(0, common_1.Injectable)(),
|
|
81
|
+
tslib_1.__param(0, (0, typeorm_1.InjectDataSource)()),
|
|
82
|
+
tslib_1.__metadata("design:paramtypes", [typeorm_2.DataSource,
|
|
83
|
+
instance_event_delivery_service_1.InstanceEventDeliveryService])
|
|
84
|
+
], InstanceEventDeliverySubscriber);
|
|
85
|
+
//# sourceMappingURL=instance-event.delivery.subscriber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance-event.delivery.subscriber.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/instance-event/instance-event.delivery.subscriber.ts"],"names":[],"mappings":";;;;;AAAA,2CAAoD;AACpD,6CAAmD;AACnD,qCAOiB;AACjB,qFAA+E;AAC/E,uFAAiF;AAEjF;;;;;;;;;GASG;AAEI,IAAM,+BAA+B,uCAArC,MAAM,+BAA+B;IAI1C,YACsB,UAAsB,EACzB,eAA6C;QAA7C,oBAAe,GAAf,eAAe,CAA8B;QAL/C,WAAM,GAAG,IAAI,eAAM,CAAC,iCAA+B,CAAC,IAAI,CAAC,CAAC;QAC1D,YAAO,GAAG,IAAI,OAAO,EAAkC,CAAC;QAMvE,yEAAyE;QACzE,iEAAiE;QACjE,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,WAAW,CAAC,EAAE,CAAC;YAC3C,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IAED,QAAQ;QACN,OAAO,4DAA2B,CAAC;IACrC,CAAC;IAED,WAAW,CAAC,KAA+C;QACzD,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC;QAEzB,IAAI,CAAC,GAAG,EAAE,EAAE,IAAI,GAAG,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YACzC,OAAO;QACT,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,mBAAmB,EAAE,CAAC;YAC5C,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;YAEpB,OAAO;QACT,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QAEzD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,GAAG,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,sBAAsB,CAAC,KAA6B;QAClD,kEAAkE;QAClE,uEAAuE;QACvE,sEAAsE;QACtE,IAAI,KAAK,CAAC,WAAW,CAAC,mBAAmB,EAAE,CAAC;YAC1C,OAAO;QACT,CAAC;QAED,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QAEtD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAEvC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACnB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjB,CAAC;IACH,CAAC;IAED,wBAAwB,CAAC,KAA+B;QACtD,yEAAyE;QACzE,4CAA4C;QAC5C,IAAI,KAAK,CAAC,WAAW,CAAC,mBAAmB,EAAE,CAAC;YAC1C,OAAO;QACT,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IACzC,CAAC;IAEO,IAAI,CAAC,GAAsB;QACjC,YAAY,CAAC,GAAS,EAAE;YACtB,IAAI,CAAC,eAAe;iBACjB,YAAY,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;iBAC/B,KAAK,CAAC,CAAC,KAAc,EAAQ,EAAE;gBAC9B,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,uEACE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,EAAE,CACH,CAAC;YACJ,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA7EY,0EAA+B;0CAA/B,+BAA+B;IAD3C,IAAA,mBAAU,GAAE;IAMR,mBAAA,IAAA,0BAAgB,GAAE,CAAA;6CAAa,oBAAU;QACR,8DAA4B;GANrD,+BAA+B,CA6E3C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BPMInstanceEventStatus } from './instance-event.types';
|
|
2
|
+
/**
|
|
3
|
+
* GraphQL view of the outbox status. Values match `BPMInstanceEventStatus`
|
|
4
|
+
* one to one; the two maps below keep that pairing checked by the compiler.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum ApprovalInstanceEventStatusEnum {
|
|
7
|
+
DELIVERED = "DELIVERED",
|
|
8
|
+
FAILED = "FAILED",
|
|
9
|
+
PENDING = "PENDING"
|
|
10
|
+
}
|
|
11
|
+
export declare const APPROVAL_INSTANCE_EVENT_STATUS_TO_ENUM: Readonly<Record<BPMInstanceEventStatus, ApprovalInstanceEventStatusEnum>>;
|
|
12
|
+
export declare const APPROVAL_INSTANCE_EVENT_ENUM_TO_STATUS: Readonly<Record<ApprovalInstanceEventStatusEnum, BPMInstanceEventStatus>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.APPROVAL_INSTANCE_EVENT_ENUM_TO_STATUS = exports.APPROVAL_INSTANCE_EVENT_STATUS_TO_ENUM = exports.ApprovalInstanceEventStatusEnum = void 0;
|
|
4
|
+
const graphql_1 = require("@nestjs/graphql");
|
|
5
|
+
/**
|
|
6
|
+
* GraphQL view of the outbox status. Values match `BPMInstanceEventStatus`
|
|
7
|
+
* one to one; the two maps below keep that pairing checked by the compiler.
|
|
8
|
+
*/
|
|
9
|
+
var ApprovalInstanceEventStatusEnum;
|
|
10
|
+
(function (ApprovalInstanceEventStatusEnum) {
|
|
11
|
+
ApprovalInstanceEventStatusEnum["DELIVERED"] = "DELIVERED";
|
|
12
|
+
ApprovalInstanceEventStatusEnum["FAILED"] = "FAILED";
|
|
13
|
+
ApprovalInstanceEventStatusEnum["PENDING"] = "PENDING";
|
|
14
|
+
})(ApprovalInstanceEventStatusEnum || (exports.ApprovalInstanceEventStatusEnum = ApprovalInstanceEventStatusEnum = {}));
|
|
15
|
+
(0, graphql_1.registerEnumType)(ApprovalInstanceEventStatusEnum, {
|
|
16
|
+
name: 'BPMApprovalInstanceEventStatus',
|
|
17
|
+
});
|
|
18
|
+
exports.APPROVAL_INSTANCE_EVENT_STATUS_TO_ENUM = {
|
|
19
|
+
DELIVERED: ApprovalInstanceEventStatusEnum.DELIVERED,
|
|
20
|
+
FAILED: ApprovalInstanceEventStatusEnum.FAILED,
|
|
21
|
+
PENDING: ApprovalInstanceEventStatusEnum.PENDING,
|
|
22
|
+
};
|
|
23
|
+
exports.APPROVAL_INSTANCE_EVENT_ENUM_TO_STATUS = {
|
|
24
|
+
[ApprovalInstanceEventStatusEnum.DELIVERED]: 'DELIVERED',
|
|
25
|
+
[ApprovalInstanceEventStatusEnum.FAILED]: 'FAILED',
|
|
26
|
+
[ApprovalInstanceEventStatusEnum.PENDING]: 'PENDING',
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=instance-event.enums.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance-event.enums.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/instance-event/instance-event.enums.ts"],"names":[],"mappings":";;;AAAA,6CAAmD;AAGnD;;;GAGG;AACH,IAAY,+BAIX;AAJD,WAAY,+BAA+B;IACzC,0DAAuB,CAAA;IACvB,oDAAiB,CAAA;IACjB,sDAAmB,CAAA;AACrB,CAAC,EAJW,+BAA+B,+CAA/B,+BAA+B,QAI1C;AAED,IAAA,0BAAgB,EAAC,+BAA+B,EAAE;IAChD,IAAI,EAAE,gCAAgC;CACvC,CAAC,CAAC;AAEU,QAAA,sCAAsC,GAE/C;IACF,SAAS,EAAE,+BAA+B,CAAC,SAAS;IACpD,MAAM,EAAE,+BAA+B,CAAC,MAAM;IAC9C,OAAO,EAAE,+BAA+B,CAAC,OAAO;CACjD,CAAC;AAEW,QAAA,sCAAsC,GAE/C;IACF,CAAC,+BAA+B,CAAC,SAAS,CAAC,EAAE,WAAW;IACxD,CAAC,+BAA+B,CAAC,MAAM,CAAC,EAAE,QAAQ;IAClD,CAAC,+BAA+B,CAAC,OAAO,CAAC,EAAE,SAAS;CACrD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DynamicModule, ModuleMetadata, Provider } from '@nestjs/common';
|
|
2
|
+
import { BPMInstanceEventObserver } from './instance-event.token';
|
|
3
|
+
export interface InstanceEventModuleOptions extends Pick<ModuleMetadata, 'imports'> {
|
|
4
|
+
readonly observerProvider?: Provider<BPMInstanceEventObserver>;
|
|
5
|
+
}
|
|
6
|
+
export declare class InstanceEventModule {
|
|
7
|
+
/**
|
|
8
|
+
* `BPM_INSTANCE_EVENT_OBSERVER` is exported only when `observerProvider` is
|
|
9
|
+
* given. Exporting an unprovided token makes Nest fail with
|
|
10
|
+
* `UnknownExportException`.
|
|
11
|
+
*/
|
|
12
|
+
static forRoot(options?: InstanceEventModuleOptions): DynamicModule;
|
|
13
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var InstanceEventModule_1;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.InstanceEventModule = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const common_1 = require("@nestjs/common");
|
|
7
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
8
|
+
const approval_instance_event_entity_1 = require("./approval-instance-event.entity");
|
|
9
|
+
const instance_event_delivery_service_1 = require("./instance-event.delivery.service");
|
|
10
|
+
const instance_event_delivery_scheduler_service_1 = require("./instance-event.delivery-scheduler.service");
|
|
11
|
+
const instance_event_delivery_subscriber_1 = require("./instance-event.delivery.subscriber");
|
|
12
|
+
const instance_event_resolver_1 = require("./instance-event.resolver");
|
|
13
|
+
const instance_event_token_1 = require("./instance-event.token");
|
|
14
|
+
const instance_event_service_1 = require("./instance-event.service");
|
|
15
|
+
const instance_event_writer_1 = require("./instance-event.writer");
|
|
16
|
+
let InstanceEventModule = InstanceEventModule_1 = class InstanceEventModule {
|
|
17
|
+
/**
|
|
18
|
+
* `BPM_INSTANCE_EVENT_OBSERVER` is exported only when `observerProvider` is
|
|
19
|
+
* given. Exporting an unprovided token makes Nest fail with
|
|
20
|
+
* `UnknownExportException`.
|
|
21
|
+
*/
|
|
22
|
+
static forRoot(options = {}) {
|
|
23
|
+
const observerProviders = options.observerProvider
|
|
24
|
+
? [options.observerProvider]
|
|
25
|
+
: [];
|
|
26
|
+
const observerExports = options.observerProvider ? [instance_event_token_1.BPM_INSTANCE_EVENT_OBSERVER] : [];
|
|
27
|
+
return {
|
|
28
|
+
exports: [instance_event_service_1.InstanceEventService, instance_event_writer_1.InstanceEventWriter, ...observerExports],
|
|
29
|
+
global: true,
|
|
30
|
+
imports: [
|
|
31
|
+
...(options.imports ?? []),
|
|
32
|
+
typeorm_1.TypeOrmModule.forFeature([approval_instance_event_entity_1.ApprovalInstanceEventEntity]),
|
|
33
|
+
],
|
|
34
|
+
module: InstanceEventModule_1,
|
|
35
|
+
providers: [
|
|
36
|
+
...observerProviders,
|
|
37
|
+
instance_event_service_1.InstanceEventService,
|
|
38
|
+
instance_event_writer_1.InstanceEventWriter,
|
|
39
|
+
instance_event_delivery_service_1.InstanceEventDeliveryService,
|
|
40
|
+
instance_event_delivery_subscriber_1.InstanceEventDeliverySubscriber,
|
|
41
|
+
instance_event_delivery_scheduler_service_1.InstanceEventDeliverySchedulerService,
|
|
42
|
+
instance_event_resolver_1.InstanceEventResolver,
|
|
43
|
+
],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
exports.InstanceEventModule = InstanceEventModule;
|
|
48
|
+
exports.InstanceEventModule = InstanceEventModule = InstanceEventModule_1 = tslib_1.__decorate([
|
|
49
|
+
(0, common_1.Global)(),
|
|
50
|
+
(0, common_1.Module)({})
|
|
51
|
+
], InstanceEventModule);
|
|
52
|
+
//# sourceMappingURL=instance-event.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance-event.module.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/instance-event/instance-event.module.ts"],"names":[],"mappings":";;;;;AAAA,2CAMwB;AACxB,6CAAgD;AAChD,qFAA+E;AAC/E,uFAAiF;AACjF,2GAAoG;AACpG,6FAAuF;AACvF,uEAAkE;AAClE,iEAGgC;AAChC,qEAAgE;AAChE,mEAA8D;AAWvD,IAAM,mBAAmB,2BAAzB,MAAM,mBAAmB;IAC9B;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,UAAsC,EAAE;QACrD,MAAM,iBAAiB,GAAwB,OAAO,CAAC,gBAAgB;YACrE,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC;YAC5B,CAAC,CAAC,EAAE,CAAC;QACP,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,kDAA2B,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAEhE,OAAO;YACL,OAAO,EAAE,CAAC,6CAAoB,EAAE,2CAAmB,EAAE,GAAG,eAAe,CAAC;YACxE,MAAM,EAAE,IAAI;YACZ,OAAO,EAAE;gBACP,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;gBAC1B,uBAAa,CAAC,UAAU,CAAC,CAAC,4DAA2B,CAAC,CAAC;aACxD;YACD,MAAM,EAAE,qBAAmB;YAC3B,SAAS,EAAE;gBACT,GAAG,iBAAiB;gBACpB,6CAAoB;gBACpB,2CAAmB;gBACnB,8DAA4B;gBAC5B,oEAA+B;gBAC/B,iFAAqC;gBACrC,+CAAqB;aACtB;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AAhCY,kDAAmB;8BAAnB,mBAAmB;IAF/B,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,mBAAmB,CAgC/B"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ApprovalInstanceEventStatusEnum } from './instance-event.enums';
|
|
2
|
+
/**
|
|
3
|
+
* An administrator's view of one outbox row (ADR 27 §1). `payload` is left
|
|
4
|
+
* out on purpose: it is the observer's input and is not needed to triage a
|
|
5
|
+
* failed delivery. `claimedAt` is an internal lock stamp and is left out too.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ApprovalInstanceEventObject {
|
|
8
|
+
attemptCount: number;
|
|
9
|
+
deliveredAt: Date | null;
|
|
10
|
+
id: string;
|
|
11
|
+
instanceId: string;
|
|
12
|
+
lastError: string | null;
|
|
13
|
+
nextAttemptAt: Date;
|
|
14
|
+
occurredAt: Date;
|
|
15
|
+
/** Write order. A string, because the database column is `bigint`. */
|
|
16
|
+
seq: string;
|
|
17
|
+
status: ApprovalInstanceEventStatusEnum;
|
|
18
|
+
type: string;
|
|
19
|
+
}
|
|
20
|
+
/** One page of outbox rows, newest first. */
|
|
21
|
+
export declare class ApprovalInstanceEventPageObject {
|
|
22
|
+
items: readonly ApprovalInstanceEventObject[];
|
|
23
|
+
total: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApprovalInstanceEventPageObject = exports.ApprovalInstanceEventObject = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const graphql_1 = require("@nestjs/graphql");
|
|
6
|
+
const instance_event_enums_1 = require("./instance-event.enums");
|
|
7
|
+
/**
|
|
8
|
+
* An administrator's view of one outbox row (ADR 27 §1). `payload` is left
|
|
9
|
+
* out on purpose: it is the observer's input and is not needed to triage a
|
|
10
|
+
* failed delivery. `claimedAt` is an internal lock stamp and is left out too.
|
|
11
|
+
*/
|
|
12
|
+
let ApprovalInstanceEventObject = class ApprovalInstanceEventObject {
|
|
13
|
+
};
|
|
14
|
+
exports.ApprovalInstanceEventObject = ApprovalInstanceEventObject;
|
|
15
|
+
tslib_1.__decorate([
|
|
16
|
+
(0, graphql_1.Field)(() => graphql_1.Int),
|
|
17
|
+
tslib_1.__metadata("design:type", Number)
|
|
18
|
+
], ApprovalInstanceEventObject.prototype, "attemptCount", void 0);
|
|
19
|
+
tslib_1.__decorate([
|
|
20
|
+
(0, graphql_1.Field)(() => Date, { nullable: true }),
|
|
21
|
+
tslib_1.__metadata("design:type", Object)
|
|
22
|
+
], ApprovalInstanceEventObject.prototype, "deliveredAt", void 0);
|
|
23
|
+
tslib_1.__decorate([
|
|
24
|
+
(0, graphql_1.Field)(() => graphql_1.ID),
|
|
25
|
+
tslib_1.__metadata("design:type", String)
|
|
26
|
+
], ApprovalInstanceEventObject.prototype, "id", void 0);
|
|
27
|
+
tslib_1.__decorate([
|
|
28
|
+
(0, graphql_1.Field)(() => graphql_1.ID),
|
|
29
|
+
tslib_1.__metadata("design:type", String)
|
|
30
|
+
], ApprovalInstanceEventObject.prototype, "instanceId", void 0);
|
|
31
|
+
tslib_1.__decorate([
|
|
32
|
+
(0, graphql_1.Field)(() => String, { nullable: true }),
|
|
33
|
+
tslib_1.__metadata("design:type", Object)
|
|
34
|
+
], ApprovalInstanceEventObject.prototype, "lastError", void 0);
|
|
35
|
+
tslib_1.__decorate([
|
|
36
|
+
(0, graphql_1.Field)(() => Date),
|
|
37
|
+
tslib_1.__metadata("design:type", Date)
|
|
38
|
+
], ApprovalInstanceEventObject.prototype, "nextAttemptAt", void 0);
|
|
39
|
+
tslib_1.__decorate([
|
|
40
|
+
(0, graphql_1.Field)(() => Date),
|
|
41
|
+
tslib_1.__metadata("design:type", Date)
|
|
42
|
+
], ApprovalInstanceEventObject.prototype, "occurredAt", void 0);
|
|
43
|
+
tslib_1.__decorate([
|
|
44
|
+
(0, graphql_1.Field)(() => String),
|
|
45
|
+
tslib_1.__metadata("design:type", String)
|
|
46
|
+
], ApprovalInstanceEventObject.prototype, "seq", void 0);
|
|
47
|
+
tslib_1.__decorate([
|
|
48
|
+
(0, graphql_1.Field)(() => instance_event_enums_1.ApprovalInstanceEventStatusEnum),
|
|
49
|
+
tslib_1.__metadata("design:type", String)
|
|
50
|
+
], ApprovalInstanceEventObject.prototype, "status", void 0);
|
|
51
|
+
tslib_1.__decorate([
|
|
52
|
+
(0, graphql_1.Field)(() => String),
|
|
53
|
+
tslib_1.__metadata("design:type", String)
|
|
54
|
+
], ApprovalInstanceEventObject.prototype, "type", void 0);
|
|
55
|
+
exports.ApprovalInstanceEventObject = ApprovalInstanceEventObject = tslib_1.__decorate([
|
|
56
|
+
(0, graphql_1.ObjectType)('BPMApprovalInstanceEvent')
|
|
57
|
+
], ApprovalInstanceEventObject);
|
|
58
|
+
/** One page of outbox rows, newest first. */
|
|
59
|
+
let ApprovalInstanceEventPageObject = class ApprovalInstanceEventPageObject {
|
|
60
|
+
};
|
|
61
|
+
exports.ApprovalInstanceEventPageObject = ApprovalInstanceEventPageObject;
|
|
62
|
+
tslib_1.__decorate([
|
|
63
|
+
(0, graphql_1.Field)(() => [ApprovalInstanceEventObject]),
|
|
64
|
+
tslib_1.__metadata("design:type", Array)
|
|
65
|
+
], ApprovalInstanceEventPageObject.prototype, "items", void 0);
|
|
66
|
+
tslib_1.__decorate([
|
|
67
|
+
(0, graphql_1.Field)(() => graphql_1.Int),
|
|
68
|
+
tslib_1.__metadata("design:type", Number)
|
|
69
|
+
], ApprovalInstanceEventPageObject.prototype, "total", void 0);
|
|
70
|
+
exports.ApprovalInstanceEventPageObject = ApprovalInstanceEventPageObject = tslib_1.__decorate([
|
|
71
|
+
(0, graphql_1.ObjectType)('BPMApprovalInstanceEventPage')
|
|
72
|
+
], ApprovalInstanceEventPageObject);
|
|
73
|
+
//# sourceMappingURL=instance-event.object.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance-event.object.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/instance-event/instance-event.object.ts"],"names":[],"mappings":";;;;AAAA,6CAA6D;AAC7D,iEAAyE;AAEzE;;;;GAIG;AAEI,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;CA+BvC,CAAA;AA/BY,kEAA2B;AAEtC;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,aAAG,CAAC;;iEACK;AAGtB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gEACZ;AAG1B;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;;uDACJ;AAGZ;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;;+DACI;AAGpB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8DACd;AAG1B;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;sCACF,IAAI;kEAAC;AAGrB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC;sCACL,IAAI;+DAAC;AAIlB;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;wDACP;AAGb;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,sDAA+B,CAAC;;2DACJ;AAGzC;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;;yDACN;sCA9BH,2BAA2B;IADvC,IAAA,oBAAU,EAAC,0BAA0B,CAAC;GAC1B,2BAA2B,CA+BvC;AAED,6CAA6C;AAEtC,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;CAM3C,CAAA;AANY,0EAA+B;AAE1C;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,2BAA2B,CAAC,CAAC;;8DACI;AAG/C;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,aAAG,CAAC;;8DACF;0CALJ,+BAA+B;IAD3C,IAAA,oBAAU,EAAC,8BAA8B,CAAC;GAC9B,+BAA+B,CAM3C"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tuning for the instance event outbox (ADR 27 §1.4). Defaults match the
|
|
3
|
+
* workflow webhook outbox so an operator reasons about one retry policy.
|
|
4
|
+
*/
|
|
5
|
+
export interface BPMInstanceEventDeliveryOptions {
|
|
6
|
+
/** Rows claimed per scan. Default 25. */
|
|
7
|
+
readonly batchSize: number;
|
|
8
|
+
/** Time the observer gets to answer one event. Default 10000 ms. */
|
|
9
|
+
readonly dispatchTimeoutMs: number;
|
|
10
|
+
/** Attempts before a row is parked as `FAILED`. Default 6. */
|
|
11
|
+
readonly maxAttempts: number;
|
|
12
|
+
/** Upper bound on a single retry delay. Default 3600000 ms. */
|
|
13
|
+
readonly maxRetryDelayMs: number;
|
|
14
|
+
/** Days a `DELIVERED` row is kept. `FAILED` rows are never swept. Default 30. */
|
|
15
|
+
readonly retentionDays: number;
|
|
16
|
+
/** Base of the exponential retry delay. Default 30000 ms. */
|
|
17
|
+
readonly retryBaseDelayMs: number;
|
|
18
|
+
/** Interval of the fallback scan. Default 15000 ms. */
|
|
19
|
+
readonly scanIntervalMs: number;
|
|
20
|
+
}
|
|
21
|
+
export declare const DEFAULT_BPM_INSTANCE_EVENT_DELIVERY_OPTIONS: BPMInstanceEventDeliveryOptions;
|
|
22
|
+
/**
|
|
23
|
+
* Fills every unset or non-positive field from the defaults. A host that sets
|
|
24
|
+
* `batchSize: 0` gets 25, not an outbox that never delivers.
|
|
25
|
+
*/
|
|
26
|
+
export declare function resolveInstanceEventDeliveryOptions(overrides: Partial<BPMInstanceEventDeliveryOptions> | undefined): BPMInstanceEventDeliveryOptions;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_BPM_INSTANCE_EVENT_DELIVERY_OPTIONS = void 0;
|
|
4
|
+
exports.resolveInstanceEventDeliveryOptions = resolveInstanceEventDeliveryOptions;
|
|
5
|
+
exports.DEFAULT_BPM_INSTANCE_EVENT_DELIVERY_OPTIONS = {
|
|
6
|
+
batchSize: 25,
|
|
7
|
+
dispatchTimeoutMs: 10_000,
|
|
8
|
+
maxAttempts: 6,
|
|
9
|
+
maxRetryDelayMs: 3_600_000,
|
|
10
|
+
retentionDays: 30,
|
|
11
|
+
retryBaseDelayMs: 30_000,
|
|
12
|
+
scanIntervalMs: 15_000,
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Fills every unset or non-positive field from the defaults. A host that sets
|
|
16
|
+
* `batchSize: 0` gets 25, not an outbox that never delivers.
|
|
17
|
+
*/
|
|
18
|
+
function resolveInstanceEventDeliveryOptions(overrides) {
|
|
19
|
+
const defaults = exports.DEFAULT_BPM_INSTANCE_EVENT_DELIVERY_OPTIONS;
|
|
20
|
+
return {
|
|
21
|
+
batchSize: readPositive(overrides?.batchSize, defaults.batchSize),
|
|
22
|
+
dispatchTimeoutMs: readPositive(overrides?.dispatchTimeoutMs, defaults.dispatchTimeoutMs),
|
|
23
|
+
maxAttempts: readPositive(overrides?.maxAttempts, defaults.maxAttempts),
|
|
24
|
+
maxRetryDelayMs: readPositive(overrides?.maxRetryDelayMs, defaults.maxRetryDelayMs),
|
|
25
|
+
retentionDays: readPositive(overrides?.retentionDays, defaults.retentionDays),
|
|
26
|
+
retryBaseDelayMs: readPositive(overrides?.retryBaseDelayMs, defaults.retryBaseDelayMs),
|
|
27
|
+
scanIntervalMs: readPositive(overrides?.scanIntervalMs, defaults.scanIntervalMs),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function readPositive(value, fallback) {
|
|
31
|
+
return typeof value === 'number' && Number.isFinite(value) && value > 0
|
|
32
|
+
? Math.floor(value)
|
|
33
|
+
: fallback;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=instance-event.options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance-event.options.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/instance-event/instance-event.options.ts"],"names":[],"mappings":";;;AAoCA,kFA6BC;AA5CY,QAAA,2CAA2C,GACtD;IACE,SAAS,EAAE,EAAE;IACb,iBAAiB,EAAE,MAAM;IACzB,WAAW,EAAE,CAAC;IACd,eAAe,EAAE,SAAS;IAC1B,aAAa,EAAE,EAAE;IACjB,gBAAgB,EAAE,MAAM;IACxB,cAAc,EAAE,MAAM;CACvB,CAAC;AAEJ;;;GAGG;AACH,SAAgB,mCAAmC,CACjD,SAA+D;IAE/D,MAAM,QAAQ,GAAG,mDAA2C,CAAC;IAE7D,OAAO;QACL,SAAS,EAAE,YAAY,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,SAAS,CAAC;QACjE,iBAAiB,EAAE,YAAY,CAC7B,SAAS,EAAE,iBAAiB,EAC5B,QAAQ,CAAC,iBAAiB,CAC3B;QACD,WAAW,EAAE,YAAY,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAC,WAAW,CAAC;QACvE,eAAe,EAAE,YAAY,CAC3B,SAAS,EAAE,eAAe,EAC1B,QAAQ,CAAC,eAAe,CACzB;QACD,aAAa,EAAE,YAAY,CACzB,SAAS,EAAE,aAAa,EACxB,QAAQ,CAAC,aAAa,CACvB;QACD,gBAAgB,EAAE,YAAY,CAC5B,SAAS,EAAE,gBAAgB,EAC3B,QAAQ,CAAC,gBAAgB,CAC1B;QACD,cAAc,EAAE,YAAY,CAC1B,SAAS,EAAE,cAAc,EACzB,QAAQ,CAAC,cAAc,CACxB;KACF,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,KAAyB,EAAE,QAAgB;IAC/D,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC;QACrE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;QACnB,CAAC,CAAC,QAAQ,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InstanceEventDeliveryService } from './instance-event.delivery.service';
|
|
2
|
+
import { ApprovalInstanceEventStatusEnum } from './instance-event.enums';
|
|
3
|
+
import { ApprovalInstanceEventObject, ApprovalInstanceEventPageObject } from './instance-event.object';
|
|
4
|
+
/** Admin access to the outbox: triage failed deliveries and retry them. */
|
|
5
|
+
export declare class InstanceEventResolver {
|
|
6
|
+
private readonly deliveryService;
|
|
7
|
+
constructor(deliveryService: InstanceEventDeliveryService);
|
|
8
|
+
approvalInstanceEvents(instanceId?: string | null, status?: ApprovalInstanceEventStatusEnum | null, page?: number, pageSize?: number): Promise<ApprovalInstanceEventPageObject>;
|
|
9
|
+
retryApprovalInstanceEvent(id: string): Promise<ApprovalInstanceEventObject>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InstanceEventResolver = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const graphql_1 = require("@nestjs/graphql");
|
|
6
|
+
const bpm_auth_1 = require("../bpm-auth");
|
|
7
|
+
const instance_event_delivery_service_1 = require("./instance-event.delivery.service");
|
|
8
|
+
const instance_event_enums_1 = require("./instance-event.enums");
|
|
9
|
+
const instance_event_object_1 = require("./instance-event.object");
|
|
10
|
+
/** Admin access to the outbox: triage failed deliveries and retry them. */
|
|
11
|
+
let InstanceEventResolver = class InstanceEventResolver {
|
|
12
|
+
constructor(deliveryService) {
|
|
13
|
+
this.deliveryService = deliveryService;
|
|
14
|
+
}
|
|
15
|
+
async approvalInstanceEvents(instanceId, status, page = 1, pageSize = 50) {
|
|
16
|
+
const result = await this.deliveryService.listEvents({
|
|
17
|
+
instanceId: instanceId ?? null,
|
|
18
|
+
page,
|
|
19
|
+
pageSize,
|
|
20
|
+
status: status ? instance_event_enums_1.APPROVAL_INSTANCE_EVENT_ENUM_TO_STATUS[status] : null,
|
|
21
|
+
});
|
|
22
|
+
return Object.assign(new instance_event_object_1.ApprovalInstanceEventPageObject(), {
|
|
23
|
+
items: result.items.map((row) => toObject(row)),
|
|
24
|
+
total: result.total,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
async retryApprovalInstanceEvent(id) {
|
|
28
|
+
return toObject(await this.deliveryService.retryFailedEvent(id));
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.InstanceEventResolver = InstanceEventResolver;
|
|
32
|
+
tslib_1.__decorate([
|
|
33
|
+
(0, graphql_1.Query)(() => instance_event_object_1.ApprovalInstanceEventPageObject),
|
|
34
|
+
tslib_1.__param(0, (0, graphql_1.Args)('instanceId', { nullable: true, type: () => graphql_1.ID })),
|
|
35
|
+
tslib_1.__param(1, (0, graphql_1.Args)('status', {
|
|
36
|
+
nullable: true,
|
|
37
|
+
type: () => instance_event_enums_1.ApprovalInstanceEventStatusEnum,
|
|
38
|
+
})),
|
|
39
|
+
tslib_1.__param(2, (0, graphql_1.Args)('page', { defaultValue: 1, type: () => graphql_1.Int })),
|
|
40
|
+
tslib_1.__param(3, (0, graphql_1.Args)('pageSize', { defaultValue: 50, type: () => graphql_1.Int })),
|
|
41
|
+
tslib_1.__metadata("design:type", Function),
|
|
42
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object, Object, Object]),
|
|
43
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
44
|
+
], InstanceEventResolver.prototype, "approvalInstanceEvents", null);
|
|
45
|
+
tslib_1.__decorate([
|
|
46
|
+
(0, graphql_1.Mutation)(() => instance_event_object_1.ApprovalInstanceEventObject),
|
|
47
|
+
tslib_1.__param(0, (0, graphql_1.Args)('id', { type: () => graphql_1.ID })),
|
|
48
|
+
tslib_1.__metadata("design:type", Function),
|
|
49
|
+
tslib_1.__metadata("design:paramtypes", [String]),
|
|
50
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
51
|
+
], InstanceEventResolver.prototype, "retryApprovalInstanceEvent", null);
|
|
52
|
+
exports.InstanceEventResolver = InstanceEventResolver = tslib_1.__decorate([
|
|
53
|
+
(0, graphql_1.Resolver)(),
|
|
54
|
+
(0, bpm_auth_1.BPMAdminOnly)(),
|
|
55
|
+
tslib_1.__metadata("design:paramtypes", [instance_event_delivery_service_1.InstanceEventDeliveryService])
|
|
56
|
+
], InstanceEventResolver);
|
|
57
|
+
/**
|
|
58
|
+
* Field by field, so `payload` and `claimedAt` never reach the GraphQL
|
|
59
|
+
* response even if the entity gains fields later.
|
|
60
|
+
*/
|
|
61
|
+
function toObject(row) {
|
|
62
|
+
return Object.assign(new instance_event_object_1.ApprovalInstanceEventObject(), {
|
|
63
|
+
attemptCount: row.attemptCount,
|
|
64
|
+
deliveredAt: row.deliveredAt,
|
|
65
|
+
id: row.id,
|
|
66
|
+
instanceId: row.instanceId,
|
|
67
|
+
lastError: row.lastError,
|
|
68
|
+
nextAttemptAt: row.nextAttemptAt,
|
|
69
|
+
occurredAt: row.occurredAt,
|
|
70
|
+
seq: row.seq,
|
|
71
|
+
status: instance_event_enums_1.APPROVAL_INSTANCE_EVENT_STATUS_TO_ENUM[row.status],
|
|
72
|
+
type: row.type,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=instance-event.resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance-event.resolver.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/instance-event/instance-event.resolver.ts"],"names":[],"mappings":";;;;AAAA,6CAA2E;AAC3E,0CAA2C;AAE3C,uFAAiF;AACjF,iEAIgC;AAChC,mEAGiC;AAEjC,2EAA2E;AAGpE,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,YAA6B,eAA6C;QAA7C,oBAAe,GAAf,eAAe,CAA8B;IAAG,CAAC;IAGxE,AAAN,KAAK,CAAC,sBAAsB,CAE1B,UAA0B,EAK1B,MAA+C,EACK,OAAO,CAAC,EACH,WAAW,EAAE;QAEtE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC;YACnD,UAAU,EAAE,UAAU,IAAI,IAAI;YAC9B,IAAI;YACJ,QAAQ;YACR,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,6DAAsC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI;SACvE,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,uDAA+B,EAAE,EAAE;YAC1D,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YAC/C,KAAK,EAAE,MAAM,CAAC,KAAK;SACpB,CAAC,CAAC;IACL,CAAC;IAGK,AAAN,KAAK,CAAC,0BAA0B,CACE,EAAU;QAE1C,OAAO,QAAQ,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,CAAC;IACnE,CAAC;CACF,CAAA;AAlCY,sDAAqB;AAI1B;IADL,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,uDAA+B,CAAC;IAE1C,mBAAA,IAAA,cAAI,EAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,YAAE,EAAE,CAAC,CAAA;IAEtD,mBAAA,IAAA,cAAI,EAAC,QAAQ,EAAE;QACd,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,GAAG,EAAE,CAAC,sDAA+B;KAC5C,CAAC,CAAA;IAED,mBAAA,IAAA,cAAI,EAAC,MAAM,EAAE,EAAE,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,aAAG,EAAE,CAAC,CAAA;IAClD,mBAAA,IAAA,cAAI,EAAC,UAAU,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,aAAG,EAAE,CAAC,CAAA;;;;mEAazD;AAGK;IADL,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,mDAA2B,CAAC;IAEzC,mBAAA,IAAA,cAAI,EAAC,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,YAAE,EAAE,CAAC,CAAA;;;;uEAGhC;gCAjCU,qBAAqB;IAFjC,IAAA,kBAAQ,GAAE;IACV,IAAA,uBAAY,GAAE;6CAEiC,8DAA4B;GAD/D,qBAAqB,CAkCjC;AAED;;;GAGG;AACH,SAAS,QAAQ,CACf,GAAgC;IAEhC,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,mDAA2B,EAAE,EAAE;QACtD,YAAY,EAAE,GAAG,CAAC,YAAY;QAC9B,WAAW,EAAE,GAAG,CAAC,WAAW;QAC5B,EAAE,EAAE,GAAG,CAAC,EAAE;QACV,UAAU,EAAE,GAAG,CAAC,UAAU;QAC1B,SAAS,EAAE,GAAG,CAAC,SAAS;QACxB,aAAa,EAAE,GAAG,CAAC,aAAa;QAChC,UAAU,EAAE,GAAG,CAAC,UAAU;QAC1B,GAAG,EAAE,GAAG,CAAC,GAAG;QACZ,MAAM,EAAE,6DAAsC,CAAC,GAAG,CAAC,MAAM,CAAC;QAC1D,IAAI,EAAE,GAAG,CAAC,IAAI;KACf,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BPMRootRuntimeOptions } from '../bpm/bpm-root-options';
|
|
2
|
+
import { BPMInstanceEventDeliveryOptions } from './instance-event.options';
|
|
3
|
+
import { BPMInstanceEventObserver } from './instance-event.token';
|
|
4
|
+
/**
|
|
5
|
+
* Holds the host observer for instance lifecycle events. `observer` is `null`
|
|
6
|
+
* when the host bound none; the engine then writes no outbox rows.
|
|
7
|
+
*
|
|
8
|
+
* Resolution: the Nest provider (`BPM_INSTANCE_EVENT_OBSERVER`) wins over the
|
|
9
|
+
* runtime option `BPMRootRuntimeOptions.instanceEventObserver`.
|
|
10
|
+
*
|
|
11
|
+
* `delivery` is the resolved outbox tuning, with unset fields defaulted.
|
|
12
|
+
*/
|
|
13
|
+
export declare class InstanceEventService {
|
|
14
|
+
readonly observer: BPMInstanceEventObserver | null;
|
|
15
|
+
readonly delivery: BPMInstanceEventDeliveryOptions;
|
|
16
|
+
constructor(injectedObserver: BPMInstanceEventObserver | undefined, rootOptions: BPMRootRuntimeOptions | undefined);
|
|
17
|
+
get enabled(): boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InstanceEventService = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const bpm_root_options_1 = require("../bpm/bpm-root-options");
|
|
7
|
+
const instance_event_options_1 = require("./instance-event.options");
|
|
8
|
+
const instance_event_token_1 = require("./instance-event.token");
|
|
9
|
+
/**
|
|
10
|
+
* Holds the host observer for instance lifecycle events. `observer` is `null`
|
|
11
|
+
* when the host bound none; the engine then writes no outbox rows.
|
|
12
|
+
*
|
|
13
|
+
* Resolution: the Nest provider (`BPM_INSTANCE_EVENT_OBSERVER`) wins over the
|
|
14
|
+
* runtime option `BPMRootRuntimeOptions.instanceEventObserver`.
|
|
15
|
+
*
|
|
16
|
+
* `delivery` is the resolved outbox tuning, with unset fields defaulted.
|
|
17
|
+
*/
|
|
18
|
+
let InstanceEventService = class InstanceEventService {
|
|
19
|
+
constructor(injectedObserver, rootOptions) {
|
|
20
|
+
this.observer =
|
|
21
|
+
injectedObserver ?? rootOptions?.instanceEventObserver ?? null;
|
|
22
|
+
this.delivery = (0, instance_event_options_1.resolveInstanceEventDeliveryOptions)(rootOptions?.instanceEventDelivery);
|
|
23
|
+
}
|
|
24
|
+
get enabled() {
|
|
25
|
+
return this.observer !== null;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.InstanceEventService = InstanceEventService;
|
|
29
|
+
exports.InstanceEventService = InstanceEventService = tslib_1.__decorate([
|
|
30
|
+
(0, common_1.Injectable)(),
|
|
31
|
+
tslib_1.__param(0, (0, common_1.Optional)()),
|
|
32
|
+
tslib_1.__param(0, (0, common_1.Inject)(instance_event_token_1.BPM_INSTANCE_EVENT_OBSERVER)),
|
|
33
|
+
tslib_1.__param(1, (0, common_1.Optional)()),
|
|
34
|
+
tslib_1.__param(1, (0, common_1.Inject)(bpm_root_options_1.BPM_ROOT_OPTIONS)),
|
|
35
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object])
|
|
36
|
+
], InstanceEventService);
|
|
37
|
+
//# sourceMappingURL=instance-event.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance-event.service.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/instance-event/instance-event.service.ts"],"names":[],"mappings":";;;;AAAA,2CAA8D;AAC9D,8DAGiC;AACjC,qEAGkC;AAClC,iEAGgC;AAEhC;;;;;;;;GAQG;AAEI,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAI/B,YAGE,gBAAsD,EAGtD,WAA8C;QAE9C,IAAI,CAAC,QAAQ;YACX,gBAAgB,IAAI,WAAW,EAAE,qBAAqB,IAAI,IAAI,CAAC;QACjE,IAAI,CAAC,QAAQ,GAAG,IAAA,4DAAmC,EACjD,WAAW,EAAE,qBAAqB,CACnC,CAAC;IACJ,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC;IAChC,CAAC;CACF,CAAA;AAtBY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;IAMR,mBAAA,IAAA,iBAAQ,GAAE,CAAA;IACV,mBAAA,IAAA,eAAM,EAAC,kDAA2B,CAAC,CAAA;IAEnC,mBAAA,IAAA,iBAAQ,GAAE,CAAA;IACV,mBAAA,IAAA,eAAM,EAAC,mCAAgB,CAAC,CAAA;;GAThB,oBAAoB,CAsBhC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { InjectionToken } from '@nestjs/common';
|
|
2
|
+
import type { BPMInstanceEvent } from './instance-event.types';
|
|
3
|
+
/**
|
|
4
|
+
* Host hook that receives approval instance lifecycle events (ADR 27 §1).
|
|
5
|
+
*
|
|
6
|
+
* Delivery is at-least-once and runs after the state change has committed. A
|
|
7
|
+
* redelivered event carries the same `event.id`, so the host dedupes on it.
|
|
8
|
+
* Events of one instance arrive in `seq` order; events of different instances
|
|
9
|
+
* have no ordering guarantee. A thrown error is retried with backoff and the
|
|
10
|
+
* event is marked FAILED after the retry limit.
|
|
11
|
+
*/
|
|
12
|
+
export interface BPMInstanceEventObserver {
|
|
13
|
+
onInstanceEvent(event: BPMInstanceEvent): Promise<void> | void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Optional host binding for {@link BPMInstanceEventObserver}. Without an
|
|
17
|
+
* observer, the engine writes no event rows at all.
|
|
18
|
+
*/
|
|
19
|
+
export declare const BPM_INSTANCE_EVENT_OBSERVER: InjectionToken<BPMInstanceEventObserver>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BPM_INSTANCE_EVENT_OBSERVER = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Optional host binding for {@link BPMInstanceEventObserver}. Without an
|
|
6
|
+
* observer, the engine writes no event rows at all.
|
|
7
|
+
*/
|
|
8
|
+
exports.BPM_INSTANCE_EVENT_OBSERVER = Symbol('BPM_INSTANCE_EVENT_OBSERVER');
|
|
9
|
+
//# sourceMappingURL=instance-event.token.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance-event.token.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/instance-event/instance-event.token.ts"],"names":[],"mappings":";;;AAgBA;;;GAGG;AACU,QAAA,2BAA2B,GACtC,MAAM,CAAC,6BAA6B,CAAC,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { ApprovalInstanceStateEnum } from '../workflow-engine/workflow-engine.enums';
|
|
2
|
+
/** Empty payload for event types that carry no type-specific fields. */
|
|
3
|
+
export type BPMInstanceEventNoPayload = Readonly<Record<never, never>>;
|
|
4
|
+
/**
|
|
5
|
+
* Type-specific fields per event type (ADR 27 §1.3). `formData` is never part
|
|
6
|
+
* of an event: a host that needs it reads the instance by `instanceId`.
|
|
7
|
+
*/
|
|
8
|
+
export interface BPMInstanceEventTypePayloads {
|
|
9
|
+
readonly INSTANCE_APPROVED: BPMInstanceEventNoPayload;
|
|
10
|
+
readonly INSTANCE_CANCELLED: {
|
|
11
|
+
readonly actorMemberId: string | null;
|
|
12
|
+
};
|
|
13
|
+
readonly INSTANCE_EXPIRED: BPMInstanceEventNoPayload;
|
|
14
|
+
readonly INSTANCE_REJECTED: {
|
|
15
|
+
readonly actorMemberId: string | null;
|
|
16
|
+
};
|
|
17
|
+
readonly INSTANCE_RESUBMITTED: {
|
|
18
|
+
readonly actorMemberId: string | null;
|
|
19
|
+
};
|
|
20
|
+
readonly INSTANCE_RETURNED: {
|
|
21
|
+
readonly actorMemberId: string | null;
|
|
22
|
+
readonly nodeId: string;
|
|
23
|
+
};
|
|
24
|
+
readonly INSTANCE_SUBMITTED: {
|
|
25
|
+
readonly actorMemberId: string | null;
|
|
26
|
+
};
|
|
27
|
+
readonly NODE_ACTIVATED: {
|
|
28
|
+
readonly nodeId: string;
|
|
29
|
+
readonly taskIds: readonly string[];
|
|
30
|
+
};
|
|
31
|
+
readonly TASK_AUTO_DECISION_FAILED: {
|
|
32
|
+
readonly reason: string;
|
|
33
|
+
readonly taskId: string;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export type BPMInstanceEventType = keyof BPMInstanceEventTypePayloads;
|
|
37
|
+
/**
|
|
38
|
+
* Template and state at the moment the event was written. The table has no
|
|
39
|
+
* columns for these, so they are stored inside `payload`.
|
|
40
|
+
*/
|
|
41
|
+
export interface BPMInstanceEventSnapshot {
|
|
42
|
+
readonly instanceState: ApprovalInstanceStateEnum;
|
|
43
|
+
readonly templateId: string;
|
|
44
|
+
readonly templateKey: string | null;
|
|
45
|
+
readonly templateVersionId: string;
|
|
46
|
+
}
|
|
47
|
+
/** Columns that every delivered event carries. */
|
|
48
|
+
export interface BPMInstanceEventHeader {
|
|
49
|
+
/** Generated by the database. Stable across redeliveries; dedupe on it. */
|
|
50
|
+
readonly id: string;
|
|
51
|
+
readonly instanceId: string;
|
|
52
|
+
/** Write order, assigned by the database. A bigint, so a string. */
|
|
53
|
+
readonly seq: string;
|
|
54
|
+
readonly occurredAt: string;
|
|
55
|
+
}
|
|
56
|
+
/** The payload stored in `approval_instance_events.payload`. */
|
|
57
|
+
export type BPMInstanceEventPayload = {
|
|
58
|
+
readonly [K in BPMInstanceEventType]: BPMInstanceEventSnapshot & BPMInstanceEventTypePayloads[K];
|
|
59
|
+
}[BPMInstanceEventType];
|
|
60
|
+
/** What the observer receives. Discriminated on `type`. */
|
|
61
|
+
export type BPMInstanceEvent = {
|
|
62
|
+
readonly [K in BPMInstanceEventType]: BPMInstanceEventHeader & {
|
|
63
|
+
readonly type: K;
|
|
64
|
+
} & BPMInstanceEventSnapshot & BPMInstanceEventTypePayloads[K];
|
|
65
|
+
}[BPMInstanceEventType];
|
|
66
|
+
export declare const BPM_INSTANCE_EVENT_STATUSES: readonly ["PENDING", "DELIVERED", "FAILED"];
|
|
67
|
+
export type BPMInstanceEventStatus = (typeof BPM_INSTANCE_EVENT_STATUSES)[number];
|