@the-real-insight/tri-bpmn-engine 0.1.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/README.md +112 -0
- package/dist/api/routes.d.ts +2 -0
- package/dist/api/routes.d.ts.map +1 -0
- package/dist/api/routes.js +184 -0
- package/dist/api/routes.js.map +1 -0
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +9 -0
- package/dist/config.js.map +1 -0
- package/dist/db/client.d.ts +6 -0
- package/dist/db/client.d.ts.map +1 -0
- package/dist/db/client.js +36 -0
- package/dist/db/client.js.map +1 -0
- package/dist/db/collections.d.ts +250 -0
- package/dist/db/collections.d.ts.map +1 -0
- package/dist/db/collections.js +27 -0
- package/dist/db/collections.js.map +1 -0
- package/dist/db/index.d.ts +12 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +21 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/indexes.d.ts +3 -0
- package/dist/db/indexes.d.ts.map +1 -0
- package/dist/db/indexes.js +34 -0
- package/dist/db/indexes.js.map +1 -0
- package/dist/engine/transition.d.ts +10 -0
- package/dist/engine/transition.d.ts.map +1 -0
- package/dist/engine/transition.js +505 -0
- package/dist/engine/transition.js.map +1 -0
- package/dist/history/service.d.ts +35 -0
- package/dist/history/service.d.ts.map +1 -0
- package/dist/history/service.js +73 -0
- package/dist/history/service.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +99 -0
- package/dist/index.js.map +1 -0
- package/dist/instance/service.d.ts +33 -0
- package/dist/instance/service.d.ts.map +1 -0
- package/dist/instance/service.js +69 -0
- package/dist/instance/service.js.map +1 -0
- package/dist/local.d.ts +10 -0
- package/dist/local.d.ts.map +1 -0
- package/dist/local.js +15 -0
- package/dist/local.js.map +1 -0
- package/dist/model/parser.d.ts +3 -0
- package/dist/model/parser.d.ts.map +1 -0
- package/dist/model/parser.js +235 -0
- package/dist/model/parser.js.map +1 -0
- package/dist/model/parser.test.d.ts +2 -0
- package/dist/model/parser.test.d.ts.map +1 -0
- package/dist/model/parser.test.js +34 -0
- package/dist/model/parser.test.js.map +1 -0
- package/dist/model/service.d.ts +16 -0
- package/dist/model/service.d.ts.map +1 -0
- package/dist/model/service.js +32 -0
- package/dist/model/service.js.map +1 -0
- package/dist/model/types.d.ts +40 -0
- package/dist/model/types.d.ts.map +1 -0
- package/dist/model/types.js +3 -0
- package/dist/model/types.js.map +1 -0
- package/dist/sdk/client.d.ts +136 -0
- package/dist/sdk/client.d.ts.map +1 -0
- package/dist/sdk/client.js +490 -0
- package/dist/sdk/client.js.map +1 -0
- package/dist/sdk/facade.d.ts +64 -0
- package/dist/sdk/facade.d.ts.map +1 -0
- package/dist/sdk/facade.js +156 -0
- package/dist/sdk/facade.js.map +1 -0
- package/dist/sdk/index.d.ts +23 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/sdk/index.js +25 -0
- package/dist/sdk/index.js.map +1 -0
- package/dist/sdk/types.d.ts +199 -0
- package/dist/sdk/types.d.ts.map +1 -0
- package/dist/sdk/types.js +6 -0
- package/dist/sdk/types.js.map +1 -0
- package/dist/workers/processor.d.ts +11 -0
- package/dist/workers/processor.d.ts.map +1 -0
- package/dist/workers/processor.js +88 -0
- package/dist/workers/processor.js.map +1 -0
- package/dist/worklist/projection.d.ts +7 -0
- package/dist/worklist/projection.d.ts.map +1 -0
- package/dist/worklist/projection.js +64 -0
- package/dist/worklist/projection.js.map +1 -0
- package/dist/worklist/routes.d.ts +2 -0
- package/dist/worklist/routes.d.ts.map +1 -0
- package/dist/worklist/routes.js +196 -0
- package/dist/worklist/routes.js.map +1 -0
- package/dist/ws/broadcast.d.ts +24 -0
- package/dist/ws/broadcast.d.ts.map +1 -0
- package/dist/ws/broadcast.js +84 -0
- package/dist/ws/broadcast.js.map +1 -0
- package/dist/ws/server.d.ts +7 -0
- package/dist/ws/server.d.ts.map +1 -0
- package/dist/ws/server.js +31 -0
- package/dist/ws/server.js.map +1 -0
- package/package.json +63 -0
package/README.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# tri-bpmn-engine
|
|
2
|
+
|
|
3
|
+
BPMN 2.0 subset execution engine with event sourcing, optimistic concurrency, and external decision evaluation.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
- TypeScript on Node.js
|
|
8
|
+
- Express
|
|
9
|
+
- MongoDB
|
|
10
|
+
|
|
11
|
+
## Setup
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install
|
|
15
|
+
cp .env.example .env
|
|
16
|
+
# Edit .env and set MONGO_URL (default: mongodb://localhost:27017/tri-bpmn-engine)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Run
|
|
20
|
+
|
|
21
|
+
Requires MongoDB. Then:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm run dev
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Implemented
|
|
28
|
+
|
|
29
|
+
- **Model Service**: BPMN XML parsing, graph normalization
|
|
30
|
+
- **Runtime API**: Deploy, start instance, complete work, submit decision, query state
|
|
31
|
+
- **Core flow**: Start event, end event, sequence flow
|
|
32
|
+
- **Tasks**: Service task, user task (external callback via outbox)
|
|
33
|
+
- **Gateways**: XOR (split + join), AND (split + join)
|
|
34
|
+
- **Workers**: Claims and processes continuations; in-process polling
|
|
35
|
+
- **Outbox**: CALLBACK_WORK, CALLBACK_DECISION enqueued for delivery
|
|
36
|
+
- **WebSocket**: Push callbacks to clients at `/ws` (REST mode)
|
|
37
|
+
- **Event sourcing**: Append-only events per instance
|
|
38
|
+
- **Optimistic concurrency**: Versioned state updates
|
|
39
|
+
|
|
40
|
+
## Not yet implemented
|
|
41
|
+
|
|
42
|
+
- OR gateway (inclusive, conservative join)
|
|
43
|
+
- Timers (intermediate catch, boundary)
|
|
44
|
+
- Message events (catch, throw)
|
|
45
|
+
- Boundary error events
|
|
46
|
+
- Embedded subprocess, Call activity
|
|
47
|
+
- Outbox dispatcher (delivery loop)
|
|
48
|
+
- OR-join upstream metadata
|
|
49
|
+
- Full idempotency (commandId) for all mutating APIs
|
|
50
|
+
|
|
51
|
+
## API
|
|
52
|
+
|
|
53
|
+
### Deploy definition
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
curl -X POST http://localhost:3000/v1/definitions \
|
|
57
|
+
-H "Content-Type: application/json" \
|
|
58
|
+
-d '{"name":"Test","version":1,"bpmnXml":"<bpmn:definitions>...</bpmn:definitions>"}'
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Start instance
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
curl -X POST http://localhost:3000/v1/instances \
|
|
65
|
+
-H "Content-Type: application/json" \
|
|
66
|
+
-d '{"commandId":"cmd-1","definitionId":"<definitionId>"}'
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Submit decision (XOR gateway)
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
curl -X POST http://localhost:3000/v1/instances/<instanceId>/decisions/<decisionId> \
|
|
73
|
+
-H "Content-Type: application/json" \
|
|
74
|
+
-d '{"commandId":"cmd-2","outcome":{"selectedFlowIds":["<flowId>"]}}'
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Complete work item
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
curl -X POST http://localhost:3000/v1/instances/<instanceId>/work-items/<workItemId>/complete \
|
|
81
|
+
-H "Content-Type: application/json" \
|
|
82
|
+
-d '{"commandId":"cmd-2"}'
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Query instance
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
curl http://localhost:3000/v1/instances/<instanceId>
|
|
89
|
+
curl http://localhost:3000/v1/instances/<instanceId>/state
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Publishing
|
|
93
|
+
|
|
94
|
+
On every push to `main`, a GitHub Action:
|
|
95
|
+
|
|
96
|
+
1. Runs tests (`npm run test:sdk`)
|
|
97
|
+
2. Bumps the patch version (`0.1.0` → `0.1.1`)
|
|
98
|
+
3. Publishes to npm
|
|
99
|
+
4. Commits the version bump back to the repo (with `[skip ci]` to avoid loops)
|
|
100
|
+
|
|
101
|
+
**Setup**: Add `NPM_TOKEN` as a repository secret in GitHub. Create a token at [npmjs.com/access-tokens](https://www.npmjs.com/access-tokens) with "Automation" type (or "Publish" for granular access).
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Test
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
npm test # all tests (unit + conformance)
|
|
109
|
+
npm run test:unit # unit tests only (no MongoDB)
|
|
110
|
+
npm run test:conformance # conformance tests (requires MongoDB, see readme/TEST.md)
|
|
111
|
+
npm run test:integration # integration script (requires MongoDB)
|
|
112
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/api/routes.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS,4CAAW,CAAC"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.apiRouter = void 0;
|
|
4
|
+
const uuid_1 = require("uuid");
|
|
5
|
+
const express_1 = require("express");
|
|
6
|
+
const client_1 = require("../db/client");
|
|
7
|
+
const service_1 = require("../model/service");
|
|
8
|
+
const service_2 = require("../instance/service");
|
|
9
|
+
const service_3 = require("../history/service");
|
|
10
|
+
const collections_1 = require("../db/collections");
|
|
11
|
+
exports.apiRouter = (0, express_1.Router)();
|
|
12
|
+
exports.apiRouter.post('/v1/definitions', async (req, res) => {
|
|
13
|
+
try {
|
|
14
|
+
const { name, version, bpmnXml, tenantId } = req.body;
|
|
15
|
+
if (!name || version === undefined || !bpmnXml) {
|
|
16
|
+
res.status(400).json({ error: 'name, version, and bpmnXml are required' });
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const db = (0, client_1.getDb)();
|
|
20
|
+
const result = await (0, service_1.deployDefinition)(db, {
|
|
21
|
+
name,
|
|
22
|
+
version: Number(version),
|
|
23
|
+
bpmnXml,
|
|
24
|
+
tenantId,
|
|
25
|
+
});
|
|
26
|
+
res.status(201).json(result);
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
const message = err instanceof Error ? err.message : 'Deploy failed';
|
|
30
|
+
res.status(400).json({ error: message });
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
exports.apiRouter.post('/v1/instances', async (req, res) => {
|
|
34
|
+
try {
|
|
35
|
+
const { commandId, definitionId, businessKey, tenantId, user } = req.body;
|
|
36
|
+
if (!commandId || !definitionId) {
|
|
37
|
+
res.status(400).json({ error: 'commandId and definitionId are required' });
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const db = (0, client_1.getDb)();
|
|
41
|
+
const result = await (0, service_2.startInstance)(db, {
|
|
42
|
+
commandId,
|
|
43
|
+
definitionId,
|
|
44
|
+
businessKey,
|
|
45
|
+
tenantId,
|
|
46
|
+
user,
|
|
47
|
+
});
|
|
48
|
+
res.status(201).json(result);
|
|
49
|
+
}
|
|
50
|
+
catch (err) {
|
|
51
|
+
const message = err instanceof Error ? err.message : 'Start failed';
|
|
52
|
+
res.status(400).json({ error: message });
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
exports.apiRouter.get('/v1/instances/:instanceId', async (req, res) => {
|
|
56
|
+
try {
|
|
57
|
+
const db = (0, client_1.getDb)();
|
|
58
|
+
const doc = await (0, service_2.getInstance)(db, req.params.instanceId);
|
|
59
|
+
if (!doc) {
|
|
60
|
+
res.status(404).json({ error: 'Instance not found' });
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
res.json(doc);
|
|
64
|
+
}
|
|
65
|
+
catch (err) {
|
|
66
|
+
res.status(500).json({ error: 'Query failed' });
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
exports.apiRouter.get('/v1/instances/:instanceId/history', async (req, res) => {
|
|
70
|
+
try {
|
|
71
|
+
const db = (0, client_1.getDb)();
|
|
72
|
+
const instance = await (0, service_2.getInstance)(db, req.params.instanceId);
|
|
73
|
+
if (!instance) {
|
|
74
|
+
res.status(404).json({ error: 'Instance not found' });
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const entries = await (0, service_3.getProcessHistory)(db, req.params.instanceId);
|
|
78
|
+
res.json(entries);
|
|
79
|
+
}
|
|
80
|
+
catch (err) {
|
|
81
|
+
res.status(500).json({ error: 'Query failed' });
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
exports.apiRouter.get('/v1/instances/:instanceId/state', async (req, res) => {
|
|
85
|
+
try {
|
|
86
|
+
const db = (0, client_1.getDb)();
|
|
87
|
+
const { ProcessInstanceState } = (0, collections_1.getCollections)(db);
|
|
88
|
+
const doc = await ProcessInstanceState.findOne({ _id: req.params.instanceId }, { projection: { tokens: 1, scopes: 1, waits: 1, status: 1, version: 1 } });
|
|
89
|
+
if (!doc) {
|
|
90
|
+
res.status(404).json({ error: 'Instance not found' });
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
res.json(doc);
|
|
94
|
+
}
|
|
95
|
+
catch (err) {
|
|
96
|
+
res.status(500).json({ error: 'Query failed' });
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
exports.apiRouter.post('/v1/instances/:instanceId/decisions/:decisionId', async (req, res) => {
|
|
100
|
+
try {
|
|
101
|
+
const { instanceId, decisionId } = req.params;
|
|
102
|
+
const { commandId, idempotencyKey, outcome } = req.body;
|
|
103
|
+
if (!commandId || !outcome?.selectedFlowIds) {
|
|
104
|
+
res.status(400).json({ error: 'commandId and outcome.selectedFlowIds are required' });
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const db = (0, client_1.getDb)();
|
|
108
|
+
const cols = (0, collections_1.getCollections)(db);
|
|
109
|
+
const { ProcessInstanceState, Continuations } = cols;
|
|
110
|
+
const state = await ProcessInstanceState.findOne({ _id: instanceId });
|
|
111
|
+
if (!state) {
|
|
112
|
+
res.status(404).json({ error: 'Instance not found' });
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const decision = state.waits?.decisions?.find((d) => d.decisionId === decisionId);
|
|
116
|
+
if (!decision) {
|
|
117
|
+
res.status(404).json({ error: 'Decision not found or already applied' });
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const { selectedFlowIds } = outcome;
|
|
121
|
+
if (decision.kind === 'XOR_SPLIT' && selectedFlowIds.length !== 1) {
|
|
122
|
+
res.status(400).json({ error: 'XOR_SPLIT requires exactly one selectedFlowId' });
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const now = new Date();
|
|
126
|
+
await Continuations.insertOne({
|
|
127
|
+
_id: (0, uuid_1.v4)(),
|
|
128
|
+
instanceId,
|
|
129
|
+
dueAt: now,
|
|
130
|
+
kind: 'DECISION_RECORDED',
|
|
131
|
+
payload: { decisionId, selectedFlowIds, commandId },
|
|
132
|
+
status: 'READY',
|
|
133
|
+
attempts: 0,
|
|
134
|
+
createdAt: now,
|
|
135
|
+
updatedAt: now,
|
|
136
|
+
});
|
|
137
|
+
res.status(202).json({ accepted: true });
|
|
138
|
+
}
|
|
139
|
+
catch (err) {
|
|
140
|
+
const message = err instanceof Error ? err.message : 'Decision failed';
|
|
141
|
+
res.status(400).json({ error: message });
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
exports.apiRouter.post('/v1/instances/:instanceId/work-items/:workItemId/complete', async (req, res) => {
|
|
145
|
+
try {
|
|
146
|
+
const { instanceId, workItemId } = req.params;
|
|
147
|
+
const { commandId, result, completedBy, completedByDetails, user } = req.body;
|
|
148
|
+
if (!commandId) {
|
|
149
|
+
res.status(400).json({ error: 'commandId is required' });
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
const db = (0, client_1.getDb)();
|
|
153
|
+
const cols = (0, collections_1.getCollections)(db);
|
|
154
|
+
const { Continuations } = cols;
|
|
155
|
+
const now = new Date();
|
|
156
|
+
const payload = { workItemId, commandId, result };
|
|
157
|
+
if (user) {
|
|
158
|
+
payload.completedBy = user.email;
|
|
159
|
+
payload.completedByDetails = user;
|
|
160
|
+
}
|
|
161
|
+
else if (completedBy != null) {
|
|
162
|
+
payload.completedBy = completedBy;
|
|
163
|
+
if (completedByDetails != null)
|
|
164
|
+
payload.completedByDetails = completedByDetails;
|
|
165
|
+
}
|
|
166
|
+
await Continuations.insertOne({
|
|
167
|
+
_id: (0, uuid_1.v4)(),
|
|
168
|
+
instanceId,
|
|
169
|
+
dueAt: now,
|
|
170
|
+
kind: 'WORK_COMPLETED',
|
|
171
|
+
payload,
|
|
172
|
+
status: 'READY',
|
|
173
|
+
attempts: 0,
|
|
174
|
+
createdAt: now,
|
|
175
|
+
updatedAt: now,
|
|
176
|
+
});
|
|
177
|
+
res.status(202).json({ accepted: true });
|
|
178
|
+
}
|
|
179
|
+
catch (err) {
|
|
180
|
+
const message = err instanceof Error ? err.message : 'Complete failed';
|
|
181
|
+
res.status(400).json({ error: message });
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
//# sourceMappingURL=routes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../../src/api/routes.ts"],"names":[],"mappings":";;;AAAA,+BAAoC;AACpC,qCAAoD;AACpD,yCAAqC;AACrC,8CAAoD;AACpD,iDAAiE;AACjE,gDAAuD;AACvD,mDAAmD;AAGtC,QAAA,SAAS,GAAG,IAAA,gBAAM,GAAE,CAAC;AAElC,iBAAS,CAAC,IAAI,CAAC,iBAAiB,EAAE,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,EAAE;IACtE,IAAI,CAAC;QACH,MAAM,EAAE,IAAI,EAAE,OAAO,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AA,SAAM,GAAE;YACb,UAAU;YACV,KAAK,EAAE,GAAG;YACV,IAAI,EAAE,gBAAgB;YACtB,OAAO;YACP,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,CAAC;YACX,SAAS,EAAE,GAAG;YACd,SAAS,EAAE,GAAG;SACf,CAAC,CAAC;QACH,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC;QACvE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC,CACF,CAAC"}
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;CAIlB,CAAC"}
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.config = void 0;
|
|
4
|
+
exports.config = {
|
|
5
|
+
mongoUrl: process.env.MONGO_URL ?? 'mongodb://localhost:27017/tri-bpmn-engine',
|
|
6
|
+
mongoDb: process.env.MONGO_DB ?? 'BPM',
|
|
7
|
+
port: parseInt(process.env.PORT ?? '3000', 10),
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAAG;IACpB,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,2CAA2C;IAC9E,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,KAAK;IACtC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,MAAM,EAAE,EAAE,CAAC;CAC/C,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MongoClient, Db } from 'mongodb';
|
|
2
|
+
export declare function connectDb(): Promise<Db>;
|
|
3
|
+
export declare function getClient(): MongoClient;
|
|
4
|
+
export declare function closeDb(): Promise<void>;
|
|
5
|
+
export declare function getDb(): Db;
|
|
6
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/db/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAM1C,wBAAsB,SAAS,IAAI,OAAO,CAAC,EAAE,CAAC,CAM7C;AAED,wBAAgB,SAAS,IAAI,WAAW,CAGvC;AAED,wBAAsB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAM7C;AAED,wBAAgB,KAAK,IAAI,EAAE,CAG1B"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.connectDb = connectDb;
|
|
4
|
+
exports.getClient = getClient;
|
|
5
|
+
exports.closeDb = closeDb;
|
|
6
|
+
exports.getDb = getDb;
|
|
7
|
+
const mongodb_1 = require("mongodb");
|
|
8
|
+
const config_1 = require("../config");
|
|
9
|
+
let client = null;
|
|
10
|
+
let db = null;
|
|
11
|
+
async function connectDb() {
|
|
12
|
+
if (db)
|
|
13
|
+
return db;
|
|
14
|
+
client = new mongodb_1.MongoClient(config_1.config.mongoUrl);
|
|
15
|
+
await client.connect();
|
|
16
|
+
db = client.db(config_1.config.mongoDb);
|
|
17
|
+
return db;
|
|
18
|
+
}
|
|
19
|
+
function getClient() {
|
|
20
|
+
if (!client)
|
|
21
|
+
throw new Error('Database not connected');
|
|
22
|
+
return client;
|
|
23
|
+
}
|
|
24
|
+
async function closeDb() {
|
|
25
|
+
if (client) {
|
|
26
|
+
await client.close();
|
|
27
|
+
client = null;
|
|
28
|
+
db = null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function getDb() {
|
|
32
|
+
if (!db)
|
|
33
|
+
throw new Error('Database not connected');
|
|
34
|
+
return db;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/db/client.ts"],"names":[],"mappings":";;AAMA,8BAMC;AAED,8BAGC;AAED,0BAMC;AAED,sBAGC;AA9BD,qCAA0C;AAC1C,sCAAmC;AAEnC,IAAI,MAAM,GAAuB,IAAI,CAAC;AACtC,IAAI,EAAE,GAAc,IAAI,CAAC;AAElB,KAAK,UAAU,SAAS;IAC7B,IAAI,EAAE;QAAE,OAAO,EAAE,CAAC;IAClB,MAAM,GAAG,IAAI,qBAAW,CAAC,eAAM,CAAC,QAAQ,CAAC,CAAC;IAC1C,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;IACvB,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC,eAAM,CAAC,OAAO,CAAC,CAAC;IAC/B,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAgB,SAAS;IACvB,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACvD,OAAO,MAAM,CAAC;AAChB,CAAC;AAEM,KAAK,UAAU,OAAO;IAC3B,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACrB,MAAM,GAAG,IAAI,CAAC;QACd,EAAE,GAAG,IAAI,CAAC;IACZ,CAAC;AACH,CAAC;AAED,SAAgB,KAAK;IACnB,IAAI,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACnD,OAAO,EAAE,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { Db, Collection } from 'mongodb';
|
|
2
|
+
export declare const COLLECTION_NAMES: {
|
|
3
|
+
readonly ProcessDefinitions: "ProcessDefinitions";
|
|
4
|
+
readonly ProcessInstances: "ProcessInstances";
|
|
5
|
+
readonly ProcessInstanceState: "ProcessInstanceState";
|
|
6
|
+
readonly ProcessInstanceEvents: "ProcessInstanceEvents";
|
|
7
|
+
readonly ProcessInstanceHistory: "ProcessInstanceHistory";
|
|
8
|
+
readonly Continuations: "Continuations";
|
|
9
|
+
readonly Outbox: "Outbox";
|
|
10
|
+
readonly HumanTasks: "HumanTasks";
|
|
11
|
+
};
|
|
12
|
+
/** Audit trail: one row per task/instance lifecycle event. */
|
|
13
|
+
export type ProcessInstanceHistoryDoc = {
|
|
14
|
+
_id: string;
|
|
15
|
+
instanceId: string;
|
|
16
|
+
seq: number;
|
|
17
|
+
eventType: 'INSTANCE_STARTED' | 'TASK_STARTED' | 'TASK_COMPLETED';
|
|
18
|
+
at: Date;
|
|
19
|
+
/** For INSTANCE_STARTED */
|
|
20
|
+
startedBy?: string;
|
|
21
|
+
startedByDetails?: UserDetails;
|
|
22
|
+
/** For TASK_* */
|
|
23
|
+
nodeId?: string;
|
|
24
|
+
nodeName?: string;
|
|
25
|
+
nodeType?: 'userTask' | 'serviceTask';
|
|
26
|
+
workItemId?: string;
|
|
27
|
+
scopeId?: string;
|
|
28
|
+
/** For TASK_COMPLETED (user tasks) */
|
|
29
|
+
completedBy?: string;
|
|
30
|
+
completedByDetails?: UserDetails;
|
|
31
|
+
result?: unknown;
|
|
32
|
+
createdAt: Date;
|
|
33
|
+
};
|
|
34
|
+
export type HumanTaskStatus = 'OPEN' | 'CLAIMED' | 'COMPLETED' | 'CANCELED';
|
|
35
|
+
export type HumanTaskDoc = {
|
|
36
|
+
_id: string;
|
|
37
|
+
instanceId: string;
|
|
38
|
+
definitionId?: string;
|
|
39
|
+
nodeId: string;
|
|
40
|
+
name: string;
|
|
41
|
+
role?: string;
|
|
42
|
+
status: HumanTaskStatus;
|
|
43
|
+
assigneeUserId?: string;
|
|
44
|
+
candidateRoles?: string[];
|
|
45
|
+
createdAt: Date;
|
|
46
|
+
claimedAt?: Date;
|
|
47
|
+
completedAt?: Date;
|
|
48
|
+
completedBy?: string;
|
|
49
|
+
completedByDetails?: UserDetails;
|
|
50
|
+
canceledAt?: Date;
|
|
51
|
+
result?: unknown;
|
|
52
|
+
version: number;
|
|
53
|
+
};
|
|
54
|
+
export type ProcessDefinitionDoc = {
|
|
55
|
+
_id: string;
|
|
56
|
+
tenantId?: string;
|
|
57
|
+
name: string;
|
|
58
|
+
version: number;
|
|
59
|
+
bpmnXml?: string;
|
|
60
|
+
graph: NormalizedGraph;
|
|
61
|
+
createdAt: Date;
|
|
62
|
+
};
|
|
63
|
+
export type UserDetails = {
|
|
64
|
+
email: string;
|
|
65
|
+
firstName?: string;
|
|
66
|
+
lastName?: string;
|
|
67
|
+
phone?: string;
|
|
68
|
+
photoUrl?: string;
|
|
69
|
+
};
|
|
70
|
+
export type ProcessInstanceDoc = {
|
|
71
|
+
_id: string;
|
|
72
|
+
definitionId: string;
|
|
73
|
+
tenantId?: string;
|
|
74
|
+
rootInstanceId: string;
|
|
75
|
+
parentInstanceId?: string;
|
|
76
|
+
parentCallActivityId?: string;
|
|
77
|
+
businessKey?: string;
|
|
78
|
+
status: 'RUNNING' | 'COMPLETED' | 'TERMINATED' | 'FAILED';
|
|
79
|
+
createdAt: Date;
|
|
80
|
+
endedAt?: Date;
|
|
81
|
+
startedBy?: string;
|
|
82
|
+
startedByDetails?: UserDetails;
|
|
83
|
+
};
|
|
84
|
+
export type TokenStatus = 'ACTIVE' | 'WAITING' | 'CONSUMED';
|
|
85
|
+
export type WorkItemStatus = 'OPEN' | 'COMPLETED' | 'FAILED' | 'CANCELED';
|
|
86
|
+
export type ContinuationStatus = 'READY' | 'IN_PROGRESS' | 'DONE' | 'DEAD';
|
|
87
|
+
export type OutboxStatus = 'READY' | 'SENT' | 'RETRY' | 'DEAD';
|
|
88
|
+
export type Token = {
|
|
89
|
+
tokenId: string;
|
|
90
|
+
nodeId: string;
|
|
91
|
+
scopeId: string;
|
|
92
|
+
status: TokenStatus;
|
|
93
|
+
createdAt: Date;
|
|
94
|
+
activation?: {
|
|
95
|
+
orSplitId: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
export type Scope = {
|
|
99
|
+
scopeId: string;
|
|
100
|
+
kind: 'ROOT' | 'SUBPROCESS';
|
|
101
|
+
nodeId?: string;
|
|
102
|
+
parentScopeId?: string;
|
|
103
|
+
};
|
|
104
|
+
export type WorkItemRef = {
|
|
105
|
+
workItemId: string;
|
|
106
|
+
nodeId: string;
|
|
107
|
+
tokenId: string;
|
|
108
|
+
scopeId: string;
|
|
109
|
+
kind: 'SERVICE_TASK' | 'USER_TASK' | 'CALL_ACTIVITY';
|
|
110
|
+
status: WorkItemStatus;
|
|
111
|
+
createdAt: Date;
|
|
112
|
+
correlationHints?: Record<string, unknown>;
|
|
113
|
+
};
|
|
114
|
+
export type MessageSubRef = {
|
|
115
|
+
subscriptionId: string;
|
|
116
|
+
messageName: string;
|
|
117
|
+
nodeId: string;
|
|
118
|
+
tokenId: string;
|
|
119
|
+
scopeId: string;
|
|
120
|
+
correlationKeys?: Record<string, unknown>;
|
|
121
|
+
createdAt: Date;
|
|
122
|
+
};
|
|
123
|
+
export type TimerRef = {
|
|
124
|
+
timerId: string;
|
|
125
|
+
nodeId: string;
|
|
126
|
+
tokenId: string;
|
|
127
|
+
scopeId: string;
|
|
128
|
+
dueAt: Date;
|
|
129
|
+
isBoundary: boolean;
|
|
130
|
+
boundary?: {
|
|
131
|
+
attachedToNodeId: string;
|
|
132
|
+
interrupting: boolean;
|
|
133
|
+
};
|
|
134
|
+
createdAt: Date;
|
|
135
|
+
};
|
|
136
|
+
export type DecisionKind = 'XOR_SPLIT' | 'OR_SPLIT' | 'EVENT_BASED_ARM' | 'CORRELATION_KEYS';
|
|
137
|
+
export type PendingDecisionRef = {
|
|
138
|
+
decisionId: string;
|
|
139
|
+
kind: DecisionKind;
|
|
140
|
+
nodeId: string;
|
|
141
|
+
tokenId: string;
|
|
142
|
+
scopeId: string;
|
|
143
|
+
optionsHash: string;
|
|
144
|
+
contextRef?: string;
|
|
145
|
+
createdAt: Date;
|
|
146
|
+
};
|
|
147
|
+
export type ProcessInstanceStateDoc = {
|
|
148
|
+
_id: string;
|
|
149
|
+
version: number;
|
|
150
|
+
status: 'RUNNING' | 'COMPLETED' | 'TERMINATED' | 'FAILED';
|
|
151
|
+
tokens: Token[];
|
|
152
|
+
scopes: Scope[];
|
|
153
|
+
waits: {
|
|
154
|
+
workItems: WorkItemRef[];
|
|
155
|
+
messageSubs: MessageSubRef[];
|
|
156
|
+
timers: TimerRef[];
|
|
157
|
+
decisions: PendingDecisionRef[];
|
|
158
|
+
};
|
|
159
|
+
dedupe: {
|
|
160
|
+
processedCommandIds: string[];
|
|
161
|
+
completedWorkItemIds: string[];
|
|
162
|
+
processedMessageIds: string[];
|
|
163
|
+
recordedDecisionIds: string[];
|
|
164
|
+
};
|
|
165
|
+
lastEventSeq: number;
|
|
166
|
+
updatedAt: Date;
|
|
167
|
+
joinArrivals?: Record<string, Record<string, Record<string, string>>>;
|
|
168
|
+
};
|
|
169
|
+
export type ProcessInstanceEventDoc = {
|
|
170
|
+
_id?: string;
|
|
171
|
+
instanceId: string;
|
|
172
|
+
seq: number;
|
|
173
|
+
type: string;
|
|
174
|
+
at: Date;
|
|
175
|
+
payload: Record<string, unknown>;
|
|
176
|
+
};
|
|
177
|
+
export type ContinuationKind = 'START' | 'TOKEN_AT_NODE' | 'TIMER_DUE' | 'MESSAGE' | 'WORK_COMPLETED' | 'DECISION_RECORDED';
|
|
178
|
+
export type ContinuationDoc = {
|
|
179
|
+
_id: string;
|
|
180
|
+
instanceId: string;
|
|
181
|
+
dueAt: Date;
|
|
182
|
+
kind: ContinuationKind;
|
|
183
|
+
payload: Record<string, unknown>;
|
|
184
|
+
status: ContinuationStatus;
|
|
185
|
+
ownerId?: string;
|
|
186
|
+
leaseUntil?: Date;
|
|
187
|
+
attempts: number;
|
|
188
|
+
dedupeKey?: string;
|
|
189
|
+
createdAt: Date;
|
|
190
|
+
updatedAt: Date;
|
|
191
|
+
};
|
|
192
|
+
export type OutboxKind = 'CALLBACK_WORK' | 'CALLBACK_DECISION' | 'CALLBACK_EVENT';
|
|
193
|
+
export type OutboxDoc = {
|
|
194
|
+
_id: string;
|
|
195
|
+
instanceId: string;
|
|
196
|
+
rootInstanceId: string;
|
|
197
|
+
kind: OutboxKind;
|
|
198
|
+
destination: {
|
|
199
|
+
url: string;
|
|
200
|
+
headers?: Record<string, string>;
|
|
201
|
+
};
|
|
202
|
+
payload: Record<string, unknown>;
|
|
203
|
+
status: OutboxStatus;
|
|
204
|
+
attempts: number;
|
|
205
|
+
nextAttemptAt: Date;
|
|
206
|
+
lastError?: string;
|
|
207
|
+
idempotencyKey: string;
|
|
208
|
+
createdAt: Date;
|
|
209
|
+
updatedAt: Date;
|
|
210
|
+
};
|
|
211
|
+
export type NodeDef = {
|
|
212
|
+
id: string;
|
|
213
|
+
type: string;
|
|
214
|
+
name?: string;
|
|
215
|
+
laneRef?: string;
|
|
216
|
+
incoming: string[];
|
|
217
|
+
outgoing: string[];
|
|
218
|
+
attachedToRef?: string;
|
|
219
|
+
timerDefinition?: string;
|
|
220
|
+
messageRef?: string;
|
|
221
|
+
eventDefinition?: string;
|
|
222
|
+
};
|
|
223
|
+
export type FlowDef = {
|
|
224
|
+
id: string;
|
|
225
|
+
sourceRef: string;
|
|
226
|
+
targetRef: string;
|
|
227
|
+
name?: string;
|
|
228
|
+
};
|
|
229
|
+
export type NormalizedGraph = {
|
|
230
|
+
processId: string;
|
|
231
|
+
nodes: Record<string, NodeDef>;
|
|
232
|
+
flows: Record<string, FlowDef>;
|
|
233
|
+
startNodeIds: string[];
|
|
234
|
+
metadata: {
|
|
235
|
+
incomingByNode: Record<string, string[]>;
|
|
236
|
+
outgoingByNode: Record<string, string[]>;
|
|
237
|
+
upstreamSetByOrJoinIncoming?: Record<string, Record<string, string[]>>;
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
export declare function getCollections(database: Db): {
|
|
241
|
+
ProcessDefinitions: Collection<ProcessDefinitionDoc>;
|
|
242
|
+
ProcessInstances: Collection<ProcessInstanceDoc>;
|
|
243
|
+
ProcessInstanceState: Collection<ProcessInstanceStateDoc>;
|
|
244
|
+
ProcessInstanceEvents: Collection<ProcessInstanceEventDoc>;
|
|
245
|
+
Continuations: Collection<ContinuationDoc>;
|
|
246
|
+
Outbox: Collection<OutboxDoc>;
|
|
247
|
+
HumanTasks: Collection<HumanTaskDoc>;
|
|
248
|
+
ProcessInstanceHistory: Collection<ProcessInstanceHistoryDoc>;
|
|
249
|
+
};
|
|
250
|
+
//# sourceMappingURL=collections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../src/db/collections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEzC,eAAO,MAAM,gBAAgB;;;;;;;;;CASnB,CAAC;AAEX,8DAA8D;AAC9D,MAAM,MAAM,yBAAyB,GAAG;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,kBAAkB,GAAG,cAAc,GAAG,gBAAgB,CAAC;IAClE,EAAE,EAAE,IAAI,CAAC;IACT,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,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