@contractspec/example.workflow-system 1.44.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/LICENSE +21 -0
- package/README.md +124 -0
- package/dist/approval/approval.enum.d.ts +14 -0
- package/dist/approval/approval.enum.d.ts.map +1 -0
- package/dist/approval/approval.enum.js +29 -0
- package/dist/approval/approval.enum.js.map +1 -0
- package/dist/approval/approval.event.d.ts +131 -0
- package/dist/approval/approval.event.d.ts.map +1 -0
- package/dist/approval/approval.event.js +220 -0
- package/dist/approval/approval.event.js.map +1 -0
- package/dist/approval/approval.handler.d.ts +23 -0
- package/dist/approval/approval.handler.d.ts.map +1 -0
- package/dist/approval/approval.handler.js +72 -0
- package/dist/approval/approval.handler.js.map +1 -0
- package/dist/approval/approval.operations.d.ts +535 -0
- package/dist/approval/approval.operations.d.ts.map +1 -0
- package/dist/approval/approval.operations.js +345 -0
- package/dist/approval/approval.operations.js.map +1 -0
- package/dist/approval/approval.schema.d.ts +100 -0
- package/dist/approval/approval.schema.d.ts.map +1 -0
- package/dist/approval/approval.schema.js +110 -0
- package/dist/approval/approval.schema.js.map +1 -0
- package/dist/approval/index.d.ts +5 -0
- package/dist/approval/index.js +6 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -0
- package/dist/docs/workflow-system.docblock.d.ts +1 -0
- package/dist/docs/workflow-system.docblock.js +115 -0
- package/dist/docs/workflow-system.docblock.js.map +1 -0
- package/dist/entities/approval.d.ts +58 -0
- package/dist/entities/approval.d.ts.map +1 -0
- package/dist/entities/approval.js +128 -0
- package/dist/entities/approval.js.map +1 -0
- package/dist/entities/index.d.ts +139 -0
- package/dist/entities/index.d.ts.map +1 -0
- package/dist/entities/index.js +32 -0
- package/dist/entities/index.js.map +1 -0
- package/dist/entities/instance.d.ts +69 -0
- package/dist/entities/instance.d.ts.map +1 -0
- package/dist/entities/instance.js +168 -0
- package/dist/entities/instance.js.map +1 -0
- package/dist/entities/step.d.ts +50 -0
- package/dist/entities/step.d.ts.map +1 -0
- package/dist/entities/step.js +135 -0
- package/dist/entities/step.js.map +1 -0
- package/dist/entities/workflow.d.ts +41 -0
- package/dist/entities/workflow.d.ts.map +1 -0
- package/dist/entities/workflow.js +102 -0
- package/dist/entities/workflow.js.map +1 -0
- package/dist/example.d.ts +40 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +51 -0
- package/dist/example.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +21 -0
- package/dist/instance/index.d.ts +5 -0
- package/dist/instance/index.js +6 -0
- package/dist/instance/instance.enum.d.ts +10 -0
- package/dist/instance/instance.enum.d.ts.map +1 -0
- package/dist/instance/instance.enum.js +20 -0
- package/dist/instance/instance.enum.js.map +1 -0
- package/dist/instance/instance.event.d.ts +356 -0
- package/dist/instance/instance.event.d.ts.map +1 -0
- package/dist/instance/instance.event.js +293 -0
- package/dist/instance/instance.event.js.map +1 -0
- package/dist/instance/instance.handler.d.ts +27 -0
- package/dist/instance/instance.handler.d.ts.map +1 -0
- package/dist/instance/instance.handler.js +94 -0
- package/dist/instance/instance.handler.js.map +1 -0
- package/dist/instance/instance.operations.d.ts +1024 -0
- package/dist/instance/instance.operations.d.ts.map +1 -0
- package/dist/instance/instance.operations.js +464 -0
- package/dist/instance/instance.operations.js.map +1 -0
- package/dist/instance/instance.schema.d.ts +223 -0
- package/dist/instance/instance.schema.d.ts.map +1 -0
- package/dist/instance/instance.schema.js +172 -0
- package/dist/instance/instance.schema.js.map +1 -0
- package/dist/presentations/index.d.ts +64 -0
- package/dist/presentations/index.d.ts.map +1 -0
- package/dist/presentations/index.js +337 -0
- package/dist/presentations/index.js.map +1 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.js +3 -0
- package/dist/shared/mock-data.d.ts +19 -0
- package/dist/shared/mock-data.d.ts.map +1 -0
- package/dist/shared/mock-data.js +12 -0
- package/dist/shared/mock-data.js.map +1 -0
- package/dist/shared/types.d.ts +81 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.js +0 -0
- package/dist/state-machine/index.d.ts +148 -0
- package/dist/state-machine/index.d.ts.map +1 -0
- package/dist/state-machine/index.js +158 -0
- package/dist/state-machine/index.js.map +1 -0
- package/dist/workflow/index.d.ts +5 -0
- package/dist/workflow/index.js +6 -0
- package/dist/workflow/workflow.enum.d.ts +22 -0
- package/dist/workflow/workflow.enum.d.ts.map +1 -0
- package/dist/workflow/workflow.enum.js +47 -0
- package/dist/workflow/workflow.enum.js.map +1 -0
- package/dist/workflow/workflow.event.d.ts +135 -0
- package/dist/workflow/workflow.event.d.ts.map +1 -0
- package/dist/workflow/workflow.event.js +150 -0
- package/dist/workflow/workflow.event.js.map +1 -0
- package/dist/workflow/workflow.handler.d.ts +29 -0
- package/dist/workflow/workflow.handler.d.ts.map +1 -0
- package/dist/workflow/workflow.handler.js +66 -0
- package/dist/workflow/workflow.handler.js.map +1 -0
- package/dist/workflow/workflow.operations.d.ts +1011 -0
- package/dist/workflow/workflow.operations.d.ts.map +1 -0
- package/dist/workflow/workflow.operations.js +345 -0
- package/dist/workflow/workflow.operations.js.map +1 -0
- package/dist/workflow/workflow.schema.d.ts +265 -0
- package/dist/workflow/workflow.schema.d.ts.map +1 -0
- package/dist/workflow/workflow.schema.js +249 -0
- package/dist/workflow/workflow.schema.js.map +1 -0
- package/dist/workflow-system.feature.d.ts +12 -0
- package/dist/workflow-system.feature.d.ts.map +1 -0
- package/dist/workflow-system.feature.js +339 -0
- package/dist/workflow-system.feature.js.map +1 -0
- package/package.json +124 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
2
|
+
import { defineEvent, defineSchemaModel as defineSchemaModel$1 } from "@contractspec/lib.contracts";
|
|
3
|
+
|
|
4
|
+
//#region src/instance/instance.event.ts
|
|
5
|
+
/**
|
|
6
|
+
* Base payload for instance events.
|
|
7
|
+
*/
|
|
8
|
+
const InstanceEventPayload = defineSchemaModel$1({
|
|
9
|
+
name: "InstanceEventPayload",
|
|
10
|
+
description: "Base payload for instance events",
|
|
11
|
+
fields: {
|
|
12
|
+
instanceId: {
|
|
13
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
14
|
+
isOptional: false
|
|
15
|
+
},
|
|
16
|
+
workflowId: {
|
|
17
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
18
|
+
isOptional: false
|
|
19
|
+
},
|
|
20
|
+
workflowKey: {
|
|
21
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
22
|
+
isOptional: false
|
|
23
|
+
},
|
|
24
|
+
status: {
|
|
25
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
26
|
+
isOptional: false
|
|
27
|
+
},
|
|
28
|
+
referenceId: {
|
|
29
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
30
|
+
isOptional: true
|
|
31
|
+
},
|
|
32
|
+
referenceType: {
|
|
33
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
34
|
+
isOptional: true
|
|
35
|
+
},
|
|
36
|
+
triggeredBy: {
|
|
37
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
38
|
+
isOptional: false
|
|
39
|
+
},
|
|
40
|
+
organizationId: {
|
|
41
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
42
|
+
isOptional: false
|
|
43
|
+
},
|
|
44
|
+
timestamp: {
|
|
45
|
+
type: ScalarTypeEnum.DateTime(),
|
|
46
|
+
isOptional: false
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
/**
|
|
51
|
+
* Payload for step transition events.
|
|
52
|
+
*/
|
|
53
|
+
const StepTransitionPayload = defineSchemaModel$1({
|
|
54
|
+
name: "StepTransitionEventPayload",
|
|
55
|
+
description: "Payload for step transition events",
|
|
56
|
+
fields: {
|
|
57
|
+
instanceId: {
|
|
58
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
59
|
+
isOptional: false
|
|
60
|
+
},
|
|
61
|
+
workflowId: {
|
|
62
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
63
|
+
isOptional: false
|
|
64
|
+
},
|
|
65
|
+
fromStepKey: {
|
|
66
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
67
|
+
isOptional: true
|
|
68
|
+
},
|
|
69
|
+
toStepKey: {
|
|
70
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
71
|
+
isOptional: false
|
|
72
|
+
},
|
|
73
|
+
action: {
|
|
74
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
75
|
+
isOptional: true
|
|
76
|
+
},
|
|
77
|
+
executedBy: {
|
|
78
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
79
|
+
isOptional: false
|
|
80
|
+
},
|
|
81
|
+
timestamp: {
|
|
82
|
+
type: ScalarTypeEnum.DateTime(),
|
|
83
|
+
isOptional: false
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
/**
|
|
88
|
+
* Payload when instance completes.
|
|
89
|
+
*/
|
|
90
|
+
const InstanceCompletedPayload = defineSchemaModel$1({
|
|
91
|
+
name: "InstanceCompletedEventPayload",
|
|
92
|
+
description: "Payload when instance completes",
|
|
93
|
+
fields: {
|
|
94
|
+
instanceId: {
|
|
95
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
96
|
+
isOptional: false
|
|
97
|
+
},
|
|
98
|
+
workflowId: {
|
|
99
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
100
|
+
isOptional: false
|
|
101
|
+
},
|
|
102
|
+
workflowKey: {
|
|
103
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
104
|
+
isOptional: false
|
|
105
|
+
},
|
|
106
|
+
outcome: {
|
|
107
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
108
|
+
isOptional: false
|
|
109
|
+
},
|
|
110
|
+
referenceId: {
|
|
111
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
112
|
+
isOptional: true
|
|
113
|
+
},
|
|
114
|
+
referenceType: {
|
|
115
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
116
|
+
isOptional: true
|
|
117
|
+
},
|
|
118
|
+
duration: {
|
|
119
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
120
|
+
isOptional: false
|
|
121
|
+
},
|
|
122
|
+
timestamp: {
|
|
123
|
+
type: ScalarTypeEnum.DateTime(),
|
|
124
|
+
isOptional: false
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
/**
|
|
129
|
+
* InstanceStartedEvent - A new workflow instance has been started.
|
|
130
|
+
*/
|
|
131
|
+
const InstanceStartedEvent = defineEvent({
|
|
132
|
+
meta: {
|
|
133
|
+
key: "workflow.instance.started",
|
|
134
|
+
version: 1,
|
|
135
|
+
description: "A new workflow instance has been started.",
|
|
136
|
+
stability: "stable",
|
|
137
|
+
owners: ["@workflow-team"],
|
|
138
|
+
tags: [
|
|
139
|
+
"workflow",
|
|
140
|
+
"instance",
|
|
141
|
+
"started"
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
payload: InstanceEventPayload
|
|
145
|
+
});
|
|
146
|
+
/**
|
|
147
|
+
* StepEnteredEvent - A workflow instance has entered a new step.
|
|
148
|
+
*/
|
|
149
|
+
const StepEnteredEvent = defineEvent({
|
|
150
|
+
meta: {
|
|
151
|
+
key: "workflow.step.entered",
|
|
152
|
+
version: 1,
|
|
153
|
+
description: "A workflow instance has entered a new step.",
|
|
154
|
+
stability: "stable",
|
|
155
|
+
owners: ["@workflow-team"],
|
|
156
|
+
tags: [
|
|
157
|
+
"workflow",
|
|
158
|
+
"step",
|
|
159
|
+
"entered"
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
payload: StepTransitionPayload
|
|
163
|
+
});
|
|
164
|
+
/**
|
|
165
|
+
* StepExitedEvent - A workflow instance has exited a step.
|
|
166
|
+
*/
|
|
167
|
+
const StepExitedEvent = defineEvent({
|
|
168
|
+
meta: {
|
|
169
|
+
key: "workflow.step.exited",
|
|
170
|
+
version: 1,
|
|
171
|
+
description: "A workflow instance has exited a step.",
|
|
172
|
+
stability: "stable",
|
|
173
|
+
owners: ["@workflow-team"],
|
|
174
|
+
tags: [
|
|
175
|
+
"workflow",
|
|
176
|
+
"step",
|
|
177
|
+
"exited"
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
payload: StepTransitionPayload
|
|
181
|
+
});
|
|
182
|
+
/**
|
|
183
|
+
* InstanceCompletedEvent - A workflow instance has completed.
|
|
184
|
+
*/
|
|
185
|
+
const InstanceCompletedEvent = defineEvent({
|
|
186
|
+
meta: {
|
|
187
|
+
key: "workflow.instance.completed",
|
|
188
|
+
version: 1,
|
|
189
|
+
description: "A workflow instance has completed.",
|
|
190
|
+
stability: "stable",
|
|
191
|
+
owners: ["@workflow-team"],
|
|
192
|
+
tags: [
|
|
193
|
+
"workflow",
|
|
194
|
+
"instance",
|
|
195
|
+
"completed"
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
payload: InstanceCompletedPayload
|
|
199
|
+
});
|
|
200
|
+
/**
|
|
201
|
+
* InstanceCancelledEvent - A workflow instance has been cancelled.
|
|
202
|
+
*/
|
|
203
|
+
const InstanceCancelledEvent = defineEvent({
|
|
204
|
+
meta: {
|
|
205
|
+
key: "workflow.instance.cancelled",
|
|
206
|
+
version: 1,
|
|
207
|
+
description: "A workflow instance has been cancelled.",
|
|
208
|
+
stability: "stable",
|
|
209
|
+
owners: ["@workflow-team"],
|
|
210
|
+
tags: [
|
|
211
|
+
"workflow",
|
|
212
|
+
"instance",
|
|
213
|
+
"cancelled"
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
payload: InstanceEventPayload
|
|
217
|
+
});
|
|
218
|
+
/**
|
|
219
|
+
* InstancePausedEvent - A workflow instance has been paused.
|
|
220
|
+
*/
|
|
221
|
+
const InstancePausedEvent = defineEvent({
|
|
222
|
+
meta: {
|
|
223
|
+
key: "workflow.instance.paused",
|
|
224
|
+
version: 1,
|
|
225
|
+
description: "A workflow instance has been paused.",
|
|
226
|
+
stability: "stable",
|
|
227
|
+
owners: ["@workflow-team"],
|
|
228
|
+
tags: [
|
|
229
|
+
"workflow",
|
|
230
|
+
"instance",
|
|
231
|
+
"paused"
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
payload: InstanceEventPayload
|
|
235
|
+
});
|
|
236
|
+
/**
|
|
237
|
+
* InstanceResumedEvent - A workflow instance has been resumed.
|
|
238
|
+
*/
|
|
239
|
+
const InstanceResumedEvent = defineEvent({
|
|
240
|
+
meta: {
|
|
241
|
+
key: "workflow.instance.resumed",
|
|
242
|
+
version: 1,
|
|
243
|
+
description: "A workflow instance has been resumed.",
|
|
244
|
+
stability: "stable",
|
|
245
|
+
owners: ["@workflow-team"],
|
|
246
|
+
tags: [
|
|
247
|
+
"workflow",
|
|
248
|
+
"instance",
|
|
249
|
+
"resumed"
|
|
250
|
+
]
|
|
251
|
+
},
|
|
252
|
+
payload: InstanceEventPayload
|
|
253
|
+
});
|
|
254
|
+
/**
|
|
255
|
+
* InstanceFailedEvent - A workflow instance has failed.
|
|
256
|
+
*/
|
|
257
|
+
const InstanceFailedEvent = defineEvent({
|
|
258
|
+
meta: {
|
|
259
|
+
key: "workflow.instance.failed",
|
|
260
|
+
version: 1,
|
|
261
|
+
description: "A workflow instance has failed.",
|
|
262
|
+
stability: "stable",
|
|
263
|
+
owners: ["@workflow-team"],
|
|
264
|
+
tags: [
|
|
265
|
+
"workflow",
|
|
266
|
+
"instance",
|
|
267
|
+
"failed"
|
|
268
|
+
]
|
|
269
|
+
},
|
|
270
|
+
payload: InstanceEventPayload
|
|
271
|
+
});
|
|
272
|
+
/**
|
|
273
|
+
* InstanceTimedOutEvent - A workflow instance has timed out.
|
|
274
|
+
*/
|
|
275
|
+
const InstanceTimedOutEvent = defineEvent({
|
|
276
|
+
meta: {
|
|
277
|
+
key: "workflow.instance.timedOut",
|
|
278
|
+
version: 1,
|
|
279
|
+
description: "A workflow instance has timed out.",
|
|
280
|
+
stability: "stable",
|
|
281
|
+
owners: ["@workflow-team"],
|
|
282
|
+
tags: [
|
|
283
|
+
"workflow",
|
|
284
|
+
"instance",
|
|
285
|
+
"timeout"
|
|
286
|
+
]
|
|
287
|
+
},
|
|
288
|
+
payload: InstanceEventPayload
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
//#endregion
|
|
292
|
+
export { InstanceCancelledEvent, InstanceCompletedEvent, InstanceFailedEvent, InstancePausedEvent, InstanceResumedEvent, InstanceStartedEvent, InstanceTimedOutEvent, StepEnteredEvent, StepExitedEvent };
|
|
293
|
+
//# sourceMappingURL=instance.event.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance.event.js","names":["defineSchemaModel"],"sources":["../../src/instance/instance.event.ts"],"sourcesContent":["import { defineEvent, defineSchemaModel } from '@contractspec/lib.contracts';\nimport { ScalarTypeEnum } from '@contractspec/lib.schema';\n\n/**\n * Base payload for instance events.\n */\nconst InstanceEventPayload = defineSchemaModel({\n name: 'InstanceEventPayload',\n description: 'Base payload for instance events',\n fields: {\n instanceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n workflowId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n workflowKey: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n referenceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n referenceType: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n triggeredBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Payload for step transition events.\n */\nconst StepTransitionPayload = defineSchemaModel({\n name: 'StepTransitionEventPayload',\n description: 'Payload for step transition events',\n fields: {\n instanceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n workflowId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n fromStepKey: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n toStepKey: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n action: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n executedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Payload when instance completes.\n */\nconst InstanceCompletedPayload = defineSchemaModel({\n name: 'InstanceCompletedEventPayload',\n description: 'Payload when instance completes',\n fields: {\n instanceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n workflowId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n workflowKey: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n outcome: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n referenceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n referenceType: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n duration: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * InstanceStartedEvent - A new workflow instance has been started.\n */\nexport const InstanceStartedEvent = defineEvent({\n meta: {\n key: 'workflow.instance.started',\n version: 1,\n description: 'A new workflow instance has been started.',\n stability: 'stable',\n owners: ['@workflow-team'],\n tags: ['workflow', 'instance', 'started'],\n },\n payload: InstanceEventPayload,\n});\n\n/**\n * StepEnteredEvent - A workflow instance has entered a new step.\n */\nexport const StepEnteredEvent = defineEvent({\n meta: {\n key: 'workflow.step.entered',\n version: 1,\n description: 'A workflow instance has entered a new step.',\n stability: 'stable',\n owners: ['@workflow-team'],\n tags: ['workflow', 'step', 'entered'],\n },\n payload: StepTransitionPayload,\n});\n\n/**\n * StepExitedEvent - A workflow instance has exited a step.\n */\nexport const StepExitedEvent = defineEvent({\n meta: {\n key: 'workflow.step.exited',\n version: 1,\n description: 'A workflow instance has exited a step.',\n stability: 'stable',\n owners: ['@workflow-team'],\n tags: ['workflow', 'step', 'exited'],\n },\n payload: StepTransitionPayload,\n});\n\n/**\n * InstanceCompletedEvent - A workflow instance has completed.\n */\nexport const InstanceCompletedEvent = defineEvent({\n meta: {\n key: 'workflow.instance.completed',\n version: 1,\n description: 'A workflow instance has completed.',\n stability: 'stable',\n owners: ['@workflow-team'],\n tags: ['workflow', 'instance', 'completed'],\n },\n payload: InstanceCompletedPayload,\n});\n\n/**\n * InstanceCancelledEvent - A workflow instance has been cancelled.\n */\nexport const InstanceCancelledEvent = defineEvent({\n meta: {\n key: 'workflow.instance.cancelled',\n version: 1,\n description: 'A workflow instance has been cancelled.',\n stability: 'stable',\n owners: ['@workflow-team'],\n tags: ['workflow', 'instance', 'cancelled'],\n },\n payload: InstanceEventPayload,\n});\n\n/**\n * InstancePausedEvent - A workflow instance has been paused.\n */\nexport const InstancePausedEvent = defineEvent({\n meta: {\n key: 'workflow.instance.paused',\n version: 1,\n description: 'A workflow instance has been paused.',\n stability: 'stable',\n owners: ['@workflow-team'],\n tags: ['workflow', 'instance', 'paused'],\n },\n payload: InstanceEventPayload,\n});\n\n/**\n * InstanceResumedEvent - A workflow instance has been resumed.\n */\nexport const InstanceResumedEvent = defineEvent({\n meta: {\n key: 'workflow.instance.resumed',\n version: 1,\n description: 'A workflow instance has been resumed.',\n stability: 'stable',\n owners: ['@workflow-team'],\n tags: ['workflow', 'instance', 'resumed'],\n },\n payload: InstanceEventPayload,\n});\n\n/**\n * InstanceFailedEvent - A workflow instance has failed.\n */\nexport const InstanceFailedEvent = defineEvent({\n meta: {\n key: 'workflow.instance.failed',\n version: 1,\n description: 'A workflow instance has failed.',\n stability: 'stable',\n owners: ['@workflow-team'],\n tags: ['workflow', 'instance', 'failed'],\n },\n payload: InstanceEventPayload,\n});\n\n/**\n * InstanceTimedOutEvent - A workflow instance has timed out.\n */\nexport const InstanceTimedOutEvent = defineEvent({\n meta: {\n key: 'workflow.instance.timedOut',\n version: 1,\n description: 'A workflow instance has timed out.',\n stability: 'stable',\n owners: ['@workflow-team'],\n tags: ['workflow', 'instance', 'timeout'],\n },\n payload: InstanceEventPayload,\n});\n"],"mappings":";;;;;;;AAMA,MAAM,uBAAuBA,oBAAkB;CAC7C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACzE,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACzE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC1E,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACrE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,eAAe;GACb,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EAC1E,gBAAgB;GACd,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAAY;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAM,wBAAwBA,oBAAkB;CAC9C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACzE,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACzE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACzE,WAAW;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACxE,QAAQ;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAM;EACpE,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACzE,WAAW;GAAE,MAAM,eAAe,UAAU;GAAE,YAA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;GAAY;GAAY;EAC5C;CACD,SAAS;CACV,CAAC;;;;AAKF,MAAa,yBAAyB,YAAY;CAChD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAY;GAAY;GAAY;EAC5C;CACD,SAAS;CACV,CAAC;;;;AAKF,MAAa,sBAAsB,YAAY;CAC7C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAY;GAAY;GAAS;EACzC;CACD,SAAS;CACV,CAAC;;;;AAKF,MAAa,uBAAuB,YAAY;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAY;GAAY;GAAU;EAC1C;CACD,SAAS;CACV,CAAC;;;;AAKF,MAAa,sBAAsB,YAAY;CAC7C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAY;GAAY;GAAS;EACzC;CACD,SAAS;CACV,CAAC;;;;AAKF,MAAa,wBAAwB,YAAY;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAY;GAAY;GAAU;EAC1C;CACD,SAAS;CACV,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { HandlerContext, WorkflowInstanceRecord } from "../shared/types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/instance/instance.handler.d.ts
|
|
4
|
+
|
|
5
|
+
declare function handleStartWorkflow(input: {
|
|
6
|
+
workflowKey: string;
|
|
7
|
+
contextData?: Record<string, unknown>;
|
|
8
|
+
referenceId?: string;
|
|
9
|
+
referenceType?: string;
|
|
10
|
+
priority?: number;
|
|
11
|
+
dueAt?: Date;
|
|
12
|
+
}, context: HandlerContext): Promise<WorkflowInstanceRecord>;
|
|
13
|
+
declare function handleTransitionWorkflow(input: {
|
|
14
|
+
instanceId: string;
|
|
15
|
+
action: string;
|
|
16
|
+
data?: Record<string, unknown>;
|
|
17
|
+
comment?: string;
|
|
18
|
+
}, context: HandlerContext): Promise<{
|
|
19
|
+
success: boolean;
|
|
20
|
+
instance: WorkflowInstanceRecord;
|
|
21
|
+
previousStepKey?: string;
|
|
22
|
+
currentStepKey?: string;
|
|
23
|
+
message?: string;
|
|
24
|
+
}>;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { handleStartWorkflow, handleTransitionWorkflow };
|
|
27
|
+
//# sourceMappingURL=instance.handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance.handler.d.ts","names":[],"sources":["../../src/instance/instance.handler.ts"],"sourcesContent":[],"mappings":";;;;AAgBkB,iBAHI,mBAAA,CAGJ,KAAA,EAAA;EAIN,WAAA,EAAA,MAAA;EAED,WAAA,CAAA,EANO,MAMP,CAAA,MAAA,EAAA,OAAA,CAAA;EACA,WAAA,CAAA,EAAA,MAAA;EAAR,aAAA,CAAA,EAAA,MAAA;EAAO,QAAA,CAAA,EAAA,MAAA;EA+CY,KAAA,CAAA,EAlDV,IAkDU;CAIX,EAAA,OAAA,EApDA,cAoDA,CAAA,EAnDR,OAmDQ,CAnDA,sBAmDA,CAAA;AAGA,iBAPW,wBAAA,CAOX,KAAA,EAAA;EAGC,UAAA,EAAA,MAAA;EAFT,MAAA,EAAA,MAAA;EAAO,IAAA,CAAA,EAJC,MAID,CAAA,MAAA,EAAA,OAAA,CAAA;;YADC,iBACR;;YAES"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { mockDataStore } from "../shared/mock-data.js";
|
|
2
|
+
import { buildStateMachineDefinition, createStateMachineEngine } from "../state-machine/index.js";
|
|
3
|
+
import { createApprovalRequests } from "../approval/approval.handler.js";
|
|
4
|
+
|
|
5
|
+
//#region src/instance/instance.handler.ts
|
|
6
|
+
async function handleStartWorkflow(input, context) {
|
|
7
|
+
const workflow = Array.from(mockDataStore.workflows.values()).find((w) => w.key === input.workflowKey && w.status === "ACTIVE" && w.organizationId === context.organizationId);
|
|
8
|
+
if (!workflow) throw new Error(`Active workflow ${input.workflowKey} not found`);
|
|
9
|
+
const id = `inst_${Date.now()}`;
|
|
10
|
+
const now = /* @__PURE__ */ new Date();
|
|
11
|
+
const instance = {
|
|
12
|
+
id,
|
|
13
|
+
workflowDefinitionId: workflow.id,
|
|
14
|
+
referenceId: input.referenceId,
|
|
15
|
+
referenceType: input.referenceType,
|
|
16
|
+
status: "RUNNING",
|
|
17
|
+
currentStepId: workflow.initialStepId,
|
|
18
|
+
contextData: input.contextData ?? {},
|
|
19
|
+
triggeredBy: context.userId,
|
|
20
|
+
organizationId: context.organizationId,
|
|
21
|
+
priority: input.priority ?? 0,
|
|
22
|
+
dueAt: input.dueAt,
|
|
23
|
+
createdAt: now,
|
|
24
|
+
updatedAt: now,
|
|
25
|
+
startedAt: now
|
|
26
|
+
};
|
|
27
|
+
mockDataStore.instances.set(id, instance);
|
|
28
|
+
if (workflow.initialStepId) {
|
|
29
|
+
const firstStep = mockDataStore.steps.get(workflow.initialStepId);
|
|
30
|
+
if (firstStep?.type === "APPROVAL") {
|
|
31
|
+
instance.status = "WAITING";
|
|
32
|
+
await createApprovalRequests(instance, firstStep, context);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return instance;
|
|
36
|
+
}
|
|
37
|
+
async function handleTransitionWorkflow(input, context) {
|
|
38
|
+
const instance = mockDataStore.instances.get(input.instanceId);
|
|
39
|
+
if (!instance) throw new Error(`Instance ${input.instanceId} not found`);
|
|
40
|
+
const workflow = mockDataStore.workflows.get(instance.workflowDefinitionId);
|
|
41
|
+
if (!workflow) throw new Error(`Workflow ${instance.workflowDefinitionId} not found`);
|
|
42
|
+
const steps = Array.from(mockDataStore.steps.values()).filter((s) => s.workflowDefinitionId === workflow.id);
|
|
43
|
+
const definition = buildStateMachineDefinition({
|
|
44
|
+
key: workflow.key,
|
|
45
|
+
name: workflow.name,
|
|
46
|
+
version: workflow.version,
|
|
47
|
+
initialStepId: workflow.initialStepId ?? null
|
|
48
|
+
}, steps);
|
|
49
|
+
const currentStep = steps.find((s) => s.id === instance.currentStepId);
|
|
50
|
+
const state = {
|
|
51
|
+
currentStepKey: currentStep?.key ?? "",
|
|
52
|
+
status: instance.status,
|
|
53
|
+
contextData: instance.contextData,
|
|
54
|
+
history: []
|
|
55
|
+
};
|
|
56
|
+
const transitionContext = {
|
|
57
|
+
userId: context.userId,
|
|
58
|
+
userRoles: context.userRoles,
|
|
59
|
+
data: input.data
|
|
60
|
+
};
|
|
61
|
+
const result = createStateMachineEngine().transition(definition, state, input.action, transitionContext);
|
|
62
|
+
if (!result.success) return {
|
|
63
|
+
success: false,
|
|
64
|
+
instance,
|
|
65
|
+
message: result.error
|
|
66
|
+
};
|
|
67
|
+
const previousStepKey = currentStep?.key;
|
|
68
|
+
const newStep = steps.find((s) => s.key === result.currentStepKey);
|
|
69
|
+
instance.currentStepId = newStep?.id;
|
|
70
|
+
instance.status = result.status;
|
|
71
|
+
instance.contextData = {
|
|
72
|
+
...instance.contextData,
|
|
73
|
+
...input.data
|
|
74
|
+
};
|
|
75
|
+
instance.updatedAt = /* @__PURE__ */ new Date();
|
|
76
|
+
if (result.status === "COMPLETED") {
|
|
77
|
+
instance.completedAt = /* @__PURE__ */ new Date();
|
|
78
|
+
instance.outcome = input.action;
|
|
79
|
+
}
|
|
80
|
+
if (newStep?.type === "APPROVAL") {
|
|
81
|
+
instance.status = "WAITING";
|
|
82
|
+
await createApprovalRequests(instance, newStep, context);
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
success: true,
|
|
86
|
+
instance,
|
|
87
|
+
previousStepKey,
|
|
88
|
+
currentStepKey: result.currentStepKey ?? void 0
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
//#endregion
|
|
93
|
+
export { handleStartWorkflow, handleTransitionWorkflow };
|
|
94
|
+
//# sourceMappingURL=instance.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance.handler.js","names":["instance: WorkflowInstanceRecord","state: StateMachineState","transitionContext: TransitionContext"],"sources":["../../src/instance/instance.handler.ts"],"sourcesContent":["/**\n * Workflow instance handlers.\n */\n\nimport type { StateMachineState, TransitionContext } from '../state-machine';\nimport {\n createStateMachineEngine,\n buildStateMachineDefinition,\n} from '../state-machine';\nimport type { WorkflowInstanceRecord, HandlerContext } from '../shared/types';\nimport { mockDataStore } from '../shared/mock-data';\nimport { createApprovalRequests } from '../approval/approval.handler';\n\nexport async function handleStartWorkflow(\n input: {\n workflowKey: string;\n contextData?: Record<string, unknown>;\n referenceId?: string;\n referenceType?: string;\n priority?: number;\n dueAt?: Date;\n },\n context: HandlerContext\n): Promise<WorkflowInstanceRecord> {\n // Find active workflow by key\n const workflow = Array.from(mockDataStore.workflows.values()).find(\n (w) =>\n w.key === input.workflowKey &&\n w.status === 'ACTIVE' &&\n w.organizationId === context.organizationId\n );\n\n if (!workflow) {\n throw new Error(`Active workflow ${input.workflowKey} not found`);\n }\n\n const id = `inst_${Date.now()}`;\n const now = new Date();\n\n const instance: WorkflowInstanceRecord = {\n id,\n workflowDefinitionId: workflow.id,\n referenceId: input.referenceId,\n referenceType: input.referenceType,\n status: 'RUNNING',\n currentStepId: workflow.initialStepId,\n contextData: input.contextData ?? {},\n triggeredBy: context.userId,\n organizationId: context.organizationId,\n priority: input.priority ?? 0,\n dueAt: input.dueAt,\n createdAt: now,\n updatedAt: now,\n startedAt: now,\n };\n\n mockDataStore.instances.set(id, instance);\n\n // Check if first step is an approval step\n if (workflow.initialStepId) {\n const firstStep = mockDataStore.steps.get(workflow.initialStepId);\n if (firstStep?.type === 'APPROVAL') {\n instance.status = 'WAITING';\n await createApprovalRequests(instance, firstStep, context);\n }\n }\n\n return instance;\n}\n\nexport async function handleTransitionWorkflow(\n input: {\n instanceId: string;\n action: string;\n data?: Record<string, unknown>;\n comment?: string;\n },\n context: HandlerContext\n): Promise<{\n success: boolean;\n instance: WorkflowInstanceRecord;\n previousStepKey?: string;\n currentStepKey?: string;\n message?: string;\n}> {\n const instance = mockDataStore.instances.get(input.instanceId);\n if (!instance) {\n throw new Error(`Instance ${input.instanceId} not found`);\n }\n\n const workflow = mockDataStore.workflows.get(instance.workflowDefinitionId);\n if (!workflow) {\n throw new Error(`Workflow ${instance.workflowDefinitionId} not found`);\n }\n\n // Get all steps for this workflow\n const steps = Array.from(mockDataStore.steps.values()).filter(\n (s) => s.workflowDefinitionId === workflow.id\n );\n\n // Build state machine\n const definition = buildStateMachineDefinition(\n {\n key: workflow.key,\n name: workflow.name,\n version: workflow.version,\n initialStepId: workflow.initialStepId ?? null,\n },\n steps\n );\n const currentStep = steps.find((s) => s.id === instance.currentStepId);\n\n const state: StateMachineState = {\n currentStepKey: currentStep?.key ?? '',\n status: instance.status,\n contextData: instance.contextData,\n history: [],\n };\n\n const transitionContext: TransitionContext = {\n userId: context.userId,\n userRoles: context.userRoles,\n data: input.data,\n };\n\n const engine = createStateMachineEngine();\n const result = engine.transition(\n definition,\n state,\n input.action,\n transitionContext\n );\n\n if (!result.success) {\n return {\n success: false,\n instance,\n message: result.error,\n };\n }\n\n // Update instance\n const previousStepKey = currentStep?.key;\n const newStep = steps.find((s) => s.key === result.currentStepKey);\n\n instance.currentStepId = newStep?.id;\n instance.status = result.status;\n instance.contextData = { ...instance.contextData, ...input.data };\n instance.updatedAt = new Date();\n\n if (result.status === 'COMPLETED') {\n instance.completedAt = new Date();\n instance.outcome = input.action;\n }\n\n // Handle approval steps\n if (newStep?.type === 'APPROVAL') {\n instance.status = 'WAITING';\n await createApprovalRequests(instance, newStep, context);\n }\n\n return {\n success: true,\n instance,\n previousStepKey,\n currentStepKey: result.currentStepKey ?? undefined,\n };\n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