import { BpmnError, FlowNodeInstance, Model } from '@5minds/processcube_engine_sdk'; import { FlowNodeInstanceDatabaseAdapter } from '../../../Tools/DatabaseAdaptersSequelize/index'; import { EventMiddlewareHandler } from '../../../Tools/EventMiddlewareHandler'; import { ProcessInstance } from '../../ProcessInstance'; import { FlowNodeHandlerFactory } from '../FlowNodeHandlerFactory'; import { BoundaryEventHandler, BoundaryEventTriggerCallback } from './BoundaryEventHandler'; export declare class ErrorBoundaryEventHandler extends BoundaryEventHandler { protected boundaryEventModel: Model.Events.ErrorBoundaryEvent; private triggerCallback; constructor(eventMiddlewareHandler: EventMiddlewareHandler, flowNodeInstanceDatabaseAdapter: FlowNodeInstanceDatabaseAdapter, flowNodeHandlerFactory: FlowNodeHandlerFactory, boundaryEventModel: Model.Events.ErrorBoundaryEvent, processInstance: ProcessInstance, processTokenOfAttachedFlowNode: Record); /** * Checks if the code of the given error is equal to the one attached to the BoundaryEvent model. * * @param error The error to compare against the errorEventDefinition of the model. * @returns True, if the BoundaryEvent can handle the given error. * Otherwise false. */ canHandleError(error: BpmnError): boolean; trigger(error: BpmnError): Promise; execute(onTriggeredCallback: BoundaryEventTriggerCallback, attachedFlowNodeInstanceId: string, decoratedFlowNodeRejectFunc: Function): Promise; resume(boundaryEventInstance: FlowNodeInstance, onTriggeredCallback: BoundaryEventTriggerCallback, attachedFlowNodeInstanceId: string, decoratedFlowNodeRejectFunc: Function, flowNodeInstances?: Array): Promise; private waitForError; private checkIfErrorMatches; }