@aranzatech/diagrams-bpmn 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/dist/chunk-23B2IGK5.js +24 -0
- package/dist/chunk-23B2IGK5.js.map +1 -0
- package/dist/chunk-3AFZDIMQ.js +286 -0
- package/dist/chunk-3AFZDIMQ.js.map +1 -0
- package/dist/chunk-4OAEWYYU.js +579 -0
- package/dist/chunk-4OAEWYYU.js.map +1 -0
- package/dist/chunk-57LA2WSJ.js +476 -0
- package/dist/chunk-57LA2WSJ.js.map +1 -0
- package/dist/chunk-6TUC5QX5.js +491 -0
- package/dist/chunk-6TUC5QX5.js.map +1 -0
- package/dist/chunk-MLUJKUTG.js +86 -0
- package/dist/chunk-MLUJKUTG.js.map +1 -0
- package/dist/chunk-NXMUX67A.js +1443 -0
- package/dist/chunk-NXMUX67A.js.map +1 -0
- package/dist/edges/index.cjs +300 -0
- package/dist/edges/index.cjs.map +1 -0
- package/dist/edges/index.d.cts +17 -0
- package/dist/edges/index.d.ts +17 -0
- package/dist/edges/index.js +4 -0
- package/dist/edges/index.js.map +1 -0
- package/dist/elements/index.cjs +587 -0
- package/dist/elements/index.cjs.map +1 -0
- package/dist/elements/index.d.cts +20 -0
- package/dist/elements/index.d.ts +20 -0
- package/dist/elements/index.js +4 -0
- package/dist/elements/index.js.map +1 -0
- package/dist/index.cjs +3442 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +67 -0
- package/dist/index.d.ts +67 -0
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -0
- package/dist/nodes/index.cjs +1487 -0
- package/dist/nodes/index.cjs.map +1 -0
- package/dist/nodes/index.d.cts +45 -0
- package/dist/nodes/index.d.ts +45 -0
- package/dist/nodes/index.js +4 -0
- package/dist/nodes/index.js.map +1 -0
- package/dist/simulation/index.cjs +483 -0
- package/dist/simulation/index.cjs.map +1 -0
- package/dist/simulation/index.d.cts +62 -0
- package/dist/simulation/index.d.ts +62 -0
- package/dist/simulation/index.js +3 -0
- package/dist/simulation/index.js.map +1 -0
- package/dist/types-CxzazgBX.d.cts +111 -0
- package/dist/types-CxzazgBX.d.ts +111 -0
- package/dist/xml/index.cjs +1068 -0
- package/dist/xml/index.cjs.map +1 -0
- package/dist/xml/index.d.cts +24 -0
- package/dist/xml/index.d.ts +24 -0
- package/dist/xml/index.js +4 -0
- package/dist/xml/index.js.map +1 -0
- package/package.json +84 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
type SimVariables = Record<string, string | number | boolean>;
|
|
2
|
+
|
|
3
|
+
interface SimNode {
|
|
4
|
+
id: string;
|
|
5
|
+
type: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
parentId?: string;
|
|
8
|
+
/** BoundaryEvent only — the task/subprocess this event is attached to. */
|
|
9
|
+
attachedToRef?: string;
|
|
10
|
+
/** BoundaryEvent: true = interrupting (default), false = non-interrupting. */
|
|
11
|
+
isInterrupting?: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface SimEdge {
|
|
14
|
+
id: string;
|
|
15
|
+
type: string;
|
|
16
|
+
source: string;
|
|
17
|
+
target: string;
|
|
18
|
+
conditionExpression?: string;
|
|
19
|
+
isDefault?: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface SimDiagram {
|
|
22
|
+
nodes: SimNode[];
|
|
23
|
+
edges: SimEdge[];
|
|
24
|
+
}
|
|
25
|
+
interface SimToken {
|
|
26
|
+
id: string;
|
|
27
|
+
/** The element the token currently occupies. */
|
|
28
|
+
elementId: string;
|
|
29
|
+
/**
|
|
30
|
+
* The subprocess scope this token belongs to.
|
|
31
|
+
* "root" for top-level tokens; the subprocess node id for child tokens.
|
|
32
|
+
*/
|
|
33
|
+
scopeId: string;
|
|
34
|
+
}
|
|
35
|
+
type SimStatus = "idle" | "running" | "completed" | "deadlocked";
|
|
36
|
+
type SimLogType = "created" | "fired" | "split" | "joined" | "consumed" | "blocked" | "deadlocked" | "interrupted";
|
|
37
|
+
interface SimLogEntry {
|
|
38
|
+
step: number;
|
|
39
|
+
type: SimLogType;
|
|
40
|
+
elementId: string;
|
|
41
|
+
tokenId?: string;
|
|
42
|
+
message: string;
|
|
43
|
+
}
|
|
44
|
+
interface SimulationState {
|
|
45
|
+
tokens: SimToken[];
|
|
46
|
+
step: number;
|
|
47
|
+
status: SimStatus;
|
|
48
|
+
log: SimLogEntry[];
|
|
49
|
+
/** Process-level variables used for gateway condition evaluation. */
|
|
50
|
+
variables: Record<string, string | number | boolean>;
|
|
51
|
+
/** IDs of subprocess nodes whose internal execution has started. */
|
|
52
|
+
enteredScopes: string[];
|
|
53
|
+
}
|
|
54
|
+
declare function createSimulation(diagram: SimDiagram, initialVariables?: Record<string, string | number | boolean>): SimulationState;
|
|
55
|
+
declare function tick(diagram: SimDiagram, state: SimulationState): SimulationState;
|
|
56
|
+
declare function fire(diagram: SimDiagram, state: SimulationState, elementId: string, variables?: Record<string, string | number | boolean>): SimulationState;
|
|
57
|
+
declare function getFireable(diagram: SimDiagram, state: SimulationState): string[];
|
|
58
|
+
declare function isCompleted(state: SimulationState): boolean;
|
|
59
|
+
/** Set or update a process variable without advancing the simulation. */
|
|
60
|
+
declare function setVariable(state: SimulationState, key: string, value: string | number | boolean): SimulationState;
|
|
61
|
+
|
|
62
|
+
export { type SimDiagram, type SimEdge, type SimLogEntry, type SimLogType, type SimNode, type SimStatus, type SimToken, type SimVariables, type SimulationState, createSimulation, fire, getFireable, isCompleted, setVariable, tick };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
type BpmnCategory = "event" | "task" | "gateway" | "container" | "artifact" | "data" | "conversation" | "choreography";
|
|
2
|
+
type BpmnHandlePolicy = "all" | "source" | "target" | "none";
|
|
3
|
+
type BpmnOrientation = "horizontal" | "vertical" | "free";
|
|
4
|
+
type BpmnEventSemantics = "start" | "intermediateCatch" | "intermediateThrow" | "boundary" | "end";
|
|
5
|
+
type BpmnElementType = "StartEvent" | "EndEvent" | "IntermediateCatchEvent" | "IntermediateThrowEvent" | "BoundaryEvent" | "Task" | "UserTask" | "ServiceTask" | "ScriptTask" | "ManualTask" | "BusinessRuleTask" | "ReceiveTask" | "SendTask" | "CallActivity" | "ExclusiveGateway" | "InclusiveGateway" | "ParallelGateway" | "EventBasedGateway" | "ComplexGateway" | "SubProcess" | "Pool" | "Lane" | "Annotation" | "Group" | "DataObject" | "DataObjectReference" | "DataInput" | "DataOutput" | "DataStore" | "DataStoreReference" | "Conversation" | "SubConversation" | "CallConversation" | "ChoreographyTask" | "SubChoreography" | "CallChoreography";
|
|
6
|
+
type BpmnEdgeType = "sequenceFlow" | "messageFlow" | "association" | "dataAssociation" | "conversationLink";
|
|
7
|
+
type EventTrigger = "none" | "message" | "timer" | "escalation" | "conditional" | "error" | "cancel" | "compensation" | "signal" | "link" | "terminate" | "multiple" | "parallelMultiple";
|
|
8
|
+
type TaskMarker = "loop" | "parallelMultiple" | "sequentialMultiple" | "compensation";
|
|
9
|
+
type SubProcessVariant = "embedded" | "event" | "transaction" | "adhoc";
|
|
10
|
+
interface BpmnElementMeta {
|
|
11
|
+
label: string;
|
|
12
|
+
category: BpmnCategory;
|
|
13
|
+
defaultWidth: number;
|
|
14
|
+
defaultHeight: number;
|
|
15
|
+
/** Default handle exposure for the rendered node shape. */
|
|
16
|
+
handlePolicy: BpmnHandlePolicy;
|
|
17
|
+
/** Preferred orientation when the element acts as a container. */
|
|
18
|
+
orientation: BpmnOrientation;
|
|
19
|
+
/** Node can contain other nodes (Pool, Lane, SubProcess). */
|
|
20
|
+
isContainer: boolean;
|
|
21
|
+
/** Node can be rendered in a collapsed form (+ marker). */
|
|
22
|
+
supportsCollapse?: boolean;
|
|
23
|
+
/** Node can display BPMN instance markers (loop, multi-instance, compensation). */
|
|
24
|
+
supportsMarkers?: boolean;
|
|
25
|
+
/** Node can have boundary events attached. */
|
|
26
|
+
acceptsBoundaryEvents: boolean;
|
|
27
|
+
/** Event-specific rendering semantics, when applicable. */
|
|
28
|
+
eventSemantics?: BpmnEventSemantics;
|
|
29
|
+
/** Node is valid as a process entry (0 incoming sequence flows allowed). */
|
|
30
|
+
canBeStart: boolean;
|
|
31
|
+
/** Node is valid as a process exit (0 outgoing sequence flows allowed). */
|
|
32
|
+
canBeEnd: boolean;
|
|
33
|
+
/** Max number of incoming sequence flows. undefined = unlimited. */
|
|
34
|
+
maxIncoming?: number;
|
|
35
|
+
/** Max number of outgoing sequence flows. undefined = unlimited. */
|
|
36
|
+
maxOutgoing?: number;
|
|
37
|
+
}
|
|
38
|
+
interface BpmnNodeData extends Record<string, unknown> {
|
|
39
|
+
label?: string;
|
|
40
|
+
elementType: BpmnElementType;
|
|
41
|
+
/** Preferred visual orientation for containers like pools and lanes. */
|
|
42
|
+
orientation?: BpmnOrientation;
|
|
43
|
+
/** Override fill and stroke from the standard palette. */
|
|
44
|
+
color?: {
|
|
45
|
+
fill: string;
|
|
46
|
+
stroke: string;
|
|
47
|
+
};
|
|
48
|
+
/** Event trigger symbol rendered inside the event circle. */
|
|
49
|
+
trigger?: EventTrigger;
|
|
50
|
+
/** True for non-interrupting boundary events / event sub-process starts. */
|
|
51
|
+
isNonInterrupting?: boolean;
|
|
52
|
+
/** Task instance markers shown at the bottom of the task box. */
|
|
53
|
+
markers?: TaskMarker[];
|
|
54
|
+
/** Sub-process structural variant (defaults to "embedded"). */
|
|
55
|
+
subProcessVariant?: SubProcessVariant;
|
|
56
|
+
/** True when a container/sub-process is expanded in-place. */
|
|
57
|
+
isExpanded?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Choreography participant bands (ordered top → bottom).
|
|
60
|
+
* The initiating participant band is rendered with a white background;
|
|
61
|
+
* responding participant bands are rendered filled.
|
|
62
|
+
*/
|
|
63
|
+
participants?: Array<{
|
|
64
|
+
name: string;
|
|
65
|
+
isInitiating: boolean;
|
|
66
|
+
}>;
|
|
67
|
+
/**
|
|
68
|
+
* True when a DataObject / DataObjectReference represents a collection
|
|
69
|
+
* (renders three parallel lines at the bottom, per BPMN 2.0 §10.3.1).
|
|
70
|
+
*/
|
|
71
|
+
isCollection?: boolean;
|
|
72
|
+
/** aranzaflows namespace extensions. */
|
|
73
|
+
priority?: "critical" | "high" | "medium" | "low";
|
|
74
|
+
owner?: string;
|
|
75
|
+
/** ISO 8601 duration, e.g. "PT4H". */
|
|
76
|
+
sla?: string;
|
|
77
|
+
/** flowable:assignee — UEL expression or static user id. */
|
|
78
|
+
flowableAssignee?: string;
|
|
79
|
+
/** flowable:candidateGroups — comma-separated group ids or UEL expression. */
|
|
80
|
+
flowableCandidateGroups?: string;
|
|
81
|
+
/** flowable:candidateUsers — comma-separated user ids or UEL expression. */
|
|
82
|
+
flowableCandidateUsers?: string;
|
|
83
|
+
/** flowable:formKey — form definition key (for UserTask / StartEvent). */
|
|
84
|
+
flowableFormKey?: string;
|
|
85
|
+
/** flowable:dueDate — UEL expression resolving to a Date. */
|
|
86
|
+
flowableDueDate?: string;
|
|
87
|
+
/** flowable:type — service task type: "http" | "mail" | "camel" | "mule". */
|
|
88
|
+
flowableType?: string;
|
|
89
|
+
/** flowable:expression — UEL expression for ServiceTask / SequenceFlow. */
|
|
90
|
+
flowableExpression?: string;
|
|
91
|
+
/** flowable:class — fully-qualified Java class name for ServiceTask. */
|
|
92
|
+
flowableClass?: string;
|
|
93
|
+
/** flowable:delegateExpression — UEL expression resolving to a JavaDelegate. */
|
|
94
|
+
flowableDelegateExpression?: string;
|
|
95
|
+
}
|
|
96
|
+
interface BpmnEdgeData extends Record<string, unknown> {
|
|
97
|
+
label?: string;
|
|
98
|
+
edgeType: BpmnEdgeType;
|
|
99
|
+
conditionExpression?: string;
|
|
100
|
+
/** Sequence flow marked as the default path of a gateway/activity. */
|
|
101
|
+
isDefault?: boolean;
|
|
102
|
+
/** Directionality for associations. */
|
|
103
|
+
associationDirection?: "none" | "one" | "both";
|
|
104
|
+
/** Routing points produced by ELK. */
|
|
105
|
+
routingPoints?: Array<{
|
|
106
|
+
x: number;
|
|
107
|
+
y: number;
|
|
108
|
+
}>;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export type { BpmnCategory as B, EventTrigger as E, SubProcessVariant as S, TaskMarker as T, BpmnEdgeData as a, BpmnEdgeType as b, BpmnElementMeta as c, BpmnElementType as d, BpmnEventSemantics as e, BpmnHandlePolicy as f, BpmnNodeData as g, BpmnOrientation as h };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
type BpmnCategory = "event" | "task" | "gateway" | "container" | "artifact" | "data" | "conversation" | "choreography";
|
|
2
|
+
type BpmnHandlePolicy = "all" | "source" | "target" | "none";
|
|
3
|
+
type BpmnOrientation = "horizontal" | "vertical" | "free";
|
|
4
|
+
type BpmnEventSemantics = "start" | "intermediateCatch" | "intermediateThrow" | "boundary" | "end";
|
|
5
|
+
type BpmnElementType = "StartEvent" | "EndEvent" | "IntermediateCatchEvent" | "IntermediateThrowEvent" | "BoundaryEvent" | "Task" | "UserTask" | "ServiceTask" | "ScriptTask" | "ManualTask" | "BusinessRuleTask" | "ReceiveTask" | "SendTask" | "CallActivity" | "ExclusiveGateway" | "InclusiveGateway" | "ParallelGateway" | "EventBasedGateway" | "ComplexGateway" | "SubProcess" | "Pool" | "Lane" | "Annotation" | "Group" | "DataObject" | "DataObjectReference" | "DataInput" | "DataOutput" | "DataStore" | "DataStoreReference" | "Conversation" | "SubConversation" | "CallConversation" | "ChoreographyTask" | "SubChoreography" | "CallChoreography";
|
|
6
|
+
type BpmnEdgeType = "sequenceFlow" | "messageFlow" | "association" | "dataAssociation" | "conversationLink";
|
|
7
|
+
type EventTrigger = "none" | "message" | "timer" | "escalation" | "conditional" | "error" | "cancel" | "compensation" | "signal" | "link" | "terminate" | "multiple" | "parallelMultiple";
|
|
8
|
+
type TaskMarker = "loop" | "parallelMultiple" | "sequentialMultiple" | "compensation";
|
|
9
|
+
type SubProcessVariant = "embedded" | "event" | "transaction" | "adhoc";
|
|
10
|
+
interface BpmnElementMeta {
|
|
11
|
+
label: string;
|
|
12
|
+
category: BpmnCategory;
|
|
13
|
+
defaultWidth: number;
|
|
14
|
+
defaultHeight: number;
|
|
15
|
+
/** Default handle exposure for the rendered node shape. */
|
|
16
|
+
handlePolicy: BpmnHandlePolicy;
|
|
17
|
+
/** Preferred orientation when the element acts as a container. */
|
|
18
|
+
orientation: BpmnOrientation;
|
|
19
|
+
/** Node can contain other nodes (Pool, Lane, SubProcess). */
|
|
20
|
+
isContainer: boolean;
|
|
21
|
+
/** Node can be rendered in a collapsed form (+ marker). */
|
|
22
|
+
supportsCollapse?: boolean;
|
|
23
|
+
/** Node can display BPMN instance markers (loop, multi-instance, compensation). */
|
|
24
|
+
supportsMarkers?: boolean;
|
|
25
|
+
/** Node can have boundary events attached. */
|
|
26
|
+
acceptsBoundaryEvents: boolean;
|
|
27
|
+
/** Event-specific rendering semantics, when applicable. */
|
|
28
|
+
eventSemantics?: BpmnEventSemantics;
|
|
29
|
+
/** Node is valid as a process entry (0 incoming sequence flows allowed). */
|
|
30
|
+
canBeStart: boolean;
|
|
31
|
+
/** Node is valid as a process exit (0 outgoing sequence flows allowed). */
|
|
32
|
+
canBeEnd: boolean;
|
|
33
|
+
/** Max number of incoming sequence flows. undefined = unlimited. */
|
|
34
|
+
maxIncoming?: number;
|
|
35
|
+
/** Max number of outgoing sequence flows. undefined = unlimited. */
|
|
36
|
+
maxOutgoing?: number;
|
|
37
|
+
}
|
|
38
|
+
interface BpmnNodeData extends Record<string, unknown> {
|
|
39
|
+
label?: string;
|
|
40
|
+
elementType: BpmnElementType;
|
|
41
|
+
/** Preferred visual orientation for containers like pools and lanes. */
|
|
42
|
+
orientation?: BpmnOrientation;
|
|
43
|
+
/** Override fill and stroke from the standard palette. */
|
|
44
|
+
color?: {
|
|
45
|
+
fill: string;
|
|
46
|
+
stroke: string;
|
|
47
|
+
};
|
|
48
|
+
/** Event trigger symbol rendered inside the event circle. */
|
|
49
|
+
trigger?: EventTrigger;
|
|
50
|
+
/** True for non-interrupting boundary events / event sub-process starts. */
|
|
51
|
+
isNonInterrupting?: boolean;
|
|
52
|
+
/** Task instance markers shown at the bottom of the task box. */
|
|
53
|
+
markers?: TaskMarker[];
|
|
54
|
+
/** Sub-process structural variant (defaults to "embedded"). */
|
|
55
|
+
subProcessVariant?: SubProcessVariant;
|
|
56
|
+
/** True when a container/sub-process is expanded in-place. */
|
|
57
|
+
isExpanded?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Choreography participant bands (ordered top → bottom).
|
|
60
|
+
* The initiating participant band is rendered with a white background;
|
|
61
|
+
* responding participant bands are rendered filled.
|
|
62
|
+
*/
|
|
63
|
+
participants?: Array<{
|
|
64
|
+
name: string;
|
|
65
|
+
isInitiating: boolean;
|
|
66
|
+
}>;
|
|
67
|
+
/**
|
|
68
|
+
* True when a DataObject / DataObjectReference represents a collection
|
|
69
|
+
* (renders three parallel lines at the bottom, per BPMN 2.0 §10.3.1).
|
|
70
|
+
*/
|
|
71
|
+
isCollection?: boolean;
|
|
72
|
+
/** aranzaflows namespace extensions. */
|
|
73
|
+
priority?: "critical" | "high" | "medium" | "low";
|
|
74
|
+
owner?: string;
|
|
75
|
+
/** ISO 8601 duration, e.g. "PT4H". */
|
|
76
|
+
sla?: string;
|
|
77
|
+
/** flowable:assignee — UEL expression or static user id. */
|
|
78
|
+
flowableAssignee?: string;
|
|
79
|
+
/** flowable:candidateGroups — comma-separated group ids or UEL expression. */
|
|
80
|
+
flowableCandidateGroups?: string;
|
|
81
|
+
/** flowable:candidateUsers — comma-separated user ids or UEL expression. */
|
|
82
|
+
flowableCandidateUsers?: string;
|
|
83
|
+
/** flowable:formKey — form definition key (for UserTask / StartEvent). */
|
|
84
|
+
flowableFormKey?: string;
|
|
85
|
+
/** flowable:dueDate — UEL expression resolving to a Date. */
|
|
86
|
+
flowableDueDate?: string;
|
|
87
|
+
/** flowable:type — service task type: "http" | "mail" | "camel" | "mule". */
|
|
88
|
+
flowableType?: string;
|
|
89
|
+
/** flowable:expression — UEL expression for ServiceTask / SequenceFlow. */
|
|
90
|
+
flowableExpression?: string;
|
|
91
|
+
/** flowable:class — fully-qualified Java class name for ServiceTask. */
|
|
92
|
+
flowableClass?: string;
|
|
93
|
+
/** flowable:delegateExpression — UEL expression resolving to a JavaDelegate. */
|
|
94
|
+
flowableDelegateExpression?: string;
|
|
95
|
+
}
|
|
96
|
+
interface BpmnEdgeData extends Record<string, unknown> {
|
|
97
|
+
label?: string;
|
|
98
|
+
edgeType: BpmnEdgeType;
|
|
99
|
+
conditionExpression?: string;
|
|
100
|
+
/** Sequence flow marked as the default path of a gateway/activity. */
|
|
101
|
+
isDefault?: boolean;
|
|
102
|
+
/** Directionality for associations. */
|
|
103
|
+
associationDirection?: "none" | "one" | "both";
|
|
104
|
+
/** Routing points produced by ELK. */
|
|
105
|
+
routingPoints?: Array<{
|
|
106
|
+
x: number;
|
|
107
|
+
y: number;
|
|
108
|
+
}>;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export type { BpmnCategory as B, EventTrigger as E, SubProcessVariant as S, TaskMarker as T, BpmnEdgeData as a, BpmnEdgeType as b, BpmnElementMeta as c, BpmnElementType as d, BpmnEventSemantics as e, BpmnHandlePolicy as f, BpmnNodeData as g, BpmnOrientation as h };
|