@bpmnkit/core 0.2.0 → 0.4.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/dist/bpmn/bpmn-builder.d.ts +71 -0
- package/dist/bpmn/bpmn-builder.js +240 -106
- package/dist/bpmn/bpmn-serializer.js +70 -0
- package/dist/bpmn/builder-coverage.d.ts +59 -0
- package/dist/bpmn/builder-coverage.js +62 -0
- package/dist/bpmn/compact.d.ts +6 -0
- package/dist/bpmn/compact.js +37 -2
- package/dist/bpmn/diagram-diff.d.ts +71 -0
- package/dist/bpmn/diagram-diff.js +124 -0
- package/dist/bpmn/element-catalog.d.ts +31 -0
- package/dist/bpmn/element-catalog.js +50 -0
- package/dist/bpmn/element-shape.d.ts +49 -0
- package/dist/bpmn/element-shape.js +182 -0
- package/dist/bpmn/lint.d.ts +97 -0
- package/dist/bpmn/lint.js +135 -0
- package/dist/bpmn/preserving-writer.d.ts +64 -0
- package/dist/bpmn/preserving-writer.js +70 -0
- package/dist/bpmn/stable-ids.d.ts +30 -0
- package/dist/bpmn/stable-ids.js +134 -0
- package/dist/dmn/dmn-serializer.js +7 -2
- package/dist/dmn/preserving-writer.d.ts +31 -0
- package/dist/dmn/preserving-writer.js +36 -0
- package/dist/form/preserving-writer.d.ts +47 -0
- package/dist/form/preserving-writer.js +50 -0
- package/dist/index.d.ts +15 -1
- package/dist/index.js +9 -1
- package/dist/json/index.d.ts +5 -0
- package/dist/json/index.js +3 -0
- package/dist/json/json-patch.d.ts +65 -0
- package/dist/json/json-patch.js +416 -0
- package/dist/json/json-spans.d.ts +48 -0
- package/dist/json/json-spans.js +153 -0
- package/dist/layout/types.js +4 -0
- package/dist/xml/index.d.ts +5 -1
- package/dist/xml/index.js +2 -0
- package/dist/xml/xml-parser.d.ts +39 -0
- package/dist/xml/xml-parser.js +43 -2
- package/dist/xml/xml-patch.d.ts +109 -0
- package/dist/xml/xml-patch.js +459 -0
- package/dist/xml/xml-spans.d.ts +45 -0
- package/dist/xml/xml-spans.js +74 -0
- package/package.json +2 -1
|
@@ -388,6 +388,8 @@ export declare class BranchBuilder {
|
|
|
388
388
|
receiveTask(id: string, options?: MessageTaskOptions): this;
|
|
389
389
|
businessRuleTask(id: string, options?: BusinessRuleTaskOptions): this;
|
|
390
390
|
callActivity(id: string, options: CallActivityOptions): this;
|
|
391
|
+
/** Add a manual task — work performed outside the engine, with no job worker. */
|
|
392
|
+
manualTask(id: string, options?: ElementOptions): this;
|
|
391
393
|
/** Add an abstract task with no Zeebe extensions. */
|
|
392
394
|
task(id: string, options?: ElementOptions): this;
|
|
393
395
|
startEvent(id?: string, options?: StartEventOptions): this;
|
|
@@ -398,6 +400,7 @@ export declare class BranchBuilder {
|
|
|
398
400
|
parallelGateway(id: string, options?: ElementOptions): this;
|
|
399
401
|
inclusiveGateway(id: string, options?: GatewayOptions): this;
|
|
400
402
|
eventBasedGateway(id: string, options?: ElementOptions): this;
|
|
403
|
+
complexGateway(id: string, options?: GatewayOptions): this;
|
|
401
404
|
/**
|
|
402
405
|
* Add a boundary event attached to an existing activity in this branch.
|
|
403
406
|
*
|
|
@@ -418,6 +421,8 @@ export declare class BranchBuilder {
|
|
|
418
421
|
withBoundary(id: string, options: Omit<BoundaryEventOptions, "attachedTo">, handler: (b: BranchBuilder) => void): this;
|
|
419
422
|
/** Add a sub-process (mirrors `ProcessBuilder.subProcess`). */
|
|
420
423
|
subProcess(id: string, content: (b: SubProcessContentBuilder) => void, options?: SubProcessOptions): this;
|
|
424
|
+
/** Add a transaction sub-process (mirrors `ProcessBuilder.transaction`). */
|
|
425
|
+
transaction(id: string, content: (b: SubProcessContentBuilder) => void, options?: SubProcessOptions): this;
|
|
421
426
|
/** Add an ad-hoc sub-process (mirrors `ProcessBuilder.adHocSubProcess`). */
|
|
422
427
|
adHocSubProcess(id: string, content: (b: SubProcessContentBuilder) => void, options?: AdHocSubProcessOptions): this;
|
|
423
428
|
/** Add an event sub-process. Triggered by its start event — no incoming or outgoing sequence flows. */
|
|
@@ -471,12 +476,15 @@ export declare class SubProcessContentBuilder {
|
|
|
471
476
|
callActivity(id: string, options: CallActivityOptions): this;
|
|
472
477
|
sendTask(id: string, options?: MessageTaskOptions): this;
|
|
473
478
|
receiveTask(id: string, options?: MessageTaskOptions): this;
|
|
479
|
+
/** Add a manual task — work performed outside the engine, with no job worker. */
|
|
480
|
+
manualTask(id: string, options?: ElementOptions): this;
|
|
474
481
|
/** Add an abstract task with no Zeebe extensions. */
|
|
475
482
|
task(id: string, options?: ElementOptions): this;
|
|
476
483
|
exclusiveGateway(id: string, options?: GatewayOptions): this;
|
|
477
484
|
parallelGateway(id: string, options?: ElementOptions): this;
|
|
478
485
|
inclusiveGateway(id: string, options?: GatewayOptions): this;
|
|
479
486
|
eventBasedGateway(id: string, options?: ElementOptions): this;
|
|
487
|
+
complexGateway(id: string, options?: GatewayOptions): this;
|
|
480
488
|
/** Attach a text annotation to the element at the current cursor position. */
|
|
481
489
|
textAnnotation(text: string): this;
|
|
482
490
|
/** Attach a text annotation to an element by explicit ID. */
|
|
@@ -504,6 +512,8 @@ export declare class SubProcessContentBuilder {
|
|
|
504
512
|
withBoundary(id: string, options: Omit<BoundaryEventOptions, "attachedTo">, handler: (b: SubProcessContentBuilder) => void): this;
|
|
505
513
|
/** Add a sub-process nested inside this sub-process's content. */
|
|
506
514
|
subProcess(id: string, content: (b: SubProcessContentBuilder) => void, options?: SubProcessOptions): this;
|
|
515
|
+
/** Add a transaction sub-process nested inside this sub-process's content. */
|
|
516
|
+
transaction(id: string, content: (b: SubProcessContentBuilder) => void, options?: SubProcessOptions): this;
|
|
507
517
|
/** Add an ad-hoc sub-process nested inside this sub-process's content. */
|
|
508
518
|
adHocSubProcess(id: string, content: (b: SubProcessContentBuilder) => void, options?: AdHocSubProcessOptions): this;
|
|
509
519
|
/** Add an event sub-process. Triggered by its start event — no incoming or outgoing sequence flows. */
|
|
@@ -614,6 +624,61 @@ export declare class ProcessBuilder {
|
|
|
614
624
|
executable(value: boolean): this;
|
|
615
625
|
/** Set the process version tag. */
|
|
616
626
|
versionTag(tag: string): this;
|
|
627
|
+
/**
|
|
628
|
+
* Declares the root `bpmn:message` for a message name, with the id you choose.
|
|
629
|
+
*
|
|
630
|
+
* Events name messages by name — `{ messageName: "Order Received" }` — and the
|
|
631
|
+
* builder declares one on first use, deriving its id from that name. Call this
|
|
632
|
+
* first when the id itself matters, typically because something outside this
|
|
633
|
+
* process already refers to it.
|
|
634
|
+
*
|
|
635
|
+
* @param id - The message's element id, used verbatim.
|
|
636
|
+
* @throws If a message with this name is already declared under another id,
|
|
637
|
+
* which the events built before this call already point at.
|
|
638
|
+
* @example
|
|
639
|
+
* ```typescript
|
|
640
|
+
* Bpmn.createProcess("orders")
|
|
641
|
+
* .message("Msg_OrderReceived", { name: "Order Received" })
|
|
642
|
+
* .startEvent("start", { messageName: "Order Received" })
|
|
643
|
+
* ```
|
|
644
|
+
*/
|
|
645
|
+
message(id: string, options: {
|
|
646
|
+
name: string;
|
|
647
|
+
}): this;
|
|
648
|
+
/**
|
|
649
|
+
* Declares the root `bpmn:error` for an error code, with the id you choose.
|
|
650
|
+
*
|
|
651
|
+
* @param id - The error's element id, used verbatim.
|
|
652
|
+
* @param options - The `code` events match on, and the display `name`, which
|
|
653
|
+
* defaults to the code.
|
|
654
|
+
* @throws If this code is already declared under another id.
|
|
655
|
+
*/
|
|
656
|
+
error(id: string, options: {
|
|
657
|
+
code: string;
|
|
658
|
+
name?: string;
|
|
659
|
+
}): this;
|
|
660
|
+
/**
|
|
661
|
+
* Declares the root `bpmn:signal` for a signal name, with the id you choose.
|
|
662
|
+
*
|
|
663
|
+
* @param id - The signal's element id, used verbatim.
|
|
664
|
+
* @throws If this name is already declared under another id.
|
|
665
|
+
*/
|
|
666
|
+
signal(id: string, options: {
|
|
667
|
+
name: string;
|
|
668
|
+
}): this;
|
|
669
|
+
/**
|
|
670
|
+
* Declares the root `bpmn:escalation` for an escalation code, with the id you
|
|
671
|
+
* choose.
|
|
672
|
+
*
|
|
673
|
+
* @param id - The escalation's element id, used verbatim.
|
|
674
|
+
* @param options - The `code` events match on, and the display `name`, which
|
|
675
|
+
* defaults to the code.
|
|
676
|
+
* @throws If this code is already declared under another id.
|
|
677
|
+
*/
|
|
678
|
+
escalation(id: string, options: {
|
|
679
|
+
code: string;
|
|
680
|
+
name?: string;
|
|
681
|
+
}): this;
|
|
617
682
|
/** Add a start event. Start events never auto-connect from the previous element. */
|
|
618
683
|
startEvent(id?: string, options?: StartEventOptions): this;
|
|
619
684
|
/**
|
|
@@ -668,6 +733,8 @@ export declare class ProcessBuilder {
|
|
|
668
733
|
businessRuleTask(id: string, options?: BusinessRuleTaskOptions): this;
|
|
669
734
|
/** Add a call activity referencing another process. */
|
|
670
735
|
callActivity(id: string, options: CallActivityOptions): this;
|
|
736
|
+
/** Add a manual task — work performed outside the engine, with no job worker. */
|
|
737
|
+
manualTask(id: string, options?: ElementOptions): this;
|
|
671
738
|
/** Add an abstract task with no Zeebe extensions. */
|
|
672
739
|
task(id: string, options?: ElementOptions): this;
|
|
673
740
|
/** Add an exclusive gateway (XOR split/join). */
|
|
@@ -678,6 +745,8 @@ export declare class ProcessBuilder {
|
|
|
678
745
|
inclusiveGateway(id: string, options?: GatewayOptions): this;
|
|
679
746
|
/** Add an event-based gateway. Aspirational. */
|
|
680
747
|
eventBasedGateway(id: string, options?: ElementOptions): this;
|
|
748
|
+
/** Add a complex gateway. Aspirational — Zeebe does not execute these. */
|
|
749
|
+
complexGateway(id: string, options?: GatewayOptions): this;
|
|
681
750
|
/**
|
|
682
751
|
* Create a named branch from the current gateway.
|
|
683
752
|
*
|
|
@@ -709,6 +778,8 @@ export declare class ProcessBuilder {
|
|
|
709
778
|
adHocSubProcess(id: string, content: (b: SubProcessContentBuilder) => void, options?: AdHocSubProcessOptions): this;
|
|
710
779
|
/** Add a sub-process (aspirational). */
|
|
711
780
|
subProcess(id: string, content: (b: SubProcessContentBuilder) => void, options?: SubProcessOptions): this;
|
|
781
|
+
/** Add a transaction sub-process — a sub-process with atomic semantics. */
|
|
782
|
+
transaction(id: string, content: (b: SubProcessContentBuilder) => void, options?: SubProcessOptions): this;
|
|
712
783
|
/** Add an event sub-process. Triggered by its start event — no incoming or outgoing sequence flows. */
|
|
713
784
|
eventSubProcess(id: string, content: (b: SubProcessContentBuilder) => void, options?: ElementOptions): this;
|
|
714
785
|
/** Attach a text annotation to the element at the current cursor position. */
|