@rytass/bpm-core-nestjs-module 0.21.4 → 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.
Files changed (143) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/README.md +9 -1
  3. package/package.json +2 -2
  4. package/src/index.d.ts +1 -0
  5. package/src/index.js +1 -0
  6. package/src/index.js.map +1 -1
  7. package/src/lib/bpm/bpm-root-options.d.ts +57 -0
  8. package/src/lib/bpm/bpm-root-options.js.map +1 -1
  9. package/src/lib/bpm/bpm-root.module.d.ts +21 -0
  10. package/src/lib/bpm/bpm-root.module.js +6 -0
  11. package/src/lib/bpm/bpm-root.module.js.map +1 -1
  12. package/src/lib/form/dto/form-definition.input.d.ts +5 -0
  13. package/src/lib/form/dto/form-definition.input.js.map +1 -1
  14. package/src/lib/form/form-definition.entity.d.ts +5 -0
  15. package/src/lib/form/form-definition.entity.js +7 -0
  16. package/src/lib/form/form-definition.entity.js.map +1 -1
  17. package/src/lib/form/form-schema.validator.js +17 -5
  18. package/src/lib/form/form-schema.validator.js.map +1 -1
  19. package/src/lib/form/form.queries.d.ts +2 -2
  20. package/src/lib/form/form.queries.js +17 -5
  21. package/src/lib/form/form.queries.js.map +1 -1
  22. package/src/lib/form/form.service.d.ts +2 -1
  23. package/src/lib/form/form.service.js +10 -5
  24. package/src/lib/form/form.service.js.map +1 -1
  25. package/src/lib/form-data-source/form-data-source-value-resolver.service.js +22 -2
  26. package/src/lib/form-data-source/form-data-source-value-resolver.service.js.map +1 -1
  27. package/src/lib/form-data-source/form-data-source.errors.d.ts +11 -0
  28. package/src/lib/form-data-source/form-data-source.errors.js +14 -1
  29. package/src/lib/form-data-source/form-data-source.errors.js.map +1 -1
  30. package/src/lib/form-data-source/form-data-source.service.d.ts +6 -0
  31. package/src/lib/form-data-source/form-data-source.service.js +41 -15
  32. package/src/lib/form-data-source/form-data-source.service.js.map +1 -1
  33. package/src/lib/identity/identity-options.d.ts +1 -1
  34. package/src/lib/identity/identity.queries.d.ts +0 -2
  35. package/src/lib/identity/identity.queries.js +0 -11
  36. package/src/lib/identity/identity.queries.js.map +1 -1
  37. package/src/lib/instance-event/approval-instance-event.entity.d.ts +27 -0
  38. package/src/lib/instance-event/approval-instance-event.entity.js +93 -0
  39. package/src/lib/instance-event/approval-instance-event.entity.js.map +1 -0
  40. package/src/lib/instance-event/index.d.ts +13 -0
  41. package/src/lib/instance-event/index.js +17 -0
  42. package/src/lib/instance-event/index.js.map +1 -0
  43. package/src/lib/instance-event/instance-event.delivery-scheduler.service.d.ts +21 -0
  44. package/src/lib/instance-event/instance-event.delivery-scheduler.service.js +81 -0
  45. package/src/lib/instance-event/instance-event.delivery-scheduler.service.js.map +1 -0
  46. package/src/lib/instance-event/instance-event.delivery.service.d.ts +69 -0
  47. package/src/lib/instance-event/instance-event.delivery.service.js +259 -0
  48. package/src/lib/instance-event/instance-event.delivery.service.js.map +1 -0
  49. package/src/lib/instance-event/instance-event.delivery.subscriber.d.ts +24 -0
  50. package/src/lib/instance-event/instance-event.delivery.subscriber.js +85 -0
  51. package/src/lib/instance-event/instance-event.delivery.subscriber.js.map +1 -0
  52. package/src/lib/instance-event/instance-event.enums.d.ts +12 -0
  53. package/src/lib/instance-event/instance-event.enums.js +28 -0
  54. package/src/lib/instance-event/instance-event.enums.js.map +1 -0
  55. package/src/lib/instance-event/instance-event.module.d.ts +13 -0
  56. package/src/lib/instance-event/instance-event.module.js +52 -0
  57. package/src/lib/instance-event/instance-event.module.js.map +1 -0
  58. package/src/lib/instance-event/instance-event.object.d.ts +24 -0
  59. package/src/lib/instance-event/instance-event.object.js +73 -0
  60. package/src/lib/instance-event/instance-event.object.js.map +1 -0
  61. package/src/lib/instance-event/instance-event.options.d.ts +26 -0
  62. package/src/lib/instance-event/instance-event.options.js +35 -0
  63. package/src/lib/instance-event/instance-event.options.js.map +1 -0
  64. package/src/lib/instance-event/instance-event.resolver.d.ts +10 -0
  65. package/src/lib/instance-event/instance-event.resolver.js +75 -0
  66. package/src/lib/instance-event/instance-event.resolver.js.map +1 -0
  67. package/src/lib/instance-event/instance-event.service.d.ts +18 -0
  68. package/src/lib/instance-event/instance-event.service.js +37 -0
  69. package/src/lib/instance-event/instance-event.service.js.map +1 -0
  70. package/src/lib/instance-event/instance-event.token.d.ts +19 -0
  71. package/src/lib/instance-event/instance-event.token.js +9 -0
  72. package/src/lib/instance-event/instance-event.token.js.map +1 -0
  73. package/src/lib/instance-event/instance-event.types.d.ts +67 -0
  74. package/src/lib/instance-event/instance-event.types.js +9 -0
  75. package/src/lib/instance-event/instance-event.types.js.map +1 -0
  76. package/src/lib/instance-event/instance-event.writer.d.ts +21 -0
  77. package/src/lib/instance-event/instance-event.writer.js +45 -0
  78. package/src/lib/instance-event/instance-event.writer.js.map +1 -0
  79. package/src/lib/migrations/0000000032000-host-integration-round.d.ts +25 -0
  80. package/src/lib/migrations/0000000032000-host-integration-round.js +104 -0
  81. package/src/lib/migrations/0000000032000-host-integration-round.js.map +1 -0
  82. package/src/lib/migrations/index.d.ts +1 -0
  83. package/src/lib/migrations/index.js +3 -0
  84. package/src/lib/migrations/index.js.map +1 -1
  85. package/src/lib/notification/notification.service.js +50 -9
  86. package/src/lib/notification/notification.service.js.map +1 -1
  87. package/src/lib/template/approval-template-version.entity.d.ts +9 -1
  88. package/src/lib/template/approval-template-version.entity.js +11 -1
  89. package/src/lib/template/approval-template-version.entity.js.map +1 -1
  90. package/src/lib/template/approval-template.entity.d.ts +18 -0
  91. package/src/lib/template/approval-template.entity.js +23 -0
  92. package/src/lib/template/approval-template.entity.js.map +1 -1
  93. package/src/lib/template/dto/approval-template.input.d.ts +21 -0
  94. package/src/lib/template/dto/approval-template.input.js +38 -0
  95. package/src/lib/template/dto/approval-template.input.js.map +1 -1
  96. package/src/lib/template/dto/compose-approval-template.input.d.ts +23 -0
  97. package/src/lib/template/dto/compose-approval-template.input.js +37 -0
  98. package/src/lib/template/dto/compose-approval-template.input.js.map +1 -1
  99. package/src/lib/template/template-key.d.ts +26 -0
  100. package/src/lib/template/template-key.js +67 -0
  101. package/src/lib/template/template-key.js.map +1 -0
  102. package/src/lib/template/template.enums.d.ts +11 -0
  103. package/src/lib/template/template.enums.js +17 -1
  104. package/src/lib/template/template.enums.js.map +1 -1
  105. package/src/lib/template/template.queries.d.ts +3 -2
  106. package/src/lib/template/template.queries.js +29 -4
  107. package/src/lib/template/template.queries.js.map +1 -1
  108. package/src/lib/template/template.service.d.ts +8 -1
  109. package/src/lib/template/template.service.js +94 -17
  110. package/src/lib/template/template.service.js.map +1 -1
  111. package/src/lib/workflow-engine/approver-filled-table-columns.d.ts +91 -0
  112. package/src/lib/workflow-engine/approver-filled-table-columns.js +301 -0
  113. package/src/lib/workflow-engine/approver-filled-table-columns.js.map +1 -0
  114. package/src/lib/workflow-engine/dto/dry-run-approval-workflow.input.d.ts +7 -0
  115. package/src/lib/workflow-engine/dto/dry-run-approval-workflow.input.js +9 -0
  116. package/src/lib/workflow-engine/dto/dry-run-approval-workflow.input.js.map +1 -1
  117. package/src/lib/workflow-engine/index.d.ts +1 -0
  118. package/src/lib/workflow-engine/index.js +1 -0
  119. package/src/lib/workflow-engine/index.js.map +1 -1
  120. package/src/lib/workflow-engine/initiator-custom-fields-resolver.token.d.ts +31 -11
  121. package/src/lib/workflow-engine/initiator-custom-fields-resolver.token.js.map +1 -1
  122. package/src/lib/workflow-engine/instance-guard.runner.d.ts +19 -0
  123. package/src/lib/workflow-engine/instance-guard.runner.js +102 -0
  124. package/src/lib/workflow-engine/instance-guard.runner.js.map +1 -0
  125. package/src/lib/workflow-engine/instance-guard.token.d.ts +101 -0
  126. package/src/lib/workflow-engine/instance-guard.token.js +9 -0
  127. package/src/lib/workflow-engine/instance-guard.token.js.map +1 -0
  128. package/src/lib/workflow-engine/missing-form-fields.d.ts +12 -0
  129. package/src/lib/workflow-engine/missing-form-fields.js +27 -0
  130. package/src/lib/workflow-engine/missing-form-fields.js.map +1 -0
  131. package/src/lib/workflow-engine/workflow-engine.module.d.ts +2 -0
  132. package/src/lib/workflow-engine/workflow-engine.module.js +3 -0
  133. package/src/lib/workflow-engine/workflow-engine.module.js.map +1 -1
  134. package/src/lib/workflow-engine/workflow-engine.mutations.d.ts +1 -1
  135. package/src/lib/workflow-engine/workflow-engine.mutations.js +8 -3
  136. package/src/lib/workflow-engine/workflow-engine.mutations.js.map +1 -1
  137. package/src/lib/workflow-engine/workflow-engine.queries.d.ts +7 -5
  138. package/src/lib/workflow-engine/workflow-engine.queries.js +136 -24
  139. package/src/lib/workflow-engine/workflow-engine.queries.js.map +1 -1
  140. package/src/lib/workflow-engine/workflow-engine.service.d.ts +216 -7
  141. package/src/lib/workflow-engine/workflow-engine.service.js +864 -131
  142. package/src/lib/workflow-engine/workflow-engine.service.js.map +1 -1
  143. package/src/lib/workflow-engine/workflow-engine.tokens.d.ts +5 -0
