UNPKG

@5minds/processcube_engine

Version:

The ProcessCube Engine. Stores and executes BPMNs.

28 lines (27 loc) 1.91 kB
import { Container } from 'inversify'; import { MiddlewareCallback } from '@5minds/processcube_engine_sdk'; export declare function initialize(iocContainer: Container): void; export declare function registerEventMiddleware<TPayload extends object>(callback: MiddlewareCallback<TPayload>): void; /** * Registers the given callback as an Event Middleware for BPMN Message Events. * * @param messageName Optional: The name of the message to listen for. * If set, the callback will only be executed when messages with the given name are received. * @param callback The callback to execute, when a MessageEvent was received. * @param eventType Optional: The EventType to listen for. * Either 'OnFlowNodeEntered', 'OnFlowNodeExited' or 'OnMessageTriggered' (default). * The callback will only be executed when events with the given EventType are received. */ export declare function registerMessageEventMiddleware<TPayload extends object>(...args: Array<any>): void; /** * Registers the given callback as an Event Middleware for BPMN Signal Events. * * @param signalName Optional: The name of the signal to listen for. * If set, the callback will only be executed when signals with the given name are received. * @param callback The callback to execute, when a SignalEvent was received. * @param eventType Optional: The EventType to listen for. * Either 'OnFlowNodeEntered', 'OnFlowNodeExited' or 'OnSignalTriggered' (default). * The callback will only be executed when events with the given EventType are received. */ export declare function registerSignalEventMiddleware<TPayload extends object>(...args: Array<any>): void; export declare function removeEventMiddleware(callbackToRemove: MiddlewareCallback<never>): Promise<void>;