import { BaseElement, FlowNode } from '../Base/index'; import { BpmnType, EventType } from '../Constants'; /** * The base type for all events. */ export type Event = FlowNode & { readonly eventType: EventType; }; export type StartEvent = Event & { readonly bpmnType: BpmnType.startEvent; /** * A list of all outgoing sequence flow IDs. */ outgoing: Array; /** * Optional: If set, the Flow Node Instance will only continue, if the given expression results into a value, which matches the value from triggerValueInEventPayload. * Start-, Boundary- and Catch- Events only. */ triggerValueInToken?: string; /** * Optional: If set, the Flow Node Instance will only continue, if the given expression results into a value, which matches the value from triggerValueInToken. * Start-, Boundary- and Catch- Events only. */ triggerValueInEventPayload?: string; /** * Indicates whether the event interrupts the current process flow when triggered. Defaults to true if not specified. */ isInterrupting: boolean; }; export type EndEvent = Event & { readonly bpmnType: BpmnType.endEvent; /** * A list of all incoming sequence flow IDs. */ incoming: Array; /** * The DataContract to validate the payload. */ dataContract?: string; /** * When sending messages or signals, this property can hold a * definition for a payload to send with the event. * * Use this, if you do not want to use the current ProcessToken as event * payload. */ inputValues?: any; /** * Optional: * When sending messages or signals, any process instance started with the message/signal will use this correlation id. */ customCorrelationId?: any; }; export type IntermediateCatchEvent = Event & { readonly bpmnType: BpmnType.intermediateCatchEvent; /** * A list of all incoming sequence flow IDs. */ incoming: Array; /** * A list of all outgoing sequence flow IDs. */ outgoing: Array; /** * Optional: If set, the Flow Node Instance will only continue, if the given expression results into a value, which matches the value from triggerValueInEventPayload. * Start-, Boundary- and Catch- Events only. */ triggerValueInToken?: string; /** * Optional: If set, the Flow Node Instance will only continue, if the given expression results into a value, which matches the value from triggerValueInToken. * Start-, Boundary- and Catch- Events only. */ triggerValueInEventPayload?: string; }; export type IntermediateThrowEvent = Event & { readonly bpmnType: BpmnType.intermediateThrowEvent; /** * A list of all incoming sequence flow IDs. */ incoming: Array; /** * A list of all outgoing sequence flow IDs. */ outgoing: Array; /** * The DataContract to validate the payload. */ dataContract?: string; /** * When sending messages or signals, this property can hold a * definition for a payload to send with the event. * * Use this, if you do not want to use the current ProcessToken as event * payload. */ inputValues?: any; /** * Optional: * When sending messages or signals, any process instance started with the message/signal will use this correlation id. */ customCorrelationId?: any; }; export type BoundaryEvent = Event & { readonly bpmnType: BpmnType.boundaryEvent; /** * A list of all incoming sequence flow IDs. */ incoming: Array; /** * A list of all outgoing sequence flow IDs. */ outgoing: Array; /** * If set to true, raising this event will cause the activity to cease all operations. */ cancelActivity: boolean; /** * Contains the ID of the activity to which this event is attached. */ attachedToRef: string; /** * Optional: If set, the Flow Node Instance will only continue, if the given expression results into a value, which matches the value from triggerValueInEventPayload. * Start-, Boundary- and Catch- Events only. */ triggerValueInToken?: string; /** * Optional: If set, the Flow Node Instance will only continue, if the given expression results into a value, which matches the value from triggerValueInToken. * Start-, Boundary- and Catch- Events only. */ triggerValueInEventPayload?: string; }; /** * The base of all event definitions. */ export type EventDefinition = BaseElement & {};