@@ -28,7 +28,7 @@ let WorkflowEngineQueries = class WorkflowEngineQueries {
28
28
  this.workflowEngineService = workflowEngineService;
29
29
  this.moduleRef = moduleRef;
30
30
  }
31
- async approvalInstances(view, searchText, state, templateId, page, pageSize, fieldFilters, sort, currentAuthContext) {
31
+ async approvalInstances(view, searchText, state, templateId, templateKey, page, pageSize, fieldFilters, sort, currentAuthContext) {
32
32
  return this.workflowEngineService.listApprovalInstances(currentAuthContext, {
33
33
  fieldFilters: (0, approval_instance_list_args_1.toApprovalInstanceFieldFilters)(fieldFilters),
34
34
  page: page ?? undefined,
@@ -37,19 +37,21 @@ let WorkflowEngineQueries = class WorkflowEngineQueries {
37
37
  sort: (0, approval_instance_list_args_1.toApprovalInstanceSorts)(sort),
38
38
  state: state ?? undefined,
39
39
  templateId: templateId ?? undefined,
40
+ templateKey: templateKey ?? undefined,
40
41
  view: view ?? undefined,
41
42
  });
42
43
  }
43
- async approvalInstanceCount(view, searchText, state, templateId, fieldFilters, currentAuthContext) {
44
+ async approvalInstanceCount(view, searchText, state, templateId, templateKey, fieldFilters, currentAuthContext) {
44
45
  return this.workflowEngineService.countApprovalInstances(currentAuthContext, {
45
46
  fieldFilters: (0, approval_instance_list_args_1.toApprovalInstanceFieldFilters)(fieldFilters),
46
47
  searchText: searchText ?? undefined,
47
48
  state: state ?? undefined,
48
49
  templateId: templateId ?? undefined,
50
+ templateKey: templateKey ?? undefined,
49
51
  view: view ?? undefined,
50
52
  });
51
53
  }
52
- async approvalInstancePageInfo(view, searchText, state, templateId, page, pageSize, fieldFilters, sort, currentAuthContext) {
54
+ async approvalInstancePageInfo(view, searchText, state, templateId, templateKey, page, pageSize, fieldFilters, sort, currentAuthContext) {
53
55
  return this.workflowEngineService.readApprovalInstancePageInfo(currentAuthContext, {
54
56
  fieldFilters: (0, approval_instance_list_args_1.toApprovalInstanceFieldFilters)(fieldFilters),
55
57
  page: page ?? undefined,
@@ -58,6 +60,7 @@ let WorkflowEngineQueries = class WorkflowEngineQueries {
58
60
  sort: (0, approval_instance_list_args_1.toApprovalInstanceSorts)(sort),
59
61
  state: state ?? undefined,
60
62
  templateId: templateId ?? undefined,
63
+ templateKey: templateKey ?? undefined,
61
64
  view: view ?? undefined,
62
65
  });
63
66
  }
@@ -76,11 +79,35 @@ let WorkflowEngineQueries = class WorkflowEngineQueries {
76
79
  async tasks(instanceId, currentAuthContext) {
77
80
  return this.workflowEngineService.listTasks(instanceId, currentAuthContext);
78
81
  }
79
- async inboxTasks(assigneeMemberId, currentMemberId) {
80
- return this.workflowEngineService.listInboxTasks(currentMemberId);
82
+ async inboxTasks(assigneeMemberId, currentMemberId, page, pageSize, templateIds, templateKey) {
83
+ return this.workflowEngineService.listInboxTasks(currentMemberId, {
84
+ page: page ?? undefined,
85
+ pageSize: pageSize ?? undefined,
86
+ templateIds: templateIds ?? undefined,
87
+ templateKey: templateKey ?? undefined,
88
+ });
89
+ }
90
+ async inboxTaskCount(currentMemberId, templateIds, templateKey) {
91
+ return this.workflowEngineService.countInboxTasks(currentMemberId, {
92
+ templateIds: templateIds ?? undefined,
93
+ templateKey: templateKey ?? undefined,
94
+ });
95
+ }
96
+ async approvalHistoryTasks(assigneeMemberId, currentMemberId, page, pageSize, instanceState, templateIds, templateKey) {
97
+ return this.workflowEngineService.listApprovalHistoryTasks(currentMemberId, {
98
+ instanceState: instanceState ?? undefined,
99
+ page: page ?? undefined,
100
+ pageSize: pageSize ?? undefined,
101
+ templateIds: templateIds ?? undefined,
102
+ templateKey: templateKey ?? undefined,
103
+ });
81
104
  }
82
- async approvalHistoryTasks(assigneeMemberId, currentMemberId) {
83
- return this.workflowEngineService.listApprovalHistoryTasks(currentMemberId);
105
+ async approvalHistoryTaskCount(currentMemberId, instanceState, templateIds, templateKey) {
106
+ return this.workflowEngineService.countApprovalHistoryTasks(currentMemberId, {
107
+ instanceState: instanceState ?? undefined,
108
+ templateIds: templateIds ?? undefined,
109
+ templateKey: templateKey ?? undefined,
110
+ });
84
111
  }
85
112
  async memberOpenTasks(memberId) {
86
113
  return this.workflowEngineService.listMemberOpenTasks(memberId);
@@ -140,16 +167,21 @@ tslib_1.__decorate([
140
167
  type: () => [workflow_engine_enums_1.ApprovalInstanceStateEnum],
141
168
  })),
142
169
  tslib_1.__param(3, (0, graphql_1.Args)('templateId', { nullable: true, type: () => String })),
143
- tslib_1.__param(4, (0, graphql_1.Args)('page', { nullable: true, type: () => graphql_1.Int })),
144
- tslib_1.__param(5, (0, graphql_1.Args)('pageSize', { nullable: true, type: () => graphql_1.Int })),
145
- tslib_1.__param(6, (0, graphql_1.Args)('fieldFilters', {
170
+ tslib_1.__param(4, (0, graphql_1.Args)('templateKey', {
171
+ description: 'The template key (ADR 27 §6). With templateId as well, both must name the same template; an unknown key matches nothing.',
172
+ nullable: true,
173
+ type: () => String,
174
+ })),
175
+ tslib_1.__param(5, (0, graphql_1.Args)('page', { nullable: true, type: () => graphql_1.Int })),
176
+ tslib_1.__param(6, (0, graphql_1.Args)('pageSize', { nullable: true, type: () => graphql_1.Int })),
177
+ tslib_1.__param(7, (0, graphql_1.Args)('fieldFilters', {
146
178
  nullable: true,
147
179
  type: () => [approval_instance_field_filter_input_1.ApprovalInstanceFieldFilterInput],
148
180
  })),
149
- tslib_1.__param(7, (0, graphql_1.Args)('sort', { nullable: true, type: () => [approval_instance_sort_input_1.ApprovalInstanceSortInput] })),
150
- tslib_1.__param(8, (0, bpm_auth_1.BPMCurrentAuthContext)()),
181
+ tslib_1.__param(8, (0, graphql_1.Args)('sort', { nullable: true, type: () => [approval_instance_sort_input_1.ApprovalInstanceSortInput] })),
182
+ tslib_1.__param(9, (0, bpm_auth_1.BPMCurrentAuthContext)()),
151
183
  tslib_1.__metadata("design:type", Function),
152
- tslib_1.__metadata("design:paramtypes", [Object, Object, Object, Object, Object, Object, Object, Object, Object]),
184
+ tslib_1.__metadata("design:paramtypes", [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object]),
153
185
  tslib_1.__metadata("design:returntype", Promise)
154
186
  ], WorkflowEngineQueries.prototype, "approvalInstances", null);
155
187
  tslib_1.__decorate([
@@ -164,13 +196,18 @@ tslib_1.__decorate([
164
196
  type: () => [workflow_engine_enums_1.ApprovalInstanceStateEnum],
165
197
  })),
166
198
  tslib_1.__param(3, (0, graphql_1.Args)('templateId', { nullable: true, type: () => String })),
167
- tslib_1.__param(4, (0, graphql_1.Args)('fieldFilters', {
199
+ tslib_1.__param(4, (0, graphql_1.Args)('templateKey', {
200
+ description: 'The template key (ADR 27 §6). With templateId as well, both must name the same template; an unknown key matches nothing.',
201
+ nullable: true,
202
+ type: () => String,
203
+ })),
204
+ tslib_1.__param(5, (0, graphql_1.Args)('fieldFilters', {
168
205
  nullable: true,
169
206
  type: () => [approval_instance_field_filter_input_1.ApprovalInstanceFieldFilterInput],
170
207
  })),
171
- tslib_1.__param(5, (0, bpm_auth_1.BPMCurrentAuthContext)()),
208
+ tslib_1.__param(6, (0, bpm_auth_1.BPMCurrentAuthContext)()),
172
209
  tslib_1.__metadata("design:type", Function),
173
- tslib_1.__metadata("design:paramtypes", [Object, Object, Object, Object, Object, Object]),
210
+ tslib_1.__metadata("design:paramtypes", [Object, Object, Object, Object, Object, Object, Object]),
174
211
  tslib_1.__metadata("design:returntype", Promise)
175
212
  ], WorkflowEngineQueries.prototype, "approvalInstanceCount", null);
176
213
  tslib_1.__decorate([
@@ -185,16 +222,21 @@ tslib_1.__decorate([
185
222
  type: () => [workflow_engine_enums_1.ApprovalInstanceStateEnum],
186
223
  })),
187
224
  tslib_1.__param(3, (0, graphql_1.Args)('templateId', { nullable: true, type: () => String })),
188
- tslib_1.__param(4, (0, graphql_1.Args)('page', { nullable: true, type: () => graphql_1.Int })),
189
- tslib_1.__param(5, (0, graphql_1.Args)('pageSize', { nullable: true, type: () => graphql_1.Int })),
190
- tslib_1.__param(6, (0, graphql_1.Args)('fieldFilters', {
225
+ tslib_1.__param(4, (0, graphql_1.Args)('templateKey', {
226
+ description: 'The template key (ADR 27 §6). With templateId as well, both must name the same template; an unknown key matches nothing.',
227
+ nullable: true,
228
+ type: () => String,
229
+ })),
230
+ tslib_1.__param(5, (0, graphql_1.Args)('page', { nullable: true, type: () => graphql_1.Int })),
231
+ tslib_1.__param(6, (0, graphql_1.Args)('pageSize', { nullable: true, type: () => graphql_1.Int })),
232
+ tslib_1.__param(7, (0, graphql_1.Args)('fieldFilters', {
191
233
  nullable: true,
192
234
  type: () => [approval_instance_field_filter_input_1.ApprovalInstanceFieldFilterInput],
193
235
  })),
194
- tslib_1.__param(7, (0, graphql_1.Args)('sort', { nullable: true, type: () => [approval_instance_sort_input_1.ApprovalInstanceSortInput] })),
195
- tslib_1.__param(8, (0, bpm_auth_1.BPMCurrentAuthContext)()),
236
+ tslib_1.__param(8, (0, graphql_1.Args)('sort', { nullable: true, type: () => [approval_instance_sort_input_1.ApprovalInstanceSortInput] })),
237
+ tslib_1.__param(9, (0, bpm_auth_1.BPMCurrentAuthContext)()),
196
238
  tslib_1.__metadata("design:type", Function),
197
- tslib_1.__metadata("design:paramtypes", [Object, Object, Object, Object, Object, Object, Object, Object, Object]),
239
+ tslib_1.__metadata("design:paramtypes", [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object]),
198
240
  tslib_1.__metadata("design:returntype", Promise)
199
241
  ], WorkflowEngineQueries.prototype, "approvalInstancePageInfo", null);
200
242
  tslib_1.__decorate([
@@ -234,18 +276,88 @@ tslib_1.__decorate([
234
276
  (0, graphql_1.Query)(() => [task_entity_1.TaskEntity]),
235
277
  tslib_1.__param(0, (0, graphql_1.Args)('assigneeMemberId', { type: () => String })),
236
278
  tslib_1.__param(1, (0, bpm_auth_1.BPMCurrentMemberId)()),
279
+ tslib_1.__param(2, (0, graphql_1.Args)('page', { nullable: true, type: () => graphql_1.Int })),
280
+ tslib_1.__param(3, (0, graphql_1.Args)('pageSize', { nullable: true, type: () => graphql_1.Int })),
281
+ tslib_1.__param(4, (0, graphql_1.Args)('templateIds', {
282
+ description: 'Only tasks of instances started from these templates. An empty list matches nothing.',
283
+ nullable: true,
284
+ type: () => [String],
285
+ })),
286
+ tslib_1.__param(5, (0, graphql_1.Args)('templateKey', {
287
+ description: 'Only tasks of instances whose template carries this key. Combined with templateIds, both must match.',
288
+ nullable: true,
289
+ type: () => String,
290
+ })),
237
291
  tslib_1.__metadata("design:type", Function),
238
- tslib_1.__metadata("design:paramtypes", [String, String]),
292
+ tslib_1.__metadata("design:paramtypes", [String, String, Object, Object, Object, Object]),
239
293
  tslib_1.__metadata("design:returntype", Promise)
240
294
  ], WorkflowEngineQueries.prototype, "inboxTasks", null);
295
+ tslib_1.__decorate([
296
+ (0, graphql_1.Query)(() => graphql_1.Int, {
297
+ description: 'How many open tasks inboxTasks pages through.',
298
+ }),
299
+ tslib_1.__param(0, (0, bpm_auth_1.BPMCurrentMemberId)()),
300
+ tslib_1.__param(1, (0, graphql_1.Args)('templateIds', {
301
+ description: 'Only tasks of instances started from these templates. An empty list matches nothing.',
302
+ nullable: true,
303
+ type: () => [String],
304
+ })),
305
+ tslib_1.__param(2, (0, graphql_1.Args)('templateKey', {
306
+ description: 'Only tasks of instances whose template carries this key. Combined with templateIds, both must match.',
307
+ nullable: true,
308
+ type: () => String,
309
+ })),
310
+ tslib_1.__metadata("design:type", Function),
311
+ tslib_1.__metadata("design:paramtypes", [String, Object, Object]),
312
+ tslib_1.__metadata("design:returntype", Promise)
313
+ ], WorkflowEngineQueries.prototype, "inboxTaskCount", null);
241
314
  tslib_1.__decorate([
242
315
  (0, graphql_1.Query)(() => [task_entity_1.TaskEntity]),
243
316
  tslib_1.__param(0, (0, graphql_1.Args)('assigneeMemberId', { type: () => String })),
244
317
  tslib_1.__param(1, (0, bpm_auth_1.BPMCurrentMemberId)()),
318
+ tslib_1.__param(2, (0, graphql_1.Args)('page', { nullable: true, type: () => graphql_1.Int })),
319
+ tslib_1.__param(3, (0, graphql_1.Args)('pageSize', { nullable: true, type: () => graphql_1.Int })),
320
+ tslib_1.__param(4, (0, graphql_1.Args)('instanceState', {
321
+ nullable: true,
322
+ type: () => workflow_engine_enums_1.ApprovalInstanceStateEnum,
323
+ })),
324
+ tslib_1.__param(5, (0, graphql_1.Args)('templateIds', {
325
+ description: 'Only tasks of instances started from these templates. An empty list matches nothing.',
326
+ nullable: true,
327
+ type: () => [String],
328
+ })),
329
+ tslib_1.__param(6, (0, graphql_1.Args)('templateKey', {
330
+ description: 'Only tasks of instances whose template carries this key. Combined with templateIds, both must match.',
331
+ nullable: true,
332
+ type: () => String,
333
+ })),
245
334
  tslib_1.__metadata("design:type", Function),
246
- tslib_1.__metadata("design:paramtypes", [String, String]),
335
+ tslib_1.__metadata("design:paramtypes", [String, String, Object, Object, Object, Object, Object]),
247
336
  tslib_1.__metadata("design:returntype", Promise)
248
337
  ], WorkflowEngineQueries.prototype, "approvalHistoryTasks", null);
338
+ tslib_1.__decorate([
339
+ (0, graphql_1.Query)(() => graphql_1.Int, {
340
+ description: 'How many tasks approvalHistoryTasks pages through, for the same instanceState.',
341
+ }),
342
+ tslib_1.__param(0, (0, bpm_auth_1.BPMCurrentMemberId)()),
343
+ tslib_1.__param(1, (0, graphql_1.Args)('instanceState', {
344
+ nullable: true,
345
+ type: () => workflow_engine_enums_1.ApprovalInstanceStateEnum,
346
+ })),
347
+ tslib_1.__param(2, (0, graphql_1.Args)('templateIds', {
348
+ description: 'Only tasks of instances started from these templates. An empty list matches nothing.',
349
+ nullable: true,
350
+ type: () => [String],
351
+ })),
352
+ tslib_1.__param(3, (0, graphql_1.Args)('templateKey', {
353
+ description: 'Only tasks of instances whose template carries this key. Combined with templateIds, both must match.',
354
+ nullable: true,
355
+ type: () => String,
356
+ })),
357
+ tslib_1.__metadata("design:type", Function),
358
+ tslib_1.__metadata("design:paramtypes", [String, Object, Object, Object]),
359
+ tslib_1.__metadata("design:returntype", Promise)
360
+ ], WorkflowEngineQueries.prototype, "approvalHistoryTaskCount", null);
249
361
  tslib_1.__decorate([
250
362
  (0, graphql_1.Query)(() => [task_reassignment_object_1.MemberOpenTaskObject], {
251
363
  description: 'Administrator: the open tasks a member holds (assignee, or a PENDING, ' +
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-engine.queries.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/workflow-engine/workflow-engine.queries.ts"],"names":[],"mappings":";;;;AAAA,uCAAyC;AACzC,8GAAsG;AAEtG,6CAAiE;AACjE,0CAMqB;AACrB,mEAA+D;AAC/D,yEAGoC;AAKpC,+DAA0D;AAC1D,qEAAgE;AAChE,yEAAoE;AACpE,6FAAsF;AACtF,qGAA8F;AAC9F,qFAA+E;AAC/E,mFAG2C;AAC3C,mFAA8E;AAC9E,mEAA8D;AAC9D,iEAA4D;AAC5D,+CAA2C;AAC3C,2FAAqF;AACrF,mEAGiC;AACjC,uEAAkE;AAClE,mEAA8D;AAIvD,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,YACmB,qBAA4C,EAC5C,SAAoB;QADpB,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,cAAS,GAAT,SAAS,CAAW;IACpC,CAAC;IAGE,AAAN,KAAK,CAAC,iBAAiB,CAK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qB,GAAE,CAAA;;;;2DAMzB;AAGK;IADL,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,6CAAoB,CAAC,CAAC;IAEjC,mBAAA,IAAA,cAAI,EAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAA;IAC1C,mBAAA,IAAA,gCAAqB,GAAE,CAAA;;;;4DAMzB;AAGK;IADL,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,uCAAiB,CAAC,CAAC;IAE9B,mBAAA,IAAA,cAAI,EAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAA;IAC1C,mBAAA,IAAA,gCAAqB,GAAE,CAAA;;;;yDAMzB;gCAtRU,qBAAqB;IAFjC,IAAA,kBAAQ,GAAE;IACV,IAAA,2BAAgB,GAAE;6CAGyB,+CAAqB;QACjC,gBAAS;GAH5B,qBAAqB,CA2SjC"}
1
+ {"version":3,"file":"workflow-engine.queries.js","sourceRoot":"","sources":["../../../../../../libs/bpm-core/src/lib/workflow-engine/workflow-engine.queries.ts"],"names":[],"mappings":";;;;AAAA,uCAAyC;AACzC,8GAAsG;AAEtG,6CAAiE;AACjE,0CAMqB;AACrB,mEAA+D;AAC/D,yEAGoC;AAKpC,+DAA0D;AAC1D,qEAAgE;AAChE,yEAAoE;AACpE,6FAAsF;AACtF,qGAA8F;AAC9F,qFAA+E;AAC/E,mFAG2C;AAC3C,mFAA8E;AAC9E,mEAA8D;AAC9D,iEAA4D;AAC5D,+CAA2C;AAC3C,2FAAqF;AACrF,mEAGiC;AACjC,uEAAkE;AAClE,mEAA8D;AAIvD,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,YACmB,qBAA4C,EAC5C,SAAoB;QADpB,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,cAAS,GAAT,SAAS,CAAW;IACpC,CAAC;IAGE,AAAN,KAAK,CAAC,iBAA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AC,CAAA;IACtC,mBAAA,IAAA,gCAAqB,GAAE,CAAA;;;;0DAMzB;AAGK;IADL,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,2CAAmB,CAAC,CAAC;IAEhC,mBAAA,IAAA,cAAI,EAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAA;IACtC,mBAAA,IAAA,gCAAqB,GAAE,CAAA;;;;2DAMzB;AAGK;IADL,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,6CAAoB,CAAC,CAAC;IAEjC,mBAAA,IAAA,cAAI,EAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAA;IAC1C,mBAAA,IAAA,gCAAqB,GAAE,CAAA;;;;4DAMzB;AAGK;IADL,IAAA,eAAK,EAAC,GAAG,EAAE,CAAC,CAAC,uCAAiB,CAAC,CAAC;IAE9B,mBAAA,IAAA,cAAI,EAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,CAAA;IAC1C,mBAAA,IAAA,gCAAqB,GAAE,CAAA;;;;yDAMzB;gCAnaU,qBAAqB;IAFjC,IAAA,kBAAQ,GAAE;IACV,IAAA,2BAAgB,GAAE;6CAGyB,+CAAqB;QACjC,gBAAS;GAH5B,qBAAqB,CAwbjC"}
@@ -1,4 +1,4 @@
1
- import { MemberMetadata, type ApprovalInstanceFieldFilter, type ApprovalInstanceSort } from '@rytass/bpm-core-shared';
1
+ import { MemberMetadata, type FieldAccessFillUnit, type ApprovalInstanceFieldFilter, type ApprovalInstanceSort } from '@rytass/bpm-core-shared';
2
2
  import { WorkflowWebhookDeliveryService } from '../workflow-webhook/workflow-webhook-delivery.service';
3
3
  import { Repository } from 'typeorm';
4
4
  import { AttachmentService } from '../attachment/attachment.service';
@@ -30,6 +30,8 @@ import { TaskEntity } from './task.entity';
30
30
  import { ApprovalInstanceListViewEnum, ApprovalInstanceStateEnum, MemberTaskRoleEnum, TaskCandidateStatusEnum, TaskReassignmentErrorCodeEnum, TaskReassignmentOutcomeEnum } from './workflow-engine.enums';
31
31
  import { WorkflowDryRunResultObject } from './workflow-dry-run.object';
32
32
  import { BPMInitiatorCustomFieldsResolver } from './initiator-custom-fields-resolver.token';
33
+ import { InstanceEventWriter } from '../instance-event/instance-event.writer';
34
+ import { BPMInstanceGuard } from './instance-guard.token';
33
35
  import { BPMWorkflowServiceTaskDispatcher } from './workflow-service-task-dispatcher.token';
34
36
  import { WorkflowTokenEntity } from './workflow-token.entity';
35
37
  import { BPMRootRuntimeOptions } from '../bpm/bpm-root-options';
@@ -59,6 +61,15 @@ type SubmitApprovalInstanceCommand = SubmitApprovalInstanceInput & {
59
61
  * unset and may prefill them.
60
62
  */
61
63
  readonly endUserSubmission?: boolean;
64
+ /**
65
+ * Service layer only (ADR 27 §5): fields a host adds to the initiator's
66
+ * `customFields`. The engine still builds the default snapshot and calls the
67
+ * `customFields` resolver; these values are merged over what it returned, so
68
+ * a key given here wins. Cannot be combined with
69
+ * `initiatorMetadataSnapshotJson` (400). The GraphQL mutation always passes
70
+ * `null`.
71
+ */
72
+ readonly initiatorCustomFields?: Readonly<Record<string, unknown>> | null;
62
73
  };
63
74
  type ResubmitApprovalInstanceCommand = ResubmitApprovalInstanceInput & {
64
75
  readonly initiatorMemberId: string;
@@ -107,6 +118,32 @@ export interface MemberOpenTaskRecord {
107
118
  readonly templateId: string;
108
119
  readonly templateName: string | null;
109
120
  }
121
+ /** Paging of a member's task list; both absent means unpaged. */
122
+ export interface TaskListPageOptions {
123
+ /** 1-based; defaults to 1 once paging is asked for. */
124
+ readonly page?: number;
125
+ /** Defaults to 20, at most 100, once paging is asked for. */
126
+ readonly pageSize?: number;
127
+ }
128
+ /**
129
+ * Narrows a member's task list to the tasks of some templates. Absent fields
130
+ * do not filter. An empty `templateIds` matches nothing, as `IN ()` would.
131
+ * When both fields are given a task must satisfy both.
132
+ */
133
+ export interface TaskTemplateFilter {
134
+ /** Only tasks whose instance was started from one of these templates. */
135
+ readonly templateIds?: readonly string[];
136
+ /** Only tasks whose instance's template carries this key (ADR 27 §6). */
137
+ readonly templateKey?: string;
138
+ }
139
+ /** Options of {@link WorkflowEngineService.listInboxTasks}. */
140
+ export interface InboxTaskListOptions extends TaskListPageOptions, TaskTemplateFilter {
141
+ }
142
+ /** Options of {@link WorkflowEngineService.listApprovalHistoryTasks}. */
143
+ export interface ApprovalHistoryTaskListOptions extends TaskListPageOptions, TaskTemplateFilter {
144
+ /** Only tasks of instances in this state. */
145
+ readonly instanceState?: ApprovalInstanceStateEnum;
146
+ }
110
147
  /** A deactivated member who still holds open tasks, for the reassignment screen. */
111
148
  export interface InactiveMemberOpenTasksRecord {
112
149
  readonly email: string;
@@ -140,6 +177,13 @@ export interface DecideTaskOptions {
140
177
  * transfer. Defaults to {@link MANUAL_TRANSFER_DELEGATION_REASON}.
141
178
  */
142
179
  readonly transferReason?: string;
180
+ /**
181
+ * The approver's own auth context, passed by the GraphQL mutation. Data
182
+ * source providers receive it when an approver-filled dynamic field is
183
+ * resolved. Absent for engine-made decisions (SLA auto-approve), which then
184
+ * act as the decider's member id only.
185
+ */
186
+ readonly approverAuthContext?: BPMAuthContext;
143
187
  }
144
188
  export interface ListApprovalInstancesOptions {
145
189
  /** ADR 25 §7: conditions on form fields. Needs `templateId` when not empty. */
@@ -151,6 +195,11 @@ export interface ListApprovalInstancesOptions {
151
195
  readonly sort?: readonly ApprovalInstanceSort[];
152
196
  readonly state?: readonly ApprovalInstanceStateEnum[];
153
197
  readonly templateId?: string;
198
+ /**
199
+ * ADR 27 §6: the template's `key`. Resolved to its id; with `templateId`
200
+ * as well, both must name the same template. An unknown key matches nothing.
201
+ */
202
+ readonly templateKey?: string;
154
203
  readonly view?: ApprovalInstanceListViewEnum;
155
204
  }
156
205
  interface WorkflowDashboardSummaryOptions {
@@ -178,12 +227,38 @@ export declare class WorkflowEngineService {
178
227
  private readonly slaScheduleService;
179
228
  private readonly formDataSourceValueResolver?;
180
229
  private readonly webhookDeliveryService?;
230
+ private readonly instanceEventWriter?;
181
231
  private readonly logger;
232
+ /** In-flight inbox reads by member; see `readSharedOpenInboxTasks`. */
233
+ private readonly openInboxReadsInFlight;
182
234
  private readonly approvalInstanceFieldFilterCompiler;
183
235
  private readonly approvalInstanceFilterableFieldPolicy;
184
- constructor(approvalInstanceRepository: Repository<ApprovalInstanceEntity>, workflowTokenRepository: Repository<WorkflowTokenEntity>, taskRepository: Repository<TaskEntity>, taskCandidateRepository: Repository<TaskCandidateEntity>, taskDecisionRepository: Repository<TaskDecisionEntity>, notificationRepository: Repository<NotificationEntity>, activityLogRepository: Repository<ActivityLogEntity>, adhocDirectiveRepository: Repository<AdhocDirectiveEntity>, approvalTemplateRepository: Repository<ApprovalTemplateEntity>, approvalTemplateVersionRepository: Repository<ApprovalTemplateVersionEntity>, formDefinitionVersionRepository: Repository<FormDefinitionVersionEntity>, attachmentService: AttachmentService, conditionService: ConditionService, delegationService: DelegationService, notificationService: NotificationService, signatureService: SignatureService, slaScheduleService: BPMSlaScheduleService, injectedServiceTaskDispatcher?: BPMWorkflowServiceTaskDispatcher, formDataSourceValueResolver?: BPMFormDataSourceValueResolver | undefined, rootOptions?: BPMRootRuntimeOptions, webhookDeliveryService?: WorkflowWebhookDeliveryService | undefined, injectedInitiatorCustomFieldsResolver?: BPMInitiatorCustomFieldsResolver);
236
+ constructor(approvalInstanceRepository: Repository<ApprovalInstanceEntity>, workflowTokenRepository: Repository<WorkflowTokenEntity>, taskRepository: Repository<TaskEntity>, taskCandidateRepository: Repository<TaskCandidateEntity>, taskDecisionRepository: Repository<TaskDecisionEntity>, notificationRepository: Repository<NotificationEntity>, activityLogRepository: Repository<ActivityLogEntity>, adhocDirectiveRepository: Repository<AdhocDirectiveEntity>, approvalTemplateRepository: Repository<ApprovalTemplateEntity>, approvalTemplateVersionRepository: Repository<ApprovalTemplateVersionEntity>, formDefinitionVersionRepository: Repository<FormDefinitionVersionEntity>, attachmentService: AttachmentService, conditionService: ConditionService, delegationService: DelegationService, notificationService: NotificationService, signatureService: SignatureService, slaScheduleService: BPMSlaScheduleService, injectedServiceTaskDispatcher?: BPMWorkflowServiceTaskDispatcher, formDataSourceValueResolver?: BPMFormDataSourceValueResolver | undefined, rootOptions?: BPMRootRuntimeOptions, webhookDeliveryService?: WorkflowWebhookDeliveryService | undefined, injectedInitiatorCustomFieldsResolver?: BPMInitiatorCustomFieldsResolver, injectedInstanceGuard?: BPMInstanceGuard, instanceEventWriter?: InstanceEventWriter | undefined);
237
+ /** ADR 27 §3; see `BPMRootRuntimeOptions.expressionMissingFormFieldsAsNull`. */
238
+ private readonly expressionMissingFormFieldsAsNull;
185
239
  private readonly serviceTaskDispatcher;
186
240
  private readonly initiatorCustomFieldsResolver;
241
+ /** ADR 27 §2; `null` means no guard is bound and no guard code runs. */
242
+ private readonly instanceGuard;
243
+ private readonly instanceGuardTimeoutMs;
244
+ /**
245
+ * Runs the bound guard for one engine path inside its transaction. A no-op
246
+ * when no guard is bound, so a host without one sees no behavior change.
247
+ */
248
+ private guardInstanceChange;
249
+ /**
250
+ * Writes one case-lifecycle event (ADR 27 §1) in the caller's transaction.
251
+ * Returns before any lookup when no observer is bound, so a host without
252
+ * one pays nothing. `instanceState` is the state the change commits, not the
253
+ * state the instance held before it.
254
+ */
255
+ private recordInstanceEvent;
256
+ /**
257
+ * Reads the template version a case runs on, inside the engine transaction,
258
+ * so the guard sees the same snapshot as the decision. A missing row fails
259
+ * the change rather than handing the guard a partial input.
260
+ */
261
+ private readBoundTemplateVersionOrThrow;
187
262
  /** Webhooks each open engine transaction will send once it has committed. */
188
263
  private readonly deferredWebhookDispatches;
189
264
  private readonly organizationTimeZone;
@@ -225,8 +300,42 @@ export declare class WorkflowEngineService {
225
300
  */
226
301
  findApprovalInstanceByBusinessKey(templateId: string, businessKey: string): Promise<ApprovalInstanceEntity | null>;
227
302
  private resolveFormDataOptionSnapshots;
303
+ /**
304
+ * ADR 27 §4(b): asks the data-source providers again, under the decision
305
+ * lock and as the approver, for the options of the approver-fillable fields.
306
+ * A value that is no longer among the options is refused by the resolver
307
+ * (`VALUE_NOT_RESOLVED`). Returns snapshots for the scoped fields only; the
308
+ * caller swaps them in for the stored ones.
309
+ */
310
+ private refreshApproverFilledOptionSnapshots;
311
+ /**
312
+ * ADR 27 §4(b): asks the data-source providers again, as the approver, for
313
+ * the open data-source cells of column-mode tables. `revalidateAll` false lets
314
+ * the resolver reuse the stored options of cells whose value and bindings did
315
+ * not move. Returns snapshots for the cells of `cellSchema` only.
316
+ */
317
+ private refreshApproverFilledOpenCellSnapshots;
318
+ /**
319
+ * Refuses an end user's resubmission of an instance bound to a `HOST_ONLY`
320
+ * version (ADR 27 §5). Checked before any data source is called and outside
321
+ * the lock: an instance never changes version and a published version never
322
+ * changes `launchMode`, so the answer cannot go stale. An instance that does
323
+ * not exist is left to the locked read, which reports it.
324
+ */
325
+ private assertEndUserMayResubmit;
228
326
  private prepareResubmitFormDataOptions;
229
327
  processInstance(instanceId: string): Promise<void>;
328
+ /**
329
+ * Records `TASK_AUTO_DECISION_FAILED` (ADR 27 §3) in its own transaction.
330
+ * Used after an automatic decision was refused by the instance guard: the
331
+ * decision's transaction has already rolled back, so the event cannot ride
332
+ * on it. Returns before any query when no observer is bound.
333
+ */
334
+ recordTaskAutoDecisionFailed(input: {
335
+ readonly instanceId: string;
336
+ readonly taskId: string;
337
+ readonly reason: string;
338
+ }): Promise<void>;
230
339
  decideTask(input: DecideTaskInput, options?: DecideTaskOptions): Promise<TaskDecisionEntity>;
231
340
  cancelApprovalInstance(input: CancelApprovalInstanceInput): Promise<ApprovalInstanceEntity>;
232
341
  /**
@@ -318,6 +427,16 @@ export declare class WorkflowEngineService {
318
427
  */
319
428
  private readDryRunMemberIds;
320
429
  getApprovalInstance(id: string, scope?: WorkflowReadScope): Promise<ApprovalInstanceEntity>;
430
+ /**
431
+ * ADR 27 §4.2 (gap 1): the fill units an approver may use to resolve runtime
432
+ * data-source options on a RUNNING instance. Only tasks the member can act on
433
+ * count: the member is the assignee or a PENDING/CLAIMED candidate of a
434
+ * PENDING or IN_PROGRESS, non-ad-hoc task. A task whose candidate row is
435
+ * WAITING or already decided grants nothing, even though its status is open.
436
+ * A field counts only when its node lists it as SHOW; a HIDE entry never
437
+ * grants, whatever its fill is. Returns `[]` when the instance is not RUNNING.
438
+ */
439
+ listApproverFillUnits(instanceId: string, memberId: string): Promise<readonly FieldAccessFillUnit[]>;
321
440
  /**
322
441
  * ADR 25 §6: a value written to a filterable field must fit its type, on
323
442
  * every path that writes form data. The fields checked are the ones the
@@ -370,9 +489,71 @@ export declare class WorkflowEngineService {
370
489
  * one gets a bare context for the member, as a submission does.
371
490
  */
372
491
  listLaunchableApprovalTemplates(memberId: string, authContext?: BPMAuthContext): Promise<readonly ApprovalTemplateEntity[]>;
492
+ /**
493
+ * The published version whose form `memberId` may read data-source options
494
+ * for when starting `templateId`, or `null` when they may not.
495
+ *
496
+ * It applies the same checks as {@link listLaunchableApprovalTemplates} to
497
+ * that one template, but asks the host's initiator `customFields` resolver
498
+ * with `purpose: 'FORM_OPTIONS'` and the template and version ids. A host can
499
+ * therefore open a template's options to members who may not submit it
500
+ * themselves — a template only the host's backend submits — without the
501
+ * template appearing in their launchable list. The snapshot is used for this
502
+ * judgement only and is never stored. A resolver failure judges against
503
+ * `customFields: {}`, as the list does, so a policy that reads
504
+ * `initiator.customFields` then fails closed.
505
+ */
506
+ readFormOptionsTemplateVersion(templateId: string, memberId: string, authContext?: BPMAuthContext): Promise<ApprovalTemplateVersionEntity | null>;
507
+ /**
508
+ * Whether `template`'s current published version lets the member described
509
+ * by `initiatorMetadataSnapshot` start it: the launchable list and the form
510
+ * options check share this, so the two cannot drift apart. `scope` only
511
+ * names the caller in the log.
512
+ */
513
+ private isInitiatorPolicyMet;
373
514
  listWorkflowTokens(instanceId: string, scope?: WorkflowReadScope): Promise<readonly WorkflowTokenEntity[]>;
374
515
  listTasks(instanceId: string, scope?: WorkflowReadScope): Promise<readonly TaskEntity[]>;
375
- listInboxTasks(assigneeMemberId: string): Promise<readonly TaskEntity[]>;
516
+ /**
517
+ * The member's open tasks, newest first. Without `page` / `pageSize` every
518
+ * one is returned, as before paging existed. The page is cut from the same
519
+ * {@link readOpenInboxTasks} result the dashboard counters read, so the list,
520
+ * {@link countInboxTasks} and the counters cannot disagree; only the page is
521
+ * given its candidate summaries.
522
+ */
523
+ listInboxTasks(assigneeMemberId: string, options?: InboxTaskListOptions): Promise<readonly TaskEntity[]>;
524
+ /** How many tasks {@link listInboxTasks} pages through. */
525
+ countInboxTasks(assigneeMemberId: string, filter?: TaskTemplateFilter): Promise<number>;
526
+ /**
527
+ * The template ids a {@link TaskTemplateFilter} allows, or `null` when it
528
+ * does not filter. A `templateKey` that names no template allows nothing.
529
+ */
530
+ private readTaskTemplateFilterIds;
531
+ /**
532
+ * Turns `templateKey` into `templateId` (ADR 27 §6), or `null` when the
533
+ * options can match nothing: an unknown key, or a key naming another
534
+ * template than `templateId` does.
535
+ */
536
+ private resolveApprovalInstanceTemplateKey;
537
+ /**
538
+ * The id of the live template carrying `key`, as a list so a key that names
539
+ * nothing filters everything out. At most one live template holds a key.
540
+ */
541
+ private readTemplateIdsByKey;
542
+ /**
543
+ * Keeps the tasks whose instance belongs to the filter's templates. The open
544
+ * task read is shared with the dashboard counters, so the filter is applied
545
+ * to its result rather than pushed into it.
546
+ */
547
+ private filterTasksByTemplate;
548
+ /**
549
+ * {@link readOpenInboxTasks} for the inbox list and its count, joining a
550
+ * read for the same member that is still in flight. The client asks for
551
+ * `inboxTasks` and `inboxTaskCount` in one request and GraphQL resolves the
552
+ * two side by side, so this turns two identical reads into one. An entry
553
+ * lives only until its read settles: nothing is cached across requests, and
554
+ * a read that started earlier is never served once it has finished.
555
+ */
556
+ private readSharedOpenInboxTasks;
376
557
  /**
377
558
  * The open tasks that are this member's own to act on — the single
378
559
  * definition behind both the inbox list and the dashboard counters, so the
@@ -382,7 +563,27 @@ export declare class WorkflowEngineService {
382
563
  * that has not reached them is not theirs yet.
383
564
  */
384
565
  private readOpenInboxTasks;
385
- listApprovalHistoryTasks(assigneeMemberId: string): Promise<readonly TaskEntity[]>;
566
+ /**
567
+ * The tasks this member has acted on, most recently acted on first: tasks
568
+ * assigned to them that are COMPLETED, and tasks on which their own
569
+ * candidate row is COMPLETED. The latter needs no status on the task: a
570
+ * countersign still waiting on somebody else already carries their vote, and
571
+ * the inbox has stopped showing it to them.
572
+ *
573
+ * "Acted on" is their candidate row's `decided_at`, else the task's
574
+ * `completed_at`, else its `created_at`; ties fall back to the task id so no
575
+ * row moves between pages. Paged in SQL. Without `page` / `pageSize` the
576
+ * latest {@link DEFAULT_APPROVAL_HISTORY_TASK_LIMIT} are returned, as before
577
+ * paging existed. `instanceState` keeps only tasks of instances in that
578
+ * state (RUNNING for "acted on, not finished").
579
+ */
580
+ listApprovalHistoryTasks(assigneeMemberId: string, options?: ApprovalHistoryTaskListOptions): Promise<readonly TaskEntity[]>;
581
+ /** How many tasks {@link listApprovalHistoryTasks} pages through. */
582
+ countApprovalHistoryTasks(assigneeMemberId: string, options?: Omit<ApprovalHistoryTaskListOptions, 'page' | 'pageSize'>): Promise<number>;
583
+ /** The rows of {@link listApprovalHistoryTasks}, unordered and unpaged. */
584
+ private createApprovalHistoryTaskQuery;
585
+ /** When the member acted on a history task; see {@link listApprovalHistoryTasks}. */
586
+ private readApprovalHistoryActedAtExpression;
386
587
  listTaskDecisions(taskId: string, scope?: WorkflowReadScope): Promise<readonly TaskDecisionEntity[]>;
387
588
  listTaskCandidates(taskId: string, scope?: WorkflowReadScope): Promise<readonly TaskCandidateEntity[]>;
388
589
  private attachTaskCandidateSummaries;
@@ -397,7 +598,7 @@ export declare class WorkflowEngineService {
397
598
  * snapshot without a `nodes` array, and a blank or non-string label all
398
599
  * leave the task without a label, as `readWorkflowNodeLabel` does. Only the
399
600
  * node's `fieldAccess` leaves the database for the fill flag, which
400
- * `readNodeFillableFieldKeys` then reads as tolerantly as the engine does.
601
+ * `readNodeFillGrantFieldKeys` then reads as tolerantly as the engine does.
401
602
  */
402
603
  private readTaskNodeSummaries;
403
604
  private readDefaultInitiatorMetadataSnapshot;
@@ -424,8 +625,9 @@ export declare class WorkflowEngineService {
424
625
  * case on data the host never gave. It runs before the engine
425
626
  * transaction, so a failure leaves nothing behind and a slow lookup holds
426
627
  * no lock.
427
- * - The list carries on with `customFields: {}` and logs a warning: one
428
- * failing lookup must not take the whole list away. That fails closed: a
628
+ * - The list, and the form options check, carry on with `customFields: {}`
629
+ * and log a warning: one failing lookup must not take the whole list
630
+ * away. That fails closed: a
429
631
  * policy that reads `initiator.customFields` then throws on the missing key
430
632
  * and the list's per-template catch leaves that template out, while a
431
633
  * template whose policy does not read it is listed as usual. Submitting is
@@ -633,6 +835,13 @@ export declare class WorkflowEngineService {
633
835
  */
634
836
  private readApprovalPrincipalMemberIds;
635
837
  private resolveInitiatorManagerReplacements;
838
+ /**
839
+ * The context workflow expressions on `instance` read. Its `form` is the
840
+ * stored data, or with `expressionMissingFormFieldsAsNull` on, a copy with
841
+ * every unfilled top-level field present (ADR 27 §3).
842
+ */
843
+ private buildExpressionContext;
844
+ private readExpressionFormData;
636
845
  private buildDelegationContext;
637
846
  private delegateResolvedCandidates;
638
847
  /** One member's delegation, grade-gated as {@link applyGradeGate} says. */