@rytass/bpm-core-nestjs-module 0.22.0 → 0.24.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 +95 -0
- package/README.md +68 -1
- 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/0000000033000-activity-log-advance-failed-index.d.ts +35 -0
- package/src/lib/migrations/0000000033000-activity-log-advance-failed-index.js +51 -0
- package/src/lib/migrations/0000000033000-activity-log-advance-failed-index.js.map +1 -0
- package/src/lib/migrations/index.d.ts +2 -0
- package/src/lib/migrations/index.js +6 -0
- package/src/lib/migrations/index.js.map +1 -1
- package/src/lib/notification/notification.service.d.ts +3 -2
- package/src/lib/notification/notification.service.js +52 -10
- 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 +111 -17
- package/src/lib/template/template.service.js.map +1 -1
- package/src/lib/template/workflow-definition.validator.js +12 -6
- package/src/lib/template/workflow-definition.validator.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/admin-cancel-approval-instance.input.d.ts +9 -0
- package/src/lib/workflow-engine/dto/admin-cancel-approval-instance.input.js +24 -0
- package/src/lib/workflow-engine/dto/admin-cancel-approval-instance.input.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/dto/reassign-member-tasks.input.d.ts +2 -0
- package/src/lib/workflow-engine/dto/reassign-member-tasks.input.js +8 -0
- package/src/lib/workflow-engine/dto/reassign-member-tasks.input.js.map +1 -1
- package/src/lib/workflow-engine/index.d.ts +3 -0
- package/src/lib/workflow-engine/index.js +3 -0
- package/src/lib/workflow-engine/index.js.map +1 -1
- package/src/lib/workflow-engine/instance-advance-failure.d.ts +28 -0
- package/src/lib/workflow-engine/instance-advance-failure.js +20 -0
- package/src/lib/workflow-engine/instance-advance-failure.js.map +1 -0
- 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/stuck-approval-instance.object.d.ts +22 -0
- package/src/lib/workflow-engine/stuck-approval-instance.object.js +107 -0
- package/src/lib/workflow-engine/stuck-approval-instance.object.js.map +1 -0
- package/src/lib/workflow-engine/stuck-approval-instance.query.d.ts +22 -0
- package/src/lib/workflow-engine/stuck-approval-instance.query.js +139 -0
- package/src/lib/workflow-engine/stuck-approval-instance.query.js.map +1 -0
- package/src/lib/workflow-engine/workflow-engine.enums.d.ts +11 -0
- package/src/lib/workflow-engine/workflow-engine.enums.js +16 -1
- package/src/lib/workflow-engine/workflow-engine.enums.js.map +1 -1
- 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 +3 -1
- package/src/lib/workflow-engine/workflow-engine.mutations.js +39 -6
- package/src/lib/workflow-engine/workflow-engine.mutations.js.map +1 -1
- package/src/lib/workflow-engine/workflow-engine.queries.d.ts +10 -8
- package/src/lib/workflow-engine/workflow-engine.queries.js +131 -28
- package/src/lib/workflow-engine/workflow-engine.queries.js.map +1 -1
- package/src/lib/workflow-engine/workflow-engine.service.d.ts +348 -10
- package/src/lib/workflow-engine/workflow-engine.service.js +1396 -118
- package/src/lib/workflow-engine/workflow-engine.service.js.map +1 -1
- package/src/lib/workflow-engine/workflow-engine.tokens.d.ts +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,98 @@
|
|
|
1
|
+
## 0.24.0 (2026-11-14)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **bpm-core:** page the stuck approval instance list ([6cd50975](https://github.com/Rytass/BPMCore/commit/6cd50975))
|
|
6
|
+
- **bpm-core-react:** mount the stuck approval instances page like the other admin pages ([fc19c298](https://github.com/Rytass/BPMCore/commit/fc19c298))
|
|
7
|
+
- **bpm-core:** let an administrator cancel an approval instance and tell its initiator ([03674ced](https://github.com/Rytass/BPMCore/commit/03674ced))
|
|
8
|
+
- **bpm-core:** list the approval instances that are stuck for administrators ([51118ce4](https://github.com/Rytass/BPMCore/commit/51118ce4))
|
|
9
|
+
- **bpm-core:** record why an approval instance could not move on ([820c7fb7](https://github.com/Rytass/BPMCore/commit/820c7fb7))
|
|
10
|
+
- let reassignMemberTasks take an optional list of task ids ([4b3c22a1](https://github.com/Rytass/BPMCore/commit/4b3c22a1))
|
|
11
|
+
- **workflow-engine:** continue a manager chain where an earlier one stopped, or skip when its start already qualifies ([50397fbd](https://github.com/Rytass/BPMCore/commit/50397fbd))
|
|
12
|
+
- **bpm-core:** check a manager chain continuation at publish and translate its lint ([6662b051](https://github.com/Rytass/BPMCore/commit/6662b051))
|
|
13
|
+
|
|
14
|
+
### 🩹 Fixes
|
|
15
|
+
|
|
16
|
+
- **bpm-core:** tell the initiator of an administrator cancel only after it commits ([2fca97e7](https://github.com/Rytass/BPMCore/commit/2fca97e7))
|
|
17
|
+
- **bpm-core:** retry a failed ADVANCE_FAILED write once and log the lost row as an error ([71ec27ac](https://github.com/Rytass/BPMCore/commit/71ec27ac))
|
|
18
|
+
- **bpm-core:** export the administrator cancel input like the other workflow inputs ([988981ae](https://github.com/Rytass/BPMCore/commit/988981ae))
|
|
19
|
+
|
|
20
|
+
### 🔥 Performance
|
|
21
|
+
|
|
22
|
+
- **workflow-engine:** index the ADVANCE_FAILED rows the stuck list reads ([2cf16d8d](https://github.com/Rytass/BPMCore/commit/2cf16d8d))
|
|
23
|
+
- **workflow-engine:** page and count the stuck list in the database ([67d244c4](https://github.com/Rytass/BPMCore/commit/67d244c4))
|
|
24
|
+
- **workflow-engine:** read only in-flight instances for the stuck list ([a9867d18](https://github.com/Rytass/BPMCore/commit/a9867d18))
|
|
25
|
+
- **bpm-core:** read the unresolved failures of every stuck candidate in one batch ([c1a2e34d](https://github.com/Rytass/BPMCore/commit/c1a2e34d))
|
|
26
|
+
|
|
27
|
+
### ❤️ Thank You
|
|
28
|
+
|
|
29
|
+
- Chia Yu Pai @fantasywind
|
|
30
|
+
- Kai-Chieh Yang
|
|
31
|
+
|
|
32
|
+
## 0.23.0 (2026-11-14)
|
|
33
|
+
|
|
34
|
+
### 🚀 Features
|
|
35
|
+
|
|
36
|
+
- **form-data-source:** gate approver runtime options by fill units ([f6659766](https://github.com/Rytass/BPMCore/commit/f6659766))
|
|
37
|
+
- **workflow-engine:** list approver fill units for open tasks ([86d517b5](https://github.com/Rytass/BPMCore/commit/86d517b5))
|
|
38
|
+
- **workflow-engine:** answer approver-fill VALUE_NOT_RESOLVED as 400 formDataErrors ([3bb29a51](https://github.com/Rytass/BPMCore/commit/3bb29a51))
|
|
39
|
+
- **form-data-source:** locate approver-fill VALUE_NOT_RESOLVED on its field or cell ([1a17907a](https://github.com/Rytass/BPMCore/commit/1a17907a))
|
|
40
|
+
- **bpm-core-client:** expose host error code on BPMGraphQLRequestError ([3a388721](https://github.com/Rytass/BPMCore/commit/3a388721))
|
|
41
|
+
- **bpm-core-react:** pass column-mode table access to approver fill ([c4fcb87d](https://github.com/Rytass/BPMCore/commit/c4fcb87d))
|
|
42
|
+
- **bpm-core-react:** add per-table access to form renderer ([98cd5208](https://github.com/Rytass/BPMCore/commit/98cd5208))
|
|
43
|
+
- **field-access:** reject publish when a table dependent column is not opened ([a4f64372](https://github.com/Rytass/BPMCore/commit/a4f64372))
|
|
44
|
+
- **workflow-engine:** fail closed when a dependent column's source changes ([576de175](https://github.com/Rytass/BPMCore/commit/576de175))
|
|
45
|
+
- **field-access:** export dependency break helper for column fills ([d25212c6](https://github.com/Rytass/BPMCore/commit/d25212c6))
|
|
46
|
+
- **field-access:** allow approver-filled data-source columns in column mode ([3b8cb06a](https://github.com/Rytass/BPMCore/commit/3b8cb06a))
|
|
47
|
+
- **workflow-engine:** resolve approver-filled data-source cells on decide ([dd80b145](https://github.com/Rytass/BPMCore/commit/dd80b145))
|
|
48
|
+
- **workflow-engine:** enforce column-mode cell locks on decide ([16bb16ef](https://github.com/Rytass/BPMCore/commit/16bb16ef))
|
|
49
|
+
- **workflow-engine:** settle column-mode approver cells on submit and resubmit ([31655ee2](https://github.com/Rytass/BPMCore/commit/31655ee2))
|
|
50
|
+
- **workflow-engine:** resolve approver-filled data-source options on decide ([bd300033](https://github.com/Rytass/BPMCore/commit/bd300033))
|
|
51
|
+
- **field-access:** lint per-column fill conflicts and approver data sources ([2d081bb2](https://github.com/Rytass/BPMCore/commit/2d081bb2))
|
|
52
|
+
- **field-access:** read per-column fill units for table fields ([996bffcc](https://github.com/Rytass/BPMCore/commit/996bffcc))
|
|
53
|
+
- **notification:** keep SLA auto-approve open when the instance guard blocks it ([894a45ac](https://github.com/Rytass/BPMCore/commit/894a45ac))
|
|
54
|
+
- **workflow-engine:** expose recordTaskAutoDecisionFailed on the engine token ([40d69180](https://github.com/Rytass/BPMCore/commit/40d69180))
|
|
55
|
+
- **workflow-engine:** record case lifecycle instance events ([b7b5f791](https://github.com/Rytass/BPMCore/commit/b7b5f791))
|
|
56
|
+
- **instance-event:** export writer and expose enabled getter ([864e9db5](https://github.com/Rytass/BPMCore/commit/864e9db5))
|
|
57
|
+
- **instance-event:** expose admin list and retry resolvers ([4cbb84ac](https://github.com/Rytass/BPMCore/commit/4cbb84ac))
|
|
58
|
+
- **instance-event:** purge delivered rows past retention ([69d19f9a](https://github.com/Rytass/BPMCore/commit/69d19f9a))
|
|
59
|
+
- **instance-event:** schedule periodic delivery scans ([ac9b7dc3](https://github.com/Rytass/BPMCore/commit/ac9b7dc3))
|
|
60
|
+
- **instance-event:** deliver on commit via subscriber ([53641feb](https://github.com/Rytass/BPMCore/commit/53641feb))
|
|
61
|
+
- **instance-event:** add outbox delivery service ([b7ddcd3f](https://github.com/Rytass/BPMCore/commit/b7ddcd3f))
|
|
62
|
+
- **instance-event:** add outbox event writer ([fd891be4](https://github.com/Rytass/BPMCore/commit/fd891be4))
|
|
63
|
+
- **instance-event:** add lifecycle event outbox and observer wiring ([74dcdffd](https://github.com/Rytass/BPMCore/commit/74dcdffd))
|
|
64
|
+
- **workflow-engine:** add pre-decision host guard for submit, resubmit and decide ([8d450dd3](https://github.com/Rytass/BPMCore/commit/8d450dd3))
|
|
65
|
+
- **form:** add HOST_RULE issue reason with optional host code ([3d58779d](https://github.com/Rytass/BPMCore/commit/3d58779d))
|
|
66
|
+
- **template:** exclude host-managed templates from lists by default ([54fac148](https://github.com/Rytass/BPMCore/commit/54fac148))
|
|
67
|
+
- **form:** exclude host-managed forms from lists by default ([416fa081](https://github.com/Rytass/BPMCore/commit/416fa081))
|
|
68
|
+
- **template:** add approvalTemplateByKey query ([c936675c](https://github.com/Rytass/BPMCore/commit/c936675c))
|
|
69
|
+
- **template:** add service-only hostManaged flag to templates and forms ([cd292961](https://github.com/Rytass/BPMCore/commit/cd292961))
|
|
70
|
+
- **template:** upsert approval template by key on compose ([7c0b635e](https://github.com/Rytass/BPMCore/commit/7c0b635e))
|
|
71
|
+
- **template:** add a host-owned key to approval templates ([2aa09ba3](https://github.com/Rytass/BPMCore/commit/2aa09ba3))
|
|
72
|
+
- **form:** allow defaults on dynamic sources without value dependencies ([0e553c0a](https://github.com/Rytass/BPMCore/commit/0e553c0a))
|
|
73
|
+
- **bpm-core:** accept a required boolean the approver fills in ([5a0b4757](https://github.com/Rytass/BPMCore/commit/5a0b4757))
|
|
74
|
+
- **instances:** filter approval instances by template key ([18d496c7](https://github.com/Rytass/BPMCore/commit/18d496c7))
|
|
75
|
+
- **conditions:** optionally read unfilled form fields as null ([958d3be6](https://github.com/Rytass/BPMCore/commit/958d3be6))
|
|
76
|
+
- **template:** add a HOST_ONLY launch mode to template versions ([d83db05e](https://github.com/Rytass/BPMCore/commit/d83db05e))
|
|
77
|
+
- **initiator:** let a host add customFields to the built snapshot ([609bc5ab](https://github.com/Rytass/BPMCore/commit/609bc5ab))
|
|
78
|
+
- **inbox:** filter inbox and approval history by template ([6870883a](https://github.com/Rytass/BPMCore/commit/6870883a))
|
|
79
|
+
- **migrations:** add the host integration round schema ([34eef9b2](https://github.com/Rytass/BPMCore/commit/34eef9b2))
|
|
80
|
+
|
|
81
|
+
### 🩹 Fixes
|
|
82
|
+
|
|
83
|
+
- **workflow-engine:** trim the task filter template key ([b74446b8](https://github.com/Rytass/BPMCore/commit/b74446b8))
|
|
84
|
+
- **workflow-engine:** report only changed keys to the resubmit guard ([53d7bdb2](https://github.com/Rytass/BPMCore/commit/53d7bdb2))
|
|
85
|
+
- **template:** declare the live template key index on the entity ([49b37f69](https://github.com/Rytass/BPMCore/commit/49b37f69))
|
|
86
|
+
- **workflow-engine:** pass the approver auth context to the decide guard ([0569d7db](https://github.com/Rytass/BPMCore/commit/0569d7db))
|
|
87
|
+
- **workflow-engine:** skip the open-cell schema read for nodes without column fills ([5842bfb7](https://github.com/Rytass/BPMCore/commit/5842bfb7))
|
|
88
|
+
- **workflow-engine:** restore approver cells only on unchanged rows ([0d166129](https://github.com/Rytass/BPMCore/commit/0d166129))
|
|
89
|
+
- **workflow-engine:** read grant units for summaries and keep whole-field writes ([2fa00549](https://github.com/Rytass/BPMCore/commit/2fa00549))
|
|
90
|
+
- **workflow-engine:** record the deciding member as the actor of rejection and return events ([07ab1888](https://github.com/Rytass/BPMCore/commit/07ab1888))
|
|
91
|
+
|
|
92
|
+
### ❤️ Thank You
|
|
93
|
+
|
|
94
|
+
- Chia Yu Pai @fantasywind
|
|
95
|
+
|
|
1
96
|
## 0.22.0 (2026-11-13)
|
|
2
97
|
|
|
3
98
|
### 🚀 Features
|
package/README.md
CHANGED
|
@@ -1054,6 +1054,33 @@ the initiator. Both settings are read from the instance's workflow snapshot;
|
|
|
1054
1054
|
left out, the chain behaves exactly as before. An engine from before this
|
|
1055
1055
|
change ignores them and climbs from the initiator.
|
|
1056
1056
|
|
|
1057
|
+
Two more settings cover a flow that signs a manager chain up to some level,
|
|
1058
|
+
inserts other stages (an HR countersign, say), and then picks the chain up again
|
|
1059
|
+
to the final approver. `startFrom: { type: 'CHAIN_CONTINUATION', nodeId }` names
|
|
1060
|
+
the earlier chain stage (S) to continue. The stage climbs from S's start and
|
|
1061
|
+
signs only managers above the position level S actually got a signature from
|
|
1062
|
+
(the highest level, on the day each person approved, of those who really
|
|
1063
|
+
approved S's latest round; an SLA auto-approval does not count, and a stage whose
|
|
1064
|
+
latest round was skipped counts as nobody); when that level already reaches this
|
|
1065
|
+
stage's `minPositionLevel`, the whole stage is skipped. `skipWhenStartReached:
|
|
1066
|
+
true` skips the stage when the start person's own highest position level
|
|
1067
|
+
already reaches `minPositionLevel`; a start without a level does not skip. A
|
|
1068
|
+
skip creates no task and advances the token like `SKIP_NODE`, writing
|
|
1069
|
+
`skippedByManagerChainReached: true` in the `TOKEN_ADVANCED` payload.
|
|
1070
|
+
|
|
1071
|
+
The two exclude each other and neither is allowed on a notify node. For a
|
|
1072
|
+
continuation, publish requires S to be an `ORG_MANAGER_CHAIN` user task on every
|
|
1073
|
+
path to this stage that is not a continuation itself and starts at the initiator
|
|
1074
|
+
or an earlier stage's approver (not a form field), requires this stage's
|
|
1075
|
+
`minPositionLevel` to be higher than S's, and refuses
|
|
1076
|
+
`whenEmpty: 'INITIATOR_MANAGER'` here. A stage that can be skipped this way
|
|
1077
|
+
cannot have approver-fillable fields and cannot be a `NODE_ACTOR` source
|
|
1078
|
+
(`NodeActorSourceSkipReason` gains `managerChainReached`, so an exhaustive
|
|
1079
|
+
`Record` over it needs the new member). An engine that has `startFrom` but not
|
|
1080
|
+
`CHAIN_CONTINUATION` refuses a continuation by name, while one from before
|
|
1081
|
+
`skipWhenStartReached` ignores that key and runs the stage as before, so upgrade
|
|
1082
|
+
the engine before publishing a template that uses it.
|
|
1083
|
+
|
|
1057
1084
|
Fallback types:
|
|
1058
1085
|
|
|
1059
1086
|
| Type | Behavior |
|
|
@@ -1751,7 +1778,12 @@ administrator (`@BPMAdminOnly()`) can move it without that person's help:
|
|
|
1751
1778
|
module, the list is always empty.
|
|
1752
1779
|
- `reassignTask(input)` moves one task's seat from `fromMemberId` to
|
|
1753
1780
|
`toMemberId`. `reassignMemberTasks(input)` does the same for every open task
|
|
1754
|
-
the source member holds, one transaction and one result per task.
|
|
1781
|
+
the source member holds, one transaction and one result per task. Its
|
|
1782
|
+
optional `taskIds` limits the batch to those tasks: omitted or `null` keeps
|
|
1783
|
+
every open task, an empty list is refused with a `BadRequestException` (the
|
|
1784
|
+
service checks it itself, so it holds without a `ValidationPipe`), and an id
|
|
1785
|
+
the member does not hold gets no result row and no error. Deploy the server
|
|
1786
|
+
before a screen that sends `taskIds`.
|
|
1755
1787
|
|
|
1756
1788
|
The rules that differ from the holder's own transfer:
|
|
1757
1789
|
|
|
@@ -1785,6 +1817,41 @@ decided it already (both answer a `ConflictException`). The task-level
|
|
|
1785
1817
|
assignee, delegation chain and `openedAt` stay as they were: a seat transfer is
|
|
1786
1818
|
not a claim of the whole stage.
|
|
1787
1819
|
|
|
1820
|
+
## Stuck Approval Instances (unreleased)
|
|
1821
|
+
|
|
1822
|
+
Not in a published version yet. It landed after `v0.21.4`.
|
|
1823
|
+
|
|
1824
|
+
A decision on a task, or an initiator's resubmission of a returned instance,
|
|
1825
|
+
can fail to move the instance on to its next stage (the next stage has no
|
|
1826
|
+
resolvable approver, say). The transaction rolls back, so the task is still
|
|
1827
|
+
open or the instance is still returned, and the person who pressed sees the
|
|
1828
|
+
error. Without a trace, nobody else would know the instance is stuck.
|
|
1829
|
+
|
|
1830
|
+
- The failure is recorded as an `ADVANCE_FAILED` activity record, written in a
|
|
1831
|
+
transaction of its own after the first one has rolled back. Only an
|
|
1832
|
+
`HttpException` with a status below 500 is recorded; its message is what the
|
|
1833
|
+
operator sees. A 5xx, which usually clears on retry, and a plain `Error`,
|
|
1834
|
+
which may carry SQL, are not recorded. The caller still gets the original
|
|
1835
|
+
error, unchanged.
|
|
1836
|
+
- An administrator (`@BPMAdminOnly()`) lists the instances that are still stuck
|
|
1837
|
+
with `stuckApprovalInstances`: one row per `RUNNING` or `RETURNED` instance,
|
|
1838
|
+
newest failure first, with the reason, the node, who has to press again now
|
|
1839
|
+
(read when the list loads, so it follows a later reassignment) and, for a
|
|
1840
|
+
timeout approval the system made, `automatic: 'SLA_AUTO_APPROVE'`. The list
|
|
1841
|
+
is always paged — `page` (default 1) and `pageSize` (default 20, at most
|
|
1842
|
+
100) — and `stuckApprovalInstanceCount` gives the total.
|
|
1843
|
+
- `adminCancelApprovalInstance(input)` ends a running or returned instance
|
|
1844
|
+
whoever started it. `input.reason` is required. After it, the instance leaves
|
|
1845
|
+
the stuck list.
|
|
1846
|
+
- The initiator is sent an in-app notification with the reason, unless the
|
|
1847
|
+
administrator is the initiator. It is written only after the cancellation
|
|
1848
|
+
has committed; if writing it fails, the failure is logged and the
|
|
1849
|
+
cancellation stands.
|
|
1850
|
+
- The `INSTANCE_CANCELLED` activity record of that cancellation carries
|
|
1851
|
+
`cancelledByAdministrator: true` in its payload, and the reason as `comment`.
|
|
1852
|
+
A host that reads `INSTANCE_CANCELLED` can tell it from the initiator
|
|
1853
|
+
withdrawing, whose payload has no such key.
|
|
1854
|
+
|
|
1788
1855
|
## Delegation Rules
|
|
1789
1856
|
|
|
1790
1857
|
> The priority order and the root check below are unreleased (they landed after
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rytass/bpm-core-nestjs-module",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Embeddable NestJS BPM approval workflow module: workflow engine, approval templates, forms, organization/member contracts, attachments, signatures, notifications, delegation, and TypeORM migrations.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bpm",
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"@nestjs/core": ">=10.0.0",
|
|
163
163
|
"@nestjs/graphql": ">=12.0.0",
|
|
164
164
|
"@nestjs/typeorm": ">=10.0.0",
|
|
165
|
-
"@rytass/bpm-core-shared": "^0.
|
|
165
|
+
"@rytass/bpm-core-shared": "^0.24.0",
|
|
166
166
|
"@rytass/secret-adapter-vault-nestjs": ">=0.4.5",
|
|
167
167
|
"express": ">=4.0.0",
|
|
168
168
|
"graphql": ">=16.0.0",
|
package/src/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from './lib/expression-function';
|
|
|
10
10
|
export * from './lib/form';
|
|
11
11
|
export * from './lib/form-data-source';
|
|
12
12
|
export * from './lib/identity';
|
|
13
|
+
export * from './lib/instance-event';
|
|
13
14
|
export * from './lib/notification';
|
|
14
15
|
export * from './lib/organization';
|
|
15
16
|
export * from './lib/signature';
|
package/src/index.js
CHANGED
|
@@ -13,6 +13,7 @@ tslib_1.__exportStar(require("./lib/expression-function"), exports);
|
|
|
13
13
|
tslib_1.__exportStar(require("./lib/form"), exports);
|
|
14
14
|
tslib_1.__exportStar(require("./lib/form-data-source"), exports);
|
|
15
15
|
tslib_1.__exportStar(require("./lib/identity"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./lib/instance-event"), exports);
|
|
16
17
|
tslib_1.__exportStar(require("./lib/notification"), exports);
|
|
17
18
|
tslib_1.__exportStar(require("./lib/organization"), exports);
|
|
18
19
|
tslib_1.__exportStar(require("./lib/signature"), exports);
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/bpm-core/src/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,oDAA0B;AAC1B,yDAA+B;AAC/B,yDAA+B;AAC/B,uDAA6B;AAC7B,0DAAgC;AAChC,yDAA+B;AAC/B,2DAAiC;AACjC,oEAA0C;AAC1C,qDAA2B;AAC3B,iEAAuC;AACvC,yDAA+B;AAC/B,6DAAmC;AACnC,6DAAmC;AACnC,0DAAgC;AAChC,yDAA+B;AAC/B,gEAAsC;AACtC,iEAAuC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/bpm-core/src/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,oDAA0B;AAC1B,yDAA+B;AAC/B,yDAA+B;AAC/B,uDAA6B;AAC7B,0DAAgC;AAChC,yDAA+B;AAC/B,2DAAiC;AACjC,oEAA0C;AAC1C,qDAA2B;AAC3B,iEAAuC;AACvC,yDAA+B;AAC/B,+DAAqC;AACrC,6DAAmC;AACnC,6DAAmC;AACnC,0DAAgC;AAChC,yDAA+B;AAC/B,gEAAsC;AACtC,iEAAuC"}
|
|
@@ -5,12 +5,15 @@ import { BPMAuthModuleOptions } from '../bpm-auth/bpm-auth.options';
|
|
|
5
5
|
import { BPMBusinessCalendar } from '../calendar/business-calendar.token';
|
|
6
6
|
import type { BPMExpressionFunction } from '../expression-function/expression-function.types';
|
|
7
7
|
import { BPMFormDataSourceRegistry } from '../form-data-source/form-data-source.types';
|
|
8
|
+
import type { BPMInstanceEventDeliveryOptions } from '../instance-event/instance-event.options';
|
|
9
|
+
import type { BPMInstanceEventObserver } from '../instance-event/instance-event.token';
|
|
8
10
|
import { BPMRootIdentityOptions } from '../identity/identity-options';
|
|
9
11
|
import { BPMMemberResolver } from '../identity/member-resolver.interface';
|
|
10
12
|
import { BPMRootNotificationOptions } from '../notification/notification-options';
|
|
11
13
|
import { BPMRootOrganizationOptions } from '../organization/organization-time-zone';
|
|
12
14
|
import { BPMRootSignatureOptions } from '../signature/signature-options';
|
|
13
15
|
import { BPMInitiatorCustomFieldsResolver } from '../workflow-engine/initiator-custom-fields-resolver.token';
|
|
16
|
+
import { BPMInstanceGuard } from '../workflow-engine/instance-guard.token';
|
|
14
17
|
import { BPMWorkflowServiceTaskDispatcher } from '../workflow-engine/workflow-service-task-dispatcher.token';
|
|
15
18
|
import { BPMRootWorkflowWebhookOptions } from '../workflow-webhook/workflow-webhook-options';
|
|
16
19
|
import { BPMWorkflowWebhookRegistry } from '../workflow-webhook/workflow-webhook.types';
|
|
@@ -79,6 +82,28 @@ export interface BPMRootRuntimeOptions extends BPMRootAttachmentOptions, BPMRoot
|
|
|
79
82
|
* When omitted, only the built-ins are available.
|
|
80
83
|
*/
|
|
81
84
|
readonly expressionFunctions?: readonly BPMExpressionFunction[];
|
|
85
|
+
/**
|
|
86
|
+
* Reads a form field the case has no value for as `null` (a table as `[]`)
|
|
87
|
+
* instead of failing the expression with a missing key (ADR 27 §3). Only
|
|
88
|
+
* top-level fields of the case's form schema are filled; table columns are
|
|
89
|
+
* not, and nothing is written back to `form_data`. Applies to every
|
|
90
|
+
* workflow expression on a case (entry conditions, gateways, approver
|
|
91
|
+
* expressions, WEBHOOK payloads, `SET_FORM_FIELD`), to delegation
|
|
92
|
+
* `scopeConditionCel`, and to dry runs given the form schema.
|
|
93
|
+
*
|
|
94
|
+
* Defaults to `false`. Turning it on changes what existing expressions mean
|
|
95
|
+
* for an unfilled field `x`:
|
|
96
|
+
*
|
|
97
|
+
* | expression | off | on |
|
|
98
|
+
* | ---------------- | ------------------- | ------------------------ |
|
|
99
|
+
* | `has(form.x)` | `false` | `true` |
|
|
100
|
+
* | `form.x == null` | missing-key error | `true` |
|
|
101
|
+
* | `form.x > 5` | missing-key error | type error (still fails) |
|
|
102
|
+
*
|
|
103
|
+
* A template that tests "not filled" with `has(form.x)` must switch to
|
|
104
|
+
* `form.x == null` before the host turns this on.
|
|
105
|
+
*/
|
|
106
|
+
readonly expressionMissingFormFieldsAsNull?: boolean;
|
|
82
107
|
/**
|
|
83
108
|
* Versioned form option DataSource catalog, as a ready instance. When
|
|
84
109
|
* omitted, BPM exposes an empty catalog.
|
|
@@ -101,6 +126,38 @@ export interface BPMRootRuntimeOptions extends BPMRootAttachmentOptions, BPMRoot
|
|
|
101
126
|
* given. When omitted, `customFields` is `{}`.
|
|
102
127
|
*/
|
|
103
128
|
readonly initiatorCustomFieldsResolver?: BPMInitiatorCustomFieldsResolver;
|
|
129
|
+
/**
|
|
130
|
+
* Pre-decision guard that can refuse a submit, resubmit or decide before the
|
|
131
|
+
* engine commits it, as a ready instance. Refusals come back as a 400 with
|
|
132
|
+
* `formDataErrors` (reason `HOST_RULE`); a timeout or a failing guard comes
|
|
133
|
+
* back as a 503. The guard runs inside the engine transaction, so a refusal
|
|
134
|
+
* rolls the whole change back.
|
|
135
|
+
*
|
|
136
|
+
* `instanceGuardProvider` takes precedence when both are given. When omitted,
|
|
137
|
+
* no guard runs.
|
|
138
|
+
*/
|
|
139
|
+
readonly instanceGuard?: BPMInstanceGuard;
|
|
140
|
+
/**
|
|
141
|
+
* Time the guard gets to answer, in milliseconds. Default 5000. A guard that
|
|
142
|
+
* does not answer in time fails closed (503 `BPM_INSTANCE_GUARD_TIMEOUT`).
|
|
143
|
+
* Only read when a guard is bound.
|
|
144
|
+
*/
|
|
145
|
+
readonly instanceGuardTimeoutMs?: number;
|
|
146
|
+
/**
|
|
147
|
+
* Receives instance lifecycle events (ADR 27 §1), as a ready instance. BPM
|
|
148
|
+
* writes one outbox row per event in the same transaction as the state change
|
|
149
|
+
* and calls the observer after commit, at least once per event. Hosts dedupe
|
|
150
|
+
* on `event.id`.
|
|
151
|
+
*
|
|
152
|
+
* `instanceEventObserverProvider` takes precedence when both are given. When
|
|
153
|
+
* omitted, no outbox rows are written.
|
|
154
|
+
*/
|
|
155
|
+
readonly instanceEventObserver?: BPMInstanceEventObserver;
|
|
156
|
+
/**
|
|
157
|
+
* Outbox tuning for instance lifecycle events (ADR 27 §1.4). Unset or
|
|
158
|
+
* non-positive fields take the webhook-matching defaults.
|
|
159
|
+
*/
|
|
160
|
+
readonly instanceEventDelivery?: Partial<BPMInstanceEventDeliveryOptions>;
|
|
104
161
|
/**
|
|
105
162
|
* Host identity source, as a ready instance.
|
|
106
163
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bpm-root-options.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/bpm/bpm-root-options.ts"],"names":[],"mappings":";;;;;A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AAoB,CAAC,CAAC;wBAE9D,OAAO,QAAQ,CAAC;oBAClB,CAAC;iBACF;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AA1CY,oDAAoB;+BAApB,oBAAoB;IAFhC,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,oBAAoB,CA0ChC"}
|
|
@@ -4,9 +4,11 @@ import { BPMResolverMetadataFactory } from '../bpm-auth/bpm-resolver-metadata';
|
|
|
4
4
|
import { BPMBusinessCalendar } from '../calendar/business-calendar.token';
|
|
5
5
|
import type { BPMExpressionFunction } from '../expression-function/expression-function.types';
|
|
6
6
|
import { BPMFormDataSourceRegistry } from '../form-data-source';
|
|
7
|
+
import type { BPMInstanceEventObserver } from '../instance-event/instance-event.token';
|
|
7
8
|
import { BPMMemberResolver } from '../identity/member-resolver.interface';
|
|
8
9
|
import { BPMWorkflowWebhookRegistry } from '../workflow-webhook/workflow-webhook.types';
|
|
9
10
|
import { BPMInitiatorCustomFieldsResolver } from '../workflow-engine/initiator-custom-fields-resolver.token';
|
|
11
|
+
import { BPMInstanceGuard } from '../workflow-engine/instance-guard.token';
|
|
10
12
|
import { BPMWorkflowServiceTaskDispatcher } from '../workflow-engine/workflow-service-task-dispatcher.token';
|
|
11
13
|
import { BPMRootRuntimeOptions } from './bpm-root-options';
|
|
12
14
|
/**
|
|
@@ -79,6 +81,25 @@ interface BPMRootModuleWiringOptions extends Pick<ModuleMetadata, 'imports'> {
|
|
|
79
81
|
* provider and the runtime twin reach the same place. When none is given, `customFields` of an engine-built snapshot is `{}`.
|
|
80
82
|
*/
|
|
81
83
|
readonly initiatorCustomFieldsResolverProvider?: Provider<BPMInitiatorCustomFieldsResolver>;
|
|
84
|
+
/**
|
|
85
|
+
* Host-provided pre-decision guard, as a Nest provider for
|
|
86
|
+
* `BPM_INSTANCE_GUARD`. Runs on submit, resubmit and decide, inside the
|
|
87
|
+
* engine transaction.
|
|
88
|
+
*
|
|
89
|
+
* Runtime twin: {@link BPMRootRuntimeOptions.instanceGuard}. When both are
|
|
90
|
+
* given this provider wins. When neither is given the engine behaves as it
|
|
91
|
+
* did before the guard existed.
|
|
92
|
+
*/
|
|
93
|
+
readonly instanceGuardProvider?: Provider<BPMInstanceGuard>;
|
|
94
|
+
/**
|
|
95
|
+
* Host-provided instance lifecycle event observer, as a Nest provider for
|
|
96
|
+
* `BPM_INSTANCE_EVENT_OBSERVER`.
|
|
97
|
+
*
|
|
98
|
+
* Runtime twin: {@link BPMRootRuntimeOptions.instanceEventObserver}. When both
|
|
99
|
+
* are given this provider wins. When neither is given, no outbox rows are
|
|
100
|
+
* written.
|
|
101
|
+
*/
|
|
102
|
+
readonly instanceEventObserverProvider?: Provider<BPMInstanceEventObserver>;
|
|
82
103
|
/**
|
|
83
104
|
* Host-provided member resolver, as a Nest provider.
|
|
84
105
|
*
|
|
@@ -12,6 +12,7 @@ const delegation_module_1 = require("../delegation/delegation.module");
|
|
|
12
12
|
const expression_function_module_1 = require("../expression-function/expression-function.module");
|
|
13
13
|
const form_module_1 = require("../form/form.module");
|
|
14
14
|
const form_data_source_1 = require("../form-data-source");
|
|
15
|
+
const instance_event_module_1 = require("../instance-event/instance-event.module");
|
|
15
16
|
const identity_module_1 = require("../identity/identity.module");
|
|
16
17
|
const notification_module_1 = require("../notification/notification.module");
|
|
17
18
|
const notification_options_module_1 = require("../notification/notification-options.module");
|
|
@@ -118,6 +119,7 @@ function createBPMFeatureModules(wiring) {
|
|
|
118
119
|
const workflowEngineModule = workflow_engine_module_1.WorkflowEngineModule.forRoot({
|
|
119
120
|
imports: wiring.imports,
|
|
120
121
|
initiatorCustomFieldsResolverProvider: wiring.initiatorCustomFieldsResolverProvider,
|
|
122
|
+
instanceGuardProvider: wiring.instanceGuardProvider,
|
|
121
123
|
serviceTaskDispatcherProvider: wiring.workflowServiceTaskDispatcherProvider,
|
|
122
124
|
});
|
|
123
125
|
return [
|
|
@@ -168,6 +170,10 @@ function createBPMFeatureModules(wiring) {
|
|
|
168
170
|
imports: wiring.imports,
|
|
169
171
|
registryProvider: wiring.workflowWebhookRegistryProvider,
|
|
170
172
|
}),
|
|
173
|
+
instance_event_module_1.InstanceEventModule.forRoot({
|
|
174
|
+
imports: wiring.imports,
|
|
175
|
+
observerProvider: wiring.instanceEventObserverProvider,
|
|
176
|
+
}),
|
|
171
177
|
];
|
|
172
178
|
}
|
|
173
179
|
//# sourceMappingURL=bpm-root.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bpm-root.module.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/bpm/bpm-root.module.ts"],"names":[],"mappings":";;;;;AAAA,2CAOwB;AACxB,uEAAmE;AAEnE,iEAA4D;AAC5D,6EAG2C;AAG3C,iEAA6D;AAC7D,uEAAmE;AACnE,kGAA6F;AAE7F,qDAAiD;AACjD,0DAI6B;AAC7B,iEAA6D;AAE7D,6EAAyE;AACzE,6FAAwF;AACxF,yGAAmG;AACnG,yFAGqD;AAErD,6EAAyE;AACzE,oEAAgE;AAChE,iEAA6D;AAC7D,sFAAiF;
|
|
1
|
+
{"version":3,"file":"bpm-root.module.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/bpm/bpm-root.module.ts"],"names":[],"mappings":";;;;;AAAA,2CAOwB;AACxB,uEAAmE;AAEnE,iEAA4D;AAC5D,6EAG2C;AAG3C,iEAA6D;AAC7D,uEAAmE;AACnE,kGAA6F;AAE7F,qDAAiD;AACjD,0DAI6B;AAC7B,mFAGiD;AAEjD,iEAA6D;AAE7D,6EAAyE;AACzE,6FAAwF;AACxF,yGAAmG;AACnG,yFAGqD;AAErD,6EAAyE;AACzE,oEAAgE;AAChE,iEAA6D;AAC7D,sFAAiF;AAIjF,yDAI4B;AA+M5B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEI,IAAM,aAAa,qBAAnB,MAAM,aAAa;IACxB;;;OAGG;IACH,MAAM,CAAC,OAAO,CAAC,UAAgC,EAAE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CAAC;YAC/B,iBAAiB,EAAE,MAAM,CAAC,2BAA2B;YACrD,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAC;QACF,wBAAU;QACV,uCAAoB,CAAC,OAAO,CAAC;YAC3B,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,gBAAgB,EAAE,MAAM,CAAC,8BAA8B;YACvD,oBAAoB;SACiB,CAAC;QACxC,gCAAc;QACd,oCAAgB;QAChB,wCAAkB;QAClB,kCAAe,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;QACpD,oBAAoB;QACpB,+CAAqB,CAAC,OAAO,CAAC;YAC5B,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,gBAAgB,EAAE,MAAM,CAAC,+BAA+B;SAClB,CAAC;QACzC,2CAAmB,CAAC,OAAO,CAAC;YAC1B,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,gBAAgB,EAAE,MAAM,CAAC,6BAA6B;SAClB,CAAC;KACxC,CAAC;AACJ,CAAC"}
|
|
@@ -4,6 +4,11 @@ export declare class CreateFormDefinitionInput {
|
|
|
4
4
|
createdByMemberId: string | null;
|
|
5
5
|
schemaJson: string | null;
|
|
6
6
|
uiSchemaJson: string | null;
|
|
7
|
+
/**
|
|
8
|
+
* Host-owned flag (ADR 27 §6). Service-only: deliberately has no `@Field`,
|
|
9
|
+
* so GraphQL callers cannot set it. Absent creates the form with `false`.
|
|
10
|
+
*/
|
|
11
|
+
hostManaged?: boolean;
|
|
7
12
|
}
|
|
8
13
|
export declare class UpdateFormDefinitionInput {
|
|
9
14
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-definition.input.js","sourceRoot":"","sources":["../../../../../../../libs/bpm-core/src/lib/form/dto/form-definition.input.ts"],"names":[],"mappings":";;;;AAAA,6CAAuD;AACvD,qDAA+D;AAGxD,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;
|
|
1
|
+
{"version":3,"file":"form-definition.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IAAA,eAAK,GAAE;IACP,IAAA,0BAAQ,GAAE;;uDACS;AAKpB;IAHC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;yDACkB;8BARlB,mBAAmB;IAD/B,IAAA,mBAAS,GAAE;GACC,mBAAmB,CAS/B"}
|
|
@@ -6,6 +6,11 @@ export declare class FormDefinitionEntity {
|
|
|
6
6
|
currentVersionNumber?: number | null;
|
|
7
7
|
currentVersionCreatedAt?: Date | null;
|
|
8
8
|
currentVersionPublishedAt?: Date | null;
|
|
9
|
+
/**
|
|
10
|
+
* The form is maintained by host code (ADR 27 §9). `formDefinitions` leaves
|
|
11
|
+
* it out unless `includeHostManaged` is passed. Not a lock.
|
|
12
|
+
*/
|
|
13
|
+
hostManaged: boolean;
|
|
9
14
|
deletedAt: Date | null;
|
|
10
15
|
createdAt: Date;
|
|
11
16
|
updatedAt: Date;
|
|
@@ -39,6 +39,13 @@ tslib_1.__decorate([
|
|
|
39
39
|
(0, graphql_1.Field)(() => Date, { nullable: true }),
|
|
40
40
|
tslib_1.__metadata("design:type", Object)
|
|
41
41
|
], FormDefinitionEntity.prototype, "currentVersionPublishedAt", void 0);
|
|
42
|
+
tslib_1.__decorate([
|
|
43
|
+
(0, typeorm_1.Column)('boolean', { default: false, name: 'host_managed' }),
|
|
44
|
+
(0, graphql_1.Field)({
|
|
45
|
+
description: 'The form is maintained by host code. formDefinitions leaves it out unless includeHostManaged is true. Not a lock.',
|
|
46
|
+
}),
|
|
47
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
48
|
+
], FormDefinitionEntity.prototype, "hostManaged", void 0);
|
|
42
49
|
tslib_1.__decorate([
|
|
43
50
|
(0, typeorm_1.DeleteDateColumn)({ name: 'deleted_at', type: 'timestamptz' }),
|
|
44
51
|
(0, graphql_1.Field)(() => Date, { nullable: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-definition.entity.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/form/form-definition.entity.ts"],"names":[],"mappings":";;;;AAAA,6CAA6D;AAC7D,qCAOiB;AAIV,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;
|
|
1
|
+
{"version":3,"file":"form-definition.entity.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/form/form-definition.entity.ts"],"names":[],"mappings":";;;;AAAA,6CAA6D;AAC7D,qCAOiB;AAIV,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAoDhC,CAAA;AApDY,oDAAoB;AAG/B;IAFC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,CAAC;;gDACJ;AAIZ;IAFC,IAAA,gBAAM,EAAC,MAAM,CAAC;IACd,IAAA,eAAK,GAAE;;kDACM;AAId;IAFC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAClC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACZ;AAI5B;IAFC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC9D,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,YAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8DACH;AAGjC;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,aAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kEACA;AAGrC;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qEACA;AAGtC;IADC,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uEACE;AAWxC;IALC,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;IAC3D,IAAA,eAAK,EAAC;QACL,WAAW,EACT,mHAAmH;KACtH,CAAC;;yDACoB;AAItB;IAFC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAC7D,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACd;AAIxB;IAFC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAC7D,IAAA,eAAK,GAAE;sCACI,IAAI;uDAAC;AAIjB;IAFC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAC7D,IAAA,eAAK,GAAE;sCACI,IAAI;uDAAC;AAIjB;IAFC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAChE,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+DACN;+BAnDvB,oBAAoB;IAFhC,IAAA,gBAAM,EAAC,kBAAkB,CAAC;IAC1B,IAAA,oBAAU,EAAC,gBAAgB,CAAC;GAChB,oBAAoB,CAoDhC"}
|
|
@@ -400,7 +400,7 @@ function lintSelectField(field, type, path, scope) {
|
|
|
400
400
|
return [
|
|
401
401
|
...sourceErrors,
|
|
402
402
|
...(hasDataSource
|
|
403
|
-
? lintDynamicDefaultValue(field, path)
|
|
403
|
+
? lintDynamicDefaultValue(field, type, path)
|
|
404
404
|
: lintSelectDefaultValue(field, type, path)),
|
|
405
405
|
];
|
|
406
406
|
}
|
|
@@ -555,10 +555,22 @@ function lintConstantValue(value, path) {
|
|
|
555
555
|
? []
|
|
556
556
|
: [`${path} must be a primitive constant`];
|
|
557
557
|
}
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
558
|
+
/**
|
|
559
|
+
* A dynamic data source may carry a default value only when its value cannot
|
|
560
|
+
* change per filler or per row. FIELD, ROW_FIELD and EXPRESSION bindings make
|
|
561
|
+
* the option set depend on other values, so a fixed default could go stale.
|
|
562
|
+
* CONSTANT bindings and bindings-free sources are fixed and may use a default.
|
|
563
|
+
*/
|
|
564
|
+
function lintDynamicDefaultValue(field, type, path) {
|
|
565
|
+
if (typeof field.defaultValue === 'undefined') {
|
|
566
|
+
return [];
|
|
567
|
+
}
|
|
568
|
+
const hasDependentBinding = readBindingSources(field).some((from) => from.kind !== 'CONSTANT');
|
|
569
|
+
return hasDependentBinding
|
|
570
|
+
? [
|
|
571
|
+
`${path}.defaultValue is not allowed when the dynamic data source depends on other values (FIELD, ROW_FIELD or EXPRESSION binding)`,
|
|
572
|
+
]
|
|
573
|
+
: lintSelectDefaultValue(field, type, path);
|
|
562
574
|
}
|
|
563
575
|
function lintBooleanField(field, path) {
|
|
564
576
|
return lintOptionalDefaultValue(field.defaultValue, path, (value) => typeof value === 'boolean' || value === null);
|