import { RuntimeExpressionParameters } from '..'; import { BaseElementViewModel, BpmnType } from '../ProcessModel/index'; export declare enum LogLevel { trace = "trace", debug = "debug", info = "info", warn = "warn", error = "error" } export declare type EngineEventList = { logEntries: Array; totalCount: number; }; /** * Describes an Event fired by the Engine. */ export declare type EngineEvent = { eventId?: string; eventType: EngineEventType; logLevel: LogLevel; timestamp: Date; processStartedAt?: Date; processFinishedAt?: Date; flowNodeEnteredAt?: Date; flowNodeExitedAt?: Date; processModelId: string; embeddedProcessModelId?: string; processModelName: string; processDefinitionId: string; processDefinitionHash: string; processInstanceId: string; parentProcessInstanceId?: string; correlationId: string; /** * Only included with OnFlowNodeXX events. */ flowNodeId?: string; /** * Only included with OnFlowNodeXX events. */ flowNodeName?: string; /** * Only included with OnFlowNodeXX events. */ flowNodeInstanceId?: string; /** * Only included with OnFlowNodeXX events. */ flowNodeType?: BpmnType; /** * Introduced with Engine v18.4.1. * * Only included with OnFlowNodeXX events and only for Flow Nodes that are actually located on a lane. */ flowNodeLane?: string; /** * Only included with OnFlowNodeXX events. */ currentFlowNode?: BaseElementViewModel; /** * For "OnFlowNodeXX" Events, this will contain the current token on the FlowNodeInstance. * For "OnProcessXX" Events, this will contain either the ProcessInstance's initial token, or its end token. */ tokenPayload?: Record; /** * Only included with OnFlowNodeExited events. */ writtenDataObjectValues?: Record; /** * Only included with OnFlowNodeEntered events. */ writtenCorrelationMetadata?: Record; /** * Only included with OnFlowNodeEntered events. */ writtenProcessInstanceMetadata?: Record; /** * Only and not always included with OnFlowNodeEntered and OnProcessStarted events. */ triggeredByFlowNodeInstanceId?: string; /** * Only included with OnProcessFinished events. */ endEventType?: string; messageChannel?: string; signalChannel?: string; }; export declare type EngineEventContext = FlowNodeExpressionEngineEventContext | undefined; export declare type FlowNodeExpressionEngineEventContext = { executeRuntimeExpression: (expression: string, params: RuntimeExpressionParameters) => Promise; getParametersForRuntimeExpression: (expression: string, params?: RuntimeExpressionParameters) => Promise; }; /** * Contains definitions for all supported event types */ export declare enum EngineEventType { OnEventProcessed = "OnEventProcessed", OnMessageTriggered = "OnMessageTriggered", OnSignalTriggered = "OnSignalTriggered", OnProcessDeployed = "OnProcessDeployed", OnProcessUndeployed = "OnProcessUndeployed", OnProcessStarting = "OnProcessStarting", OnProcessStarted = "OnProcessStarted", OnProcessFinished = "OnProcessFinished", onProcessError = "onProcessError", OnProcessTerminated = "OnProcessTerminated", OnProcessResumed = "OnProcessResumed", OnFlowNodeEntered = "OnFlowNodeEntered", OnFlowNodeCanceled = "OnFlowNodeCanceled", OnFlowNodeExited = "OnFlowNodeExited", OnFlowNodeSuspended = "OnFlowNodeSuspended", OnFlowNodeResumed = "OnFlowNodeResumed", OnFlowNodeError = "OnFlowNodeError", OnFlowNodeTerminated = "OnFlowNodeTerminated", OnFlowNodeCallActivityResponseReceived = "OnFlowNodeCallActivityResponseReceived", OnFlowNodeSubProcessResponseReceived = "OnFlowNodeSubProcessResponseReceived", OnFlowNodeTimerStarted = "OnFlowNodeTimerStarted", OnFlowNodeTimerRemoved = "OnFlowNodeTimerRemoved" } export declare type CreateEngineEventRequest = EngineEvent;