@bpmnkit/core 0.0.8
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 +185 -0
- package/dist/bpmn/auto-layout.d.ts +10 -0
- package/dist/bpmn/auto-layout.js +203 -0
- package/dist/bpmn/bpmn-builder.d.ts +381 -0
- package/dist/bpmn/bpmn-builder.js +1223 -0
- package/dist/bpmn/bpmn-model.d.ts +403 -0
- package/dist/bpmn/bpmn-model.js +2 -0
- package/dist/bpmn/bpmn-parser.d.ts +4 -0
- package/dist/bpmn/bpmn-parser.js +642 -0
- package/dist/bpmn/bpmn-serializer.d.ts +4 -0
- package/dist/bpmn/bpmn-serializer.js +515 -0
- package/dist/bpmn/compact.d.ts +91 -0
- package/dist/bpmn/compact.js +349 -0
- package/dist/bpmn/di-color.d.ts +9 -0
- package/dist/bpmn/di-color.js +32 -0
- package/dist/bpmn/index.d.ts +105 -0
- package/dist/bpmn/index.js +176 -0
- package/dist/bpmn/optimize/feel.d.ts +4 -0
- package/dist/bpmn/optimize/feel.js +186 -0
- package/dist/bpmn/optimize/flow.d.ts +4 -0
- package/dist/bpmn/optimize/flow.js +323 -0
- package/dist/bpmn/optimize/index.d.ts +5 -0
- package/dist/bpmn/optimize/index.js +51 -0
- package/dist/bpmn/optimize/naming.d.ts +8 -0
- package/dist/bpmn/optimize/naming.js +145 -0
- package/dist/bpmn/optimize/tasks.d.ts +4 -0
- package/dist/bpmn/optimize/tasks.js +273 -0
- package/dist/bpmn/optimize/types.d.ts +44 -0
- package/dist/bpmn/optimize/types.js +2 -0
- package/dist/bpmn/optimize/utils.d.ts +23 -0
- package/dist/bpmn/optimize/utils.js +129 -0
- package/dist/bpmn/rest-connector.d.ts +48 -0
- package/dist/bpmn/rest-connector.js +69 -0
- package/dist/bpmn/svg.d.ts +35 -0
- package/dist/bpmn/svg.js +557 -0
- package/dist/bpmn/type-guards.d.ts +136 -0
- package/dist/bpmn/type-guards.js +211 -0
- package/dist/bpmn/utils.d.ts +88 -0
- package/dist/bpmn/utils.js +207 -0
- package/dist/bpmn/zeebe-extensions.d.ts +72 -0
- package/dist/bpmn/zeebe-extensions.js +96 -0
- package/dist/dmn/compact.d.ts +44 -0
- package/dist/dmn/compact.js +125 -0
- package/dist/dmn/dmn-builder.d.ts +59 -0
- package/dist/dmn/dmn-builder.js +144 -0
- package/dist/dmn/dmn-layout.d.ts +57 -0
- package/dist/dmn/dmn-layout.js +256 -0
- package/dist/dmn/dmn-model.d.ts +158 -0
- package/dist/dmn/dmn-model.js +2 -0
- package/dist/dmn/dmn-parser.d.ts +4 -0
- package/dist/dmn/dmn-parser.js +275 -0
- package/dist/dmn/dmn-serializer.d.ts +4 -0
- package/dist/dmn/dmn-serializer.js +296 -0
- package/dist/dmn/index.d.ts +28 -0
- package/dist/dmn/index.js +51 -0
- package/dist/errors.d.ts +77 -0
- package/dist/errors.js +66 -0
- package/dist/form/compact.d.ts +20 -0
- package/dist/form/compact.js +146 -0
- package/dist/form/form-builder.d.ts +111 -0
- package/dist/form/form-builder.js +347 -0
- package/dist/form/form-model.d.ts +221 -0
- package/dist/form/form-model.js +2 -0
- package/dist/form/form-parser.d.ts +4 -0
- package/dist/form/form-parser.js +514 -0
- package/dist/form/form-serializer.d.ts +4 -0
- package/dist/form/form-serializer.js +240 -0
- package/dist/form/index.d.ts +27 -0
- package/dist/form/index.js +43 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +19 -0
- package/dist/layout/bench.d.ts +86 -0
- package/dist/layout/bench.js +225 -0
- package/dist/layout/coordinates.d.ts +62 -0
- package/dist/layout/coordinates.js +868 -0
- package/dist/layout/crossing.d.ts +8 -0
- package/dist/layout/crossing.js +60 -0
- package/dist/layout/graph.d.ts +28 -0
- package/dist/layout/graph.js +126 -0
- package/dist/layout/index.d.ts +7 -0
- package/dist/layout/index.js +5 -0
- package/dist/layout/layers.d.ts +13 -0
- package/dist/layout/layers.js +49 -0
- package/dist/layout/layout-engine.d.ts +21 -0
- package/dist/layout/layout-engine.js +191 -0
- package/dist/layout/overlap.d.ts +10 -0
- package/dist/layout/overlap.js +70 -0
- package/dist/layout/routing.d.ts +26 -0
- package/dist/layout/routing.js +439 -0
- package/dist/layout/subprocess.d.ts +14 -0
- package/dist/layout/subprocess.js +77 -0
- package/dist/layout/types.d.ts +72 -0
- package/dist/layout/types.js +37 -0
- package/dist/types/id-generator.d.ts +8 -0
- package/dist/types/id-generator.js +31 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +2 -0
- package/dist/types/xml-element.d.ts +12 -0
- package/dist/types/xml-element.js +2 -0
- package/dist/xml/index.d.ts +2 -0
- package/dist/xml/index.js +2 -0
- package/dist/xml/xml-parser.d.ts +13 -0
- package/dist/xml/xml-parser.js +271 -0
- package/package.json +38 -0
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
import type { XmlElement } from "../types/xml-element.js";
|
|
2
|
+
/**
|
|
3
|
+
* Discriminant string literal union for every BPMN flow node type.
|
|
4
|
+
* Every {@link BpmnFlowElement} carries a `type` field of this union, enabling
|
|
5
|
+
* exhaustive `switch` statements and type-narrowing with the type guard helpers
|
|
6
|
+
* exported from `@bpmnkit/core`.
|
|
7
|
+
*/
|
|
8
|
+
export type BpmnElementType = "startEvent" | "endEvent" | "intermediateThrowEvent" | "intermediateCatchEvent" | "boundaryEvent" | "task" | "serviceTask" | "scriptTask" | "userTask" | "sendTask" | "receiveTask" | "businessRuleTask" | "manualTask" | "callActivity" | "exclusiveGateway" | "parallelGateway" | "inclusiveGateway" | "eventBasedGateway" | "complexGateway" | "subProcess" | "adHocSubProcess" | "eventSubProcess" | "transaction";
|
|
9
|
+
/** Axis-aligned bounding box used by BPMN diagram interchange (BPMNDi). */
|
|
10
|
+
export interface BpmnBounds {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
}
|
|
16
|
+
/** A single point along a sequence flow edge route (BPMNDi waypoint). */
|
|
17
|
+
export interface BpmnWaypoint {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
}
|
|
21
|
+
/** Event definition for timer-based events. Use `timeDuration`, `timeDate`, or `timeCycle`. */
|
|
22
|
+
export interface BpmnTimerEventDefinition {
|
|
23
|
+
type: "timer";
|
|
24
|
+
id?: string;
|
|
25
|
+
timeDuration?: string;
|
|
26
|
+
timeDurationAttributes?: Record<string, string>;
|
|
27
|
+
timeDate?: string;
|
|
28
|
+
timeDateAttributes?: Record<string, string>;
|
|
29
|
+
timeCycle?: string;
|
|
30
|
+
timeCycleAttributes?: Record<string, string>;
|
|
31
|
+
}
|
|
32
|
+
/** Event definition for error boundary / end events. */
|
|
33
|
+
export interface BpmnErrorEventDefinition {
|
|
34
|
+
type: "error";
|
|
35
|
+
id?: string;
|
|
36
|
+
errorRef?: string;
|
|
37
|
+
}
|
|
38
|
+
/** Event definition for escalation events. */
|
|
39
|
+
export interface BpmnEscalationEventDefinition {
|
|
40
|
+
type: "escalation";
|
|
41
|
+
id?: string;
|
|
42
|
+
escalationRef?: string;
|
|
43
|
+
}
|
|
44
|
+
/** Event definition for message events (receive / send). */
|
|
45
|
+
export interface BpmnMessageEventDefinition {
|
|
46
|
+
type: "message";
|
|
47
|
+
id?: string;
|
|
48
|
+
messageRef?: string;
|
|
49
|
+
}
|
|
50
|
+
/** Event definition for signal catch / throw events. */
|
|
51
|
+
export interface BpmnSignalEventDefinition {
|
|
52
|
+
type: "signal";
|
|
53
|
+
id?: string;
|
|
54
|
+
signalRef?: string;
|
|
55
|
+
}
|
|
56
|
+
/** Event definition for conditional catch events. */
|
|
57
|
+
export interface BpmnConditionalEventDefinition {
|
|
58
|
+
type: "conditional";
|
|
59
|
+
id?: string;
|
|
60
|
+
condition?: string;
|
|
61
|
+
}
|
|
62
|
+
/** Event definition for link catch / throw events. */
|
|
63
|
+
export interface BpmnLinkEventDefinition {
|
|
64
|
+
type: "link";
|
|
65
|
+
id?: string;
|
|
66
|
+
name?: string;
|
|
67
|
+
}
|
|
68
|
+
/** Event definition for cancel boundary events (transaction scope). */
|
|
69
|
+
export interface BpmnCancelEventDefinition {
|
|
70
|
+
type: "cancel";
|
|
71
|
+
id?: string;
|
|
72
|
+
}
|
|
73
|
+
/** Event definition for terminate end events. */
|
|
74
|
+
export interface BpmnTerminateEventDefinition {
|
|
75
|
+
type: "terminate";
|
|
76
|
+
id?: string;
|
|
77
|
+
}
|
|
78
|
+
/** Event definition for compensation boundary / throw events. */
|
|
79
|
+
export interface BpmnCompensateEventDefinition {
|
|
80
|
+
type: "compensate";
|
|
81
|
+
id?: string;
|
|
82
|
+
activityRef?: string;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Discriminated union of all BPMN event definition types.
|
|
86
|
+
* Narrowed via the `type` field (e.g. `"timer"`, `"error"`, `"message"`).
|
|
87
|
+
*/
|
|
88
|
+
export type BpmnEventDefinition = BpmnTimerEventDefinition | BpmnErrorEventDefinition | BpmnEscalationEventDefinition | BpmnMessageEventDefinition | BpmnSignalEventDefinition | BpmnConditionalEventDefinition | BpmnLinkEventDefinition | BpmnCancelEventDefinition | BpmnTerminateEventDefinition | BpmnCompensateEventDefinition;
|
|
89
|
+
/** Multi-instance loop configuration attached to a task or sub-process. */
|
|
90
|
+
export interface BpmnMultiInstanceLoopCharacteristics {
|
|
91
|
+
extensionElements: XmlElement[];
|
|
92
|
+
}
|
|
93
|
+
/** A FEEL condition expression on a sequence flow outgoing from a gateway. */
|
|
94
|
+
export interface BpmnConditionExpression {
|
|
95
|
+
text: string;
|
|
96
|
+
attributes: Record<string, string>;
|
|
97
|
+
}
|
|
98
|
+
interface BpmnFlowNodeBase {
|
|
99
|
+
id: string;
|
|
100
|
+
name?: string;
|
|
101
|
+
incoming: string[];
|
|
102
|
+
outgoing: string[];
|
|
103
|
+
documentation?: string;
|
|
104
|
+
extensionElements: XmlElement[];
|
|
105
|
+
unknownAttributes: Record<string, string>;
|
|
106
|
+
}
|
|
107
|
+
export interface BpmnStartEvent extends BpmnFlowNodeBase {
|
|
108
|
+
type: "startEvent";
|
|
109
|
+
eventDefinitions: BpmnEventDefinition[];
|
|
110
|
+
}
|
|
111
|
+
export interface BpmnEndEvent extends BpmnFlowNodeBase {
|
|
112
|
+
type: "endEvent";
|
|
113
|
+
eventDefinitions: BpmnEventDefinition[];
|
|
114
|
+
}
|
|
115
|
+
export interface BpmnIntermediateCatchEvent extends BpmnFlowNodeBase {
|
|
116
|
+
type: "intermediateCatchEvent";
|
|
117
|
+
eventDefinitions: BpmnEventDefinition[];
|
|
118
|
+
}
|
|
119
|
+
export interface BpmnIntermediateThrowEvent extends BpmnFlowNodeBase {
|
|
120
|
+
type: "intermediateThrowEvent";
|
|
121
|
+
eventDefinitions: BpmnEventDefinition[];
|
|
122
|
+
}
|
|
123
|
+
export interface BpmnBoundaryEvent extends BpmnFlowNodeBase {
|
|
124
|
+
type: "boundaryEvent";
|
|
125
|
+
attachedToRef: string;
|
|
126
|
+
cancelActivity?: boolean;
|
|
127
|
+
eventDefinitions: BpmnEventDefinition[];
|
|
128
|
+
}
|
|
129
|
+
export interface BpmnServiceTask extends BpmnFlowNodeBase {
|
|
130
|
+
type: "serviceTask";
|
|
131
|
+
loopCharacteristics?: BpmnMultiInstanceLoopCharacteristics;
|
|
132
|
+
}
|
|
133
|
+
export interface BpmnScriptTask extends BpmnFlowNodeBase {
|
|
134
|
+
type: "scriptTask";
|
|
135
|
+
loopCharacteristics?: BpmnMultiInstanceLoopCharacteristics;
|
|
136
|
+
}
|
|
137
|
+
export interface BpmnUserTask extends BpmnFlowNodeBase {
|
|
138
|
+
type: "userTask";
|
|
139
|
+
loopCharacteristics?: BpmnMultiInstanceLoopCharacteristics;
|
|
140
|
+
}
|
|
141
|
+
export interface BpmnBusinessRuleTask extends BpmnFlowNodeBase {
|
|
142
|
+
type: "businessRuleTask";
|
|
143
|
+
loopCharacteristics?: BpmnMultiInstanceLoopCharacteristics;
|
|
144
|
+
}
|
|
145
|
+
export interface BpmnCallActivity extends BpmnFlowNodeBase {
|
|
146
|
+
type: "callActivity";
|
|
147
|
+
loopCharacteristics?: BpmnMultiInstanceLoopCharacteristics;
|
|
148
|
+
}
|
|
149
|
+
export interface BpmnSendTask extends BpmnFlowNodeBase {
|
|
150
|
+
type: "sendTask";
|
|
151
|
+
loopCharacteristics?: BpmnMultiInstanceLoopCharacteristics;
|
|
152
|
+
}
|
|
153
|
+
export interface BpmnReceiveTask extends BpmnFlowNodeBase {
|
|
154
|
+
type: "receiveTask";
|
|
155
|
+
loopCharacteristics?: BpmnMultiInstanceLoopCharacteristics;
|
|
156
|
+
}
|
|
157
|
+
export interface BpmnAdHocSubProcess extends BpmnFlowNodeBase {
|
|
158
|
+
type: "adHocSubProcess";
|
|
159
|
+
loopCharacteristics?: BpmnMultiInstanceLoopCharacteristics;
|
|
160
|
+
flowElements: BpmnFlowElement[];
|
|
161
|
+
sequenceFlows: BpmnSequenceFlow[];
|
|
162
|
+
textAnnotations: BpmnTextAnnotation[];
|
|
163
|
+
associations: BpmnAssociation[];
|
|
164
|
+
}
|
|
165
|
+
export interface BpmnSubProcess extends BpmnFlowNodeBase {
|
|
166
|
+
type: "subProcess";
|
|
167
|
+
triggeredByEvent?: boolean;
|
|
168
|
+
loopCharacteristics?: BpmnMultiInstanceLoopCharacteristics;
|
|
169
|
+
flowElements: BpmnFlowElement[];
|
|
170
|
+
sequenceFlows: BpmnSequenceFlow[];
|
|
171
|
+
textAnnotations: BpmnTextAnnotation[];
|
|
172
|
+
associations: BpmnAssociation[];
|
|
173
|
+
}
|
|
174
|
+
export interface BpmnEventSubProcess extends BpmnFlowNodeBase {
|
|
175
|
+
type: "eventSubProcess";
|
|
176
|
+
flowElements: BpmnFlowElement[];
|
|
177
|
+
sequenceFlows: BpmnSequenceFlow[];
|
|
178
|
+
textAnnotations: BpmnTextAnnotation[];
|
|
179
|
+
associations: BpmnAssociation[];
|
|
180
|
+
}
|
|
181
|
+
export interface BpmnExclusiveGateway extends BpmnFlowNodeBase {
|
|
182
|
+
type: "exclusiveGateway";
|
|
183
|
+
default?: string;
|
|
184
|
+
}
|
|
185
|
+
export interface BpmnParallelGateway extends BpmnFlowNodeBase {
|
|
186
|
+
type: "parallelGateway";
|
|
187
|
+
}
|
|
188
|
+
export interface BpmnInclusiveGateway extends BpmnFlowNodeBase {
|
|
189
|
+
type: "inclusiveGateway";
|
|
190
|
+
default?: string;
|
|
191
|
+
}
|
|
192
|
+
export interface BpmnEventBasedGateway extends BpmnFlowNodeBase {
|
|
193
|
+
type: "eventBasedGateway";
|
|
194
|
+
}
|
|
195
|
+
export interface BpmnComplexGateway extends BpmnFlowNodeBase {
|
|
196
|
+
type: "complexGateway";
|
|
197
|
+
default?: string;
|
|
198
|
+
}
|
|
199
|
+
export interface BpmnTask extends BpmnFlowNodeBase {
|
|
200
|
+
type: "task";
|
|
201
|
+
loopCharacteristics?: BpmnMultiInstanceLoopCharacteristics;
|
|
202
|
+
}
|
|
203
|
+
export interface BpmnManualTask extends BpmnFlowNodeBase {
|
|
204
|
+
type: "manualTask";
|
|
205
|
+
loopCharacteristics?: BpmnMultiInstanceLoopCharacteristics;
|
|
206
|
+
}
|
|
207
|
+
export interface BpmnTransaction extends BpmnFlowNodeBase {
|
|
208
|
+
type: "transaction";
|
|
209
|
+
loopCharacteristics?: BpmnMultiInstanceLoopCharacteristics;
|
|
210
|
+
flowElements: BpmnFlowElement[];
|
|
211
|
+
sequenceFlows: BpmnSequenceFlow[];
|
|
212
|
+
textAnnotations: BpmnTextAnnotation[];
|
|
213
|
+
associations: BpmnAssociation[];
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Discriminated union of every BPMN flow node that can appear inside a
|
|
217
|
+
* {@link BpmnProcess}. Narrow with the `type` field or with the type guard
|
|
218
|
+
* helpers exported from `@bpmnkit/core` (e.g. `isBpmnServiceTask`).
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* ```typescript
|
|
222
|
+
* import { isBpmnServiceTask, isBpmnGateway } from "@bpmnkit/core"
|
|
223
|
+
*
|
|
224
|
+
* for (const el of process.flowElements) {
|
|
225
|
+
* if (isBpmnServiceTask(el)) console.log("job type:", el.extensionElements)
|
|
226
|
+
* if (isBpmnGateway(el)) console.log("gateway:", el.type)
|
|
227
|
+
* }
|
|
228
|
+
* ```
|
|
229
|
+
*/
|
|
230
|
+
export type BpmnFlowElement = BpmnStartEvent | BpmnEndEvent | BpmnIntermediateCatchEvent | BpmnIntermediateThrowEvent | BpmnBoundaryEvent | BpmnTask | BpmnServiceTask | BpmnScriptTask | BpmnUserTask | BpmnSendTask | BpmnReceiveTask | BpmnBusinessRuleTask | BpmnManualTask | BpmnCallActivity | BpmnSubProcess | BpmnAdHocSubProcess | BpmnEventSubProcess | BpmnTransaction | BpmnExclusiveGateway | BpmnParallelGateway | BpmnInclusiveGateway | BpmnEventBasedGateway | BpmnComplexGateway;
|
|
231
|
+
/** Backward-compat alias used by the layout module. */
|
|
232
|
+
export type BpmnFlowNode = BpmnFlowElement;
|
|
233
|
+
/**
|
|
234
|
+
* A directed connection between two flow nodes.
|
|
235
|
+
* Condition expressions on outgoing gateway flows are stored in
|
|
236
|
+
* `conditionExpression`.
|
|
237
|
+
*/
|
|
238
|
+
export interface BpmnSequenceFlow {
|
|
239
|
+
id: string;
|
|
240
|
+
name?: string;
|
|
241
|
+
sourceRef: string;
|
|
242
|
+
targetRef: string;
|
|
243
|
+
conditionExpression?: BpmnConditionExpression;
|
|
244
|
+
extensionElements: XmlElement[];
|
|
245
|
+
unknownAttributes: Record<string, string>;
|
|
246
|
+
}
|
|
247
|
+
/** A free-text annotation element attached to the diagram via an association. */
|
|
248
|
+
export interface BpmnTextAnnotation {
|
|
249
|
+
id: string;
|
|
250
|
+
text?: string;
|
|
251
|
+
unknownAttributes: Record<string, string>;
|
|
252
|
+
}
|
|
253
|
+
/** A directed or undirected link between a flow element and a text annotation. */
|
|
254
|
+
export interface BpmnAssociation {
|
|
255
|
+
id: string;
|
|
256
|
+
sourceRef: string;
|
|
257
|
+
targetRef: string;
|
|
258
|
+
associationDirection?: string;
|
|
259
|
+
unknownAttributes: Record<string, string>;
|
|
260
|
+
}
|
|
261
|
+
/** A swim lane within a pool (organises flow nodes visually). */
|
|
262
|
+
export interface BpmnLane {
|
|
263
|
+
id: string;
|
|
264
|
+
name?: string;
|
|
265
|
+
flowNodeRefs: string[];
|
|
266
|
+
childLaneSet?: BpmnLaneSet;
|
|
267
|
+
unknownAttributes: Record<string, string>;
|
|
268
|
+
}
|
|
269
|
+
/** Container for lanes within a pool or sub-process. */
|
|
270
|
+
export interface BpmnLaneSet {
|
|
271
|
+
id?: string;
|
|
272
|
+
lanes: BpmnLane[];
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* A BPMN process definition containing flow elements and sequence flows.
|
|
276
|
+
*
|
|
277
|
+
* - `flowElements` — all non-edge flow nodes (tasks, events, gateways,
|
|
278
|
+
* sub-processes). Use the type-guard helpers to narrow.
|
|
279
|
+
* - `sequenceFlows` — directed connections between flow nodes.
|
|
280
|
+
* - `textAnnotations` / `associations` — documentation annotations.
|
|
281
|
+
*/
|
|
282
|
+
export interface BpmnProcess {
|
|
283
|
+
id: string;
|
|
284
|
+
name?: string;
|
|
285
|
+
isExecutable?: boolean;
|
|
286
|
+
extensionElements: XmlElement[];
|
|
287
|
+
flowElements: BpmnFlowElement[];
|
|
288
|
+
sequenceFlows: BpmnSequenceFlow[];
|
|
289
|
+
textAnnotations: BpmnTextAnnotation[];
|
|
290
|
+
associations: BpmnAssociation[];
|
|
291
|
+
laneSet?: BpmnLaneSet;
|
|
292
|
+
unknownAttributes: Record<string, string>;
|
|
293
|
+
}
|
|
294
|
+
/** A participant (pool) in a BPMN collaboration diagram. */
|
|
295
|
+
export interface BpmnParticipant {
|
|
296
|
+
id: string;
|
|
297
|
+
name?: string;
|
|
298
|
+
processRef?: string;
|
|
299
|
+
unknownAttributes: Record<string, string>;
|
|
300
|
+
}
|
|
301
|
+
/** A message flow between participants in a collaboration. */
|
|
302
|
+
export interface BpmnMessageFlow {
|
|
303
|
+
id: string;
|
|
304
|
+
name?: string;
|
|
305
|
+
sourceRef: string;
|
|
306
|
+
targetRef: string;
|
|
307
|
+
unknownAttributes: Record<string, string>;
|
|
308
|
+
}
|
|
309
|
+
/** A BPMN collaboration element grouping multiple participants and their message flows. */
|
|
310
|
+
export interface BpmnCollaboration {
|
|
311
|
+
id: string;
|
|
312
|
+
participants: BpmnParticipant[];
|
|
313
|
+
messageFlows: BpmnMessageFlow[];
|
|
314
|
+
textAnnotations: BpmnTextAnnotation[];
|
|
315
|
+
associations: BpmnAssociation[];
|
|
316
|
+
extensionElements: XmlElement[];
|
|
317
|
+
unknownAttributes: Record<string, string>;
|
|
318
|
+
}
|
|
319
|
+
/** A root-level BPMN error definition referenced by error boundary events. */
|
|
320
|
+
export interface BpmnError {
|
|
321
|
+
id: string;
|
|
322
|
+
name?: string;
|
|
323
|
+
errorCode?: string;
|
|
324
|
+
}
|
|
325
|
+
/** A root-level BPMN escalation definition referenced by escalation events. */
|
|
326
|
+
export interface BpmnEscalation {
|
|
327
|
+
id: string;
|
|
328
|
+
name?: string;
|
|
329
|
+
escalationCode?: string;
|
|
330
|
+
}
|
|
331
|
+
/** A root-level BPMN message definition referenced by message events. */
|
|
332
|
+
export interface BpmnMessage {
|
|
333
|
+
id: string;
|
|
334
|
+
name?: string;
|
|
335
|
+
unknownAttributes: Record<string, string>;
|
|
336
|
+
}
|
|
337
|
+
/** Optional label positioning information for a BPMNDi shape or edge. */
|
|
338
|
+
export interface BpmnDiLabel {
|
|
339
|
+
bounds?: BpmnBounds;
|
|
340
|
+
}
|
|
341
|
+
/** BPMNDi layout shape — binds a flow element to its visual bounds on the canvas. */
|
|
342
|
+
export interface BpmnDiShape {
|
|
343
|
+
id: string;
|
|
344
|
+
bpmnElement: string;
|
|
345
|
+
isMarkerVisible?: boolean;
|
|
346
|
+
isExpanded?: boolean;
|
|
347
|
+
isHorizontal?: boolean;
|
|
348
|
+
bounds: BpmnBounds;
|
|
349
|
+
label?: BpmnDiLabel;
|
|
350
|
+
unknownAttributes: Record<string, string>;
|
|
351
|
+
}
|
|
352
|
+
/** BPMNDi layout edge — binds a sequence flow to its routed waypoints on the canvas. */
|
|
353
|
+
export interface BpmnDiEdge {
|
|
354
|
+
id: string;
|
|
355
|
+
bpmnElement: string;
|
|
356
|
+
waypoints: BpmnWaypoint[];
|
|
357
|
+
label?: BpmnDiLabel;
|
|
358
|
+
unknownAttributes: Record<string, string>;
|
|
359
|
+
}
|
|
360
|
+
/** The drawing plane for a BPMNDiagram — holds all shapes and edges. */
|
|
361
|
+
export interface BpmnDiPlane {
|
|
362
|
+
id: string;
|
|
363
|
+
bpmnElement: string;
|
|
364
|
+
shapes: BpmnDiShape[];
|
|
365
|
+
edges: BpmnDiEdge[];
|
|
366
|
+
}
|
|
367
|
+
/** A BPMNDiagram element grouping the visual layout for one process. */
|
|
368
|
+
export interface BpmnDiagram {
|
|
369
|
+
id: string;
|
|
370
|
+
plane: BpmnDiPlane;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* The root object of a parsed BPMN document — equivalent to `<bpmn:definitions>`.
|
|
374
|
+
*
|
|
375
|
+
* Obtain one via {@link Bpmn.parse} or {@link Bpmn.createProcess} + `.build()`.
|
|
376
|
+
* Serialise back to XML with {@link Bpmn.export}.
|
|
377
|
+
*
|
|
378
|
+
* @example
|
|
379
|
+
* ```typescript
|
|
380
|
+
* import { Bpmn } from "@bpmnkit/core"
|
|
381
|
+
*
|
|
382
|
+
* const defs: BpmnDefinitions = Bpmn.parse(xml)
|
|
383
|
+
* console.log(defs.processes[0].id)
|
|
384
|
+
* ```
|
|
385
|
+
*/
|
|
386
|
+
export interface BpmnDefinitions {
|
|
387
|
+
id: string;
|
|
388
|
+
targetNamespace: string;
|
|
389
|
+
exporter?: string;
|
|
390
|
+
exporterVersion?: string;
|
|
391
|
+
/** Namespace prefix → URI declarations (e.g. "bpmn" → "http://...") */
|
|
392
|
+
namespaces: Record<string, string>;
|
|
393
|
+
/** Namespace-qualified attributes not directly modeled */
|
|
394
|
+
unknownAttributes: Record<string, string>;
|
|
395
|
+
errors: BpmnError[];
|
|
396
|
+
escalations: BpmnEscalation[];
|
|
397
|
+
messages: BpmnMessage[];
|
|
398
|
+
collaborations: BpmnCollaboration[];
|
|
399
|
+
processes: BpmnProcess[];
|
|
400
|
+
diagrams: BpmnDiagram[];
|
|
401
|
+
}
|
|
402
|
+
export {};
|
|
403
|
+
//# sourceMappingURL=bpmn-model.d.ts.map
|