export type EventType = `bpmn:${'MessageEventDefinition' | 'ErrorEventDefinition' | 'TimerEventDefinition' | 'TerminateEventDefinition' | 'LinkEventDefinition' | 'EscalationEventDefinition' | 'SignalEventDefinition' | 'CompensateEventDefinition'}`; export type FlowNodeType = `bpmn:${'StartEvent' | 'EndEvent' | 'IntermediateCatchEvent' | 'IntermediateThrowEvent' | 'EventBasedGateway' | 'ParallelGateway' | 'ExclusiveGateway' | 'InclusiveGateway' | 'SubProcess' | 'ServiceTask' | 'UserTask' | 'BusinessRuleTask' | 'ScriptTask' | 'ReceiveTask' | 'SendTask' | 'ManualTask' | 'CallActivity' | 'BoundaryEvent'}`; export type ElementType = FlowNodeType | 'label' | `bpmn:${'Process' | 'SequenceFlow' | 'Association'}`; export type BusinessObject = { id: string; name: string; $type: ElementType; isInterrupting?: boolean; $parent?: BusinessObject; sourceRef?: BusinessObject; incoming?: BusinessObject[]; flowElements?: BusinessObject[]; loopCharacteristics?: { $type: string; isSequential: boolean; }; extensionElements?: { values: { $type: string; $children?: { $type: string; source: string; target: string; }[]; }[]; }; eventDefinitions?: { $type: EventType; }[]; cancelActivity?: boolean; triggeredByEvent?: boolean; $instanceOf?: (type: string) => boolean; isForCompensation?: boolean; targetRef?: BusinessObject; }; export type BpmnElement = { id: string; type: ElementType; businessObject: BusinessObject; di: { set: (key: string, value: any) => void; }; width: number; height: number; waypoints?: { x: number; y: number; }[]; }; export type Event = { element: BpmnElement; gfx: SVGElement; }; export type State = 'active' | 'completed' | 'canceled' | 'incident';