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<Model.Events.ErrorBoundaryEvent> {
    protected boundaryEventModel: Model.Events.ErrorBoundaryEvent;
    private triggerCallback;
    constructor(eventMiddlewareHandler: EventMiddlewareHandler, flowNodeInstanceDatabaseAdapter: FlowNodeInstanceDatabaseAdapter, flowNodeHandlerFactory: FlowNodeHandlerFactory, boundaryEventModel: Model.Events.ErrorBoundaryEvent, processInstance: ProcessInstance, processTokenOfAttachedFlowNode: Record<string, any>);
    /**
     * 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<void>;
    execute(onTriggeredCallback: BoundaryEventTriggerCallback, attachedFlowNodeInstanceId: string, decoratedFlowNodeRejectFunc: Function): Promise<void>;
    resume(boundaryEventInstance: FlowNodeInstance, onTriggeredCallback: BoundaryEventTriggerCallback, attachedFlowNodeInstanceId: string, decoratedFlowNodeRejectFunc: Function, flowNodeInstances?: Array<FlowNodeInstance>): Promise<void>;
    private waitForError;
    private checkIfErrorMatches;
}
