@bpmnkit/core 0.1.2 → 0.2.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 +30 -1
- package/dist/bpmn/bpmn-builder.d.ts +209 -3
- package/dist/bpmn/bpmn-builder.js +456 -16
- package/dist/bpmn/bpmn-model.d.ts +110 -0
- package/dist/bpmn/bpmn-parser.js +1413 -528
- package/dist/bpmn/bpmn-serializer.js +101 -19
- package/dist/bpmn/compact.d.ts +17 -2
- package/dist/bpmn/compact.js +3 -3
- package/dist/bpmn/full-operations.d.ts +89 -0
- package/dist/bpmn/full-operations.js +478 -0
- package/dist/bpmn/index.d.ts +19 -0
- package/dist/bpmn/index.js +21 -0
- package/dist/bpmn/optimize/feel.js +2 -2
- package/dist/bpmn/optimize/patterns.js +23 -16
- package/dist/bpmn/optimize/tasks.js +30 -7
- package/dist/bpmn/optimize/utils.js +2 -4
- package/dist/bpmn/optimize/variable-flow.js +58 -67
- package/dist/bpmn/semantic-hash.d.ts +93 -0
- package/dist/bpmn/semantic-hash.js +155 -0
- package/dist/bpmn/sha256.d.ts +17 -0
- package/dist/bpmn/sha256.js +95 -0
- package/dist/bpmn/zeebe-extensions.d.ts +56 -0
- package/dist/bpmn/zeebe-extensions.js +79 -0
- package/dist/bpmn/zeebe-placement.d.ts +12 -0
- package/dist/bpmn/zeebe-placement.js +140 -0
- package/dist/errors.d.ts +40 -1
- package/dist/errors.js +41 -0
- package/dist/index.d.ts +10 -4
- package/dist/index.js +7 -3
- package/dist/layout/semantic/graph.d.ts +9 -1
- package/dist/layout/semantic/graph.js +42 -17
- package/dist/layout/semantic/route.js +102 -42
- package/dist/node/index.d.ts +10 -0
- package/dist/node/index.js +9 -0
- package/dist/node/write.d.ts +81 -0
- package/dist/node/write.js +167 -0
- package/dist/types/id-generator.js +11 -3
- package/dist/xml/index.d.ts +3 -1
- package/dist/xml/index.js +2 -1
- package/dist/xml/xml-parser.d.ts +32 -0
- package/dist/xml/xml-parser.js +394 -143
- package/package.json +8 -1
|
@@ -90,7 +90,16 @@ export type BpmnEventDefinition = BpmnTimerEventDefinition | BpmnErrorEventDefin
|
|
|
90
90
|
export interface BpmnMultiInstanceLoopCharacteristics {
|
|
91
91
|
/** When true, iterations run one at a time (sequential). When false or absent, runs in parallel. */
|
|
92
92
|
isSequential?: boolean;
|
|
93
|
+
/** How many instances to create. Losing this turns a bounded loop into an unbounded one. */
|
|
94
|
+
loopCardinality?: BpmnConditionExpression;
|
|
95
|
+
/** Stops the loop early once it evaluates true. */
|
|
96
|
+
completionCondition?: BpmnConditionExpression;
|
|
93
97
|
extensionElements: XmlElement[];
|
|
98
|
+
/**
|
|
99
|
+
* Children the SDK does not model, kept verbatim and re-emitted after the
|
|
100
|
+
* modelled ones so a round trip cannot silently discard them.
|
|
101
|
+
*/
|
|
102
|
+
unknownChildren?: XmlElement[];
|
|
94
103
|
}
|
|
95
104
|
/** A FEEL condition expression on a sequence flow outgoing from a gateway. */
|
|
96
105
|
export interface BpmnConditionExpression {
|
|
@@ -106,6 +115,17 @@ interface BpmnFlowNodeBase {
|
|
|
106
115
|
extensionElements: XmlElement[];
|
|
107
116
|
unknownAttributes: Record<string, string>;
|
|
108
117
|
isForCompensation?: boolean;
|
|
118
|
+
/** `bpmn:property` children — placeholders data input associations target. */
|
|
119
|
+
properties?: BpmnProperty[];
|
|
120
|
+
/** `bpmn:dataInputAssociation` children. */
|
|
121
|
+
dataInputAssociations?: BpmnDataAssociation[];
|
|
122
|
+
/** `bpmn:dataOutputAssociation` children. */
|
|
123
|
+
dataOutputAssociations?: BpmnDataAssociation[];
|
|
124
|
+
/**
|
|
125
|
+
* Children the SDK does not model, kept verbatim and re-emitted after the
|
|
126
|
+
* modelled ones so a round trip cannot silently discard them.
|
|
127
|
+
*/
|
|
128
|
+
unknownChildren?: XmlElement[];
|
|
109
129
|
}
|
|
110
130
|
export interface BpmnStartEvent extends BpmnFlowNodeBase {
|
|
111
131
|
type: "startEvent";
|
|
@@ -278,10 +298,39 @@ export interface BpmnSequenceFlow {
|
|
|
278
298
|
extensionElements: XmlElement[];
|
|
279
299
|
unknownAttributes: Record<string, string>;
|
|
280
300
|
}
|
|
301
|
+
/**
|
|
302
|
+
* A `bpmn:property` on a flow node. Modellers emit one per data input
|
|
303
|
+
* association as the association's `targetRef` placeholder.
|
|
304
|
+
*/
|
|
305
|
+
export interface BpmnProperty {
|
|
306
|
+
id?: string;
|
|
307
|
+
name?: string;
|
|
308
|
+
itemSubjectRef?: string;
|
|
309
|
+
unknownAttributes: Record<string, string>;
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* A `dataInputAssociation` or `dataOutputAssociation` — the wiring between a
|
|
313
|
+
* flow node and a data object, data store or property.
|
|
314
|
+
*/
|
|
315
|
+
export interface BpmnDataAssociation {
|
|
316
|
+
id?: string;
|
|
317
|
+
/** Ids named by `<bpmn:sourceRef>` child elements. */
|
|
318
|
+
sourceRefs: string[];
|
|
319
|
+
/** Id named by the `<bpmn:targetRef>` child element. */
|
|
320
|
+
targetRef?: string;
|
|
321
|
+
unknownAttributes: Record<string, string>;
|
|
322
|
+
/**
|
|
323
|
+
* Children the SDK does not model, kept verbatim and re-emitted after the
|
|
324
|
+
* modelled ones so a round trip cannot silently discard them.
|
|
325
|
+
*/
|
|
326
|
+
unknownChildren?: XmlElement[];
|
|
327
|
+
}
|
|
281
328
|
/** A free-text annotation element attached to the diagram via an association. */
|
|
282
329
|
export interface BpmnTextAnnotation {
|
|
283
330
|
id: string;
|
|
284
331
|
text?: string;
|
|
332
|
+
documentation?: string;
|
|
333
|
+
extensionElements?: XmlElement[];
|
|
285
334
|
unknownAttributes: Record<string, string>;
|
|
286
335
|
}
|
|
287
336
|
/** A directed or undirected link between a flow element and a text annotation. */
|
|
@@ -290,6 +339,8 @@ export interface BpmnAssociation {
|
|
|
290
339
|
sourceRef: string;
|
|
291
340
|
targetRef: string;
|
|
292
341
|
associationDirection?: string;
|
|
342
|
+
documentation?: string;
|
|
343
|
+
extensionElements?: XmlElement[];
|
|
293
344
|
unknownAttributes: Record<string, string>;
|
|
294
345
|
}
|
|
295
346
|
/** A group artifact — a dashed rounded rectangle visually grouping elements. */
|
|
@@ -297,6 +348,21 @@ export interface BpmnGroup {
|
|
|
297
348
|
id: string;
|
|
298
349
|
/** Id of the `categoryValue` supplying the group's label, if any. */
|
|
299
350
|
categoryValueRef?: string;
|
|
351
|
+
documentation?: string;
|
|
352
|
+
extensionElements?: XmlElement[];
|
|
353
|
+
unknownAttributes: Record<string, string>;
|
|
354
|
+
}
|
|
355
|
+
/** A label a {@link BpmnGroup} can point at through `categoryValueRef`. */
|
|
356
|
+
export interface BpmnCategoryValue {
|
|
357
|
+
id: string;
|
|
358
|
+
value?: string;
|
|
359
|
+
unknownAttributes: Record<string, string>;
|
|
360
|
+
}
|
|
361
|
+
/** A root-level container of {@link BpmnCategoryValue}s — the source of group labels. */
|
|
362
|
+
export interface BpmnCategory {
|
|
363
|
+
id?: string;
|
|
364
|
+
name?: string;
|
|
365
|
+
categoryValues: BpmnCategoryValue[];
|
|
300
366
|
unknownAttributes: Record<string, string>;
|
|
301
367
|
}
|
|
302
368
|
/** A swim lane within a pool (organises flow nodes visually). */
|
|
@@ -305,12 +371,16 @@ export interface BpmnLane {
|
|
|
305
371
|
name?: string;
|
|
306
372
|
flowNodeRefs: string[];
|
|
307
373
|
childLaneSet?: BpmnLaneSet;
|
|
374
|
+
documentation?: string;
|
|
375
|
+
extensionElements?: XmlElement[];
|
|
308
376
|
unknownAttributes: Record<string, string>;
|
|
309
377
|
}
|
|
310
378
|
/** Container for lanes within a pool or sub-process. */
|
|
311
379
|
export interface BpmnLaneSet {
|
|
312
380
|
id?: string;
|
|
381
|
+
name?: string;
|
|
313
382
|
lanes: BpmnLane[];
|
|
383
|
+
unknownAttributes?: Record<string, string>;
|
|
314
384
|
}
|
|
315
385
|
/**
|
|
316
386
|
* A BPMN process definition containing flow elements and sequence flows.
|
|
@@ -324,6 +394,7 @@ export interface BpmnProcess {
|
|
|
324
394
|
id: string;
|
|
325
395
|
name?: string;
|
|
326
396
|
isExecutable?: boolean;
|
|
397
|
+
documentation?: string;
|
|
327
398
|
extensionElements: XmlElement[];
|
|
328
399
|
flowElements: BpmnFlowElement[];
|
|
329
400
|
sequenceFlows: BpmnSequenceFlow[];
|
|
@@ -332,12 +403,19 @@ export interface BpmnProcess {
|
|
|
332
403
|
groups: BpmnGroup[];
|
|
333
404
|
laneSet?: BpmnLaneSet;
|
|
334
405
|
unknownAttributes: Record<string, string>;
|
|
406
|
+
/**
|
|
407
|
+
* Children the SDK does not model, kept verbatim and re-emitted after the
|
|
408
|
+
* modelled ones so a round trip cannot silently discard them.
|
|
409
|
+
*/
|
|
410
|
+
unknownChildren?: XmlElement[];
|
|
335
411
|
}
|
|
336
412
|
/** A participant (pool) in a BPMN collaboration diagram. */
|
|
337
413
|
export interface BpmnParticipant {
|
|
338
414
|
id: string;
|
|
339
415
|
name?: string;
|
|
340
416
|
processRef?: string;
|
|
417
|
+
documentation?: string;
|
|
418
|
+
extensionElements?: XmlElement[];
|
|
341
419
|
unknownAttributes: Record<string, string>;
|
|
342
420
|
}
|
|
343
421
|
/** A message flow between participants in a collaboration. */
|
|
@@ -346,6 +424,10 @@ export interface BpmnMessageFlow {
|
|
|
346
424
|
name?: string;
|
|
347
425
|
sourceRef: string;
|
|
348
426
|
targetRef: string;
|
|
427
|
+
/** Id of the {@link BpmnMessage} carried by this flow. */
|
|
428
|
+
messageRef?: string;
|
|
429
|
+
documentation?: string;
|
|
430
|
+
extensionElements?: XmlElement[];
|
|
349
431
|
unknownAttributes: Record<string, string>;
|
|
350
432
|
}
|
|
351
433
|
/** A BPMN collaboration element grouping multiple participants and their message flows. */
|
|
@@ -358,29 +440,49 @@ export interface BpmnCollaboration {
|
|
|
358
440
|
groups: BpmnGroup[];
|
|
359
441
|
extensionElements: XmlElement[];
|
|
360
442
|
unknownAttributes: Record<string, string>;
|
|
443
|
+
/**
|
|
444
|
+
* Children the SDK does not model, kept verbatim and re-emitted after the
|
|
445
|
+
* modelled ones so a round trip cannot silently discard them.
|
|
446
|
+
*/
|
|
447
|
+
unknownChildren?: XmlElement[];
|
|
361
448
|
}
|
|
362
449
|
/** A root-level BPMN error definition referenced by error boundary events. */
|
|
363
450
|
export interface BpmnError {
|
|
364
451
|
id: string;
|
|
365
452
|
name?: string;
|
|
366
453
|
errorCode?: string;
|
|
454
|
+
documentation?: string;
|
|
455
|
+
extensionElements?: XmlElement[];
|
|
456
|
+
unknownAttributes?: Record<string, string>;
|
|
367
457
|
}
|
|
368
458
|
/** A root-level BPMN escalation definition referenced by escalation events. */
|
|
369
459
|
export interface BpmnEscalation {
|
|
370
460
|
id: string;
|
|
371
461
|
name?: string;
|
|
372
462
|
escalationCode?: string;
|
|
463
|
+
documentation?: string;
|
|
464
|
+
extensionElements?: XmlElement[];
|
|
465
|
+
unknownAttributes?: Record<string, string>;
|
|
373
466
|
}
|
|
374
467
|
/** A root-level BPMN message definition referenced by message events. */
|
|
375
468
|
export interface BpmnMessage {
|
|
376
469
|
id: string;
|
|
377
470
|
name?: string;
|
|
471
|
+
documentation?: string;
|
|
472
|
+
/**
|
|
473
|
+
* Carries `zeebe:subscription`, whose `correlationKey` is what Camunda 8
|
|
474
|
+
* correlates published messages on.
|
|
475
|
+
*/
|
|
476
|
+
extensionElements?: XmlElement[];
|
|
378
477
|
unknownAttributes: Record<string, string>;
|
|
379
478
|
}
|
|
380
479
|
/** A root-level BPMN signal definition referenced by signal catch/throw events. */
|
|
381
480
|
export interface BpmnSignal {
|
|
382
481
|
id: string;
|
|
383
482
|
name?: string;
|
|
483
|
+
documentation?: string;
|
|
484
|
+
extensionElements?: XmlElement[];
|
|
485
|
+
unknownAttributes?: Record<string, string>;
|
|
384
486
|
}
|
|
385
487
|
/** Optional label positioning information for a BPMNDi shape or edge. */
|
|
386
488
|
export interface BpmnDiLabel {
|
|
@@ -440,6 +542,9 @@ export interface BpmnDefinitions {
|
|
|
440
542
|
namespaces: Record<string, string>;
|
|
441
543
|
/** Namespace-qualified attributes not directly modeled */
|
|
442
544
|
unknownAttributes: Record<string, string>;
|
|
545
|
+
documentation?: string;
|
|
546
|
+
/** Root-level category containers supplying {@link BpmnGroup} labels. */
|
|
547
|
+
categories?: BpmnCategory[];
|
|
443
548
|
errors: BpmnError[];
|
|
444
549
|
escalations: BpmnEscalation[];
|
|
445
550
|
messages: BpmnMessage[];
|
|
@@ -447,6 +552,11 @@ export interface BpmnDefinitions {
|
|
|
447
552
|
collaborations: BpmnCollaboration[];
|
|
448
553
|
processes: BpmnProcess[];
|
|
449
554
|
diagrams: BpmnDiagram[];
|
|
555
|
+
/**
|
|
556
|
+
* Children the SDK does not model, kept verbatim and re-emitted after the
|
|
557
|
+
* modelled ones so a round trip cannot silently discard them.
|
|
558
|
+
*/
|
|
559
|
+
unknownChildren?: XmlElement[];
|
|
450
560
|
}
|
|
451
561
|
export {};
|
|
452
562
|
//# sourceMappingURL=bpmn-model.d.ts.map
|