import { Execution } from '../'; import { ServerComponent } from '../server/ServerComponent'; import { IEngine } from "../interfaces"; declare class Engine extends ServerComponent implements IEngine { runningCounter: number; callsCounter: number; constructor(server: any); /** * loads a definitions and start execution * * @param name name of the process to start * @param data input data * @param startNodeId in process has multiple start node; you need to specify which one */ start(name: any, data?: any, startNodeId?: string, userName?: string, options?: {}): Promise; restart(itemQuery: any, data: any, userName: any, options?: {}): Promise; /** * restores an instance into memeory or provides you access to a running instance * * this will also resume execution * * @param instanceQuery criteria to fetch the instance * * query example: * * ```jsonl * { id: instanceId} * { data: {caseId: 1005}} * { items.id : 'abcc111322'} * { items.itemKey : 'businesskey here'} * ``` */ get(instanceQuery: any): Promise; /** lock instance */ private lock; /** release instance lock */ private release; /*** Loads instance into memory for purpose of execution Locks instance first if required check if in cache */ private restore; invokeItem(itemQuery: any, data?: {}): Promise; /** * update an existing item that is in a wait state with an assignment * can modify data or assignment or both * * ------------------------------------------------- * * @param itemQuery criteria to retrieve the item * @param data */ assign(itemQuery: any, data: {}, assignment: {}, userName: string, options?: {}): Promise; /** * Continue an existing item that is in a wait state * * ------------------------------------------------- * * scenario: * * ``` * itemId {itemId: value } * itemKey {itemKey: value} * instance,task {instanceId: instanceId, elementId: value } * ``` * * @param itemQuery criteria to retrieve the item * @param data */ invoke(itemQuery: any, data?: {}, userName?: string, options?: {}): Promise; /** * * Repeat Timers need to create new Item * @param instanceId * @param elementId * @param data */ startRepeatTimerEvent(instanceId: any, prevItem: any, data?: {}, options?: {}): Promise; /** * * Invoking an event (usually start event of a secondary process) against an existing instance * or * Invoking a start event (of a secondary process) against an existing instance * ---------------------------------------------------------------------------- * instance,task *``` * {instanceId: instanceId, elementId: value } *``` * * @param instanceId * @param elementId * @param data */ startEvent(instanceId: any, elementId: any, data?: {}, userName?: string, options?: {}): Promise; throwMessage(messageId: any, data?: {}, matchingQuery?: {}): Promise; /** * * signal/message raise a signal or throw a message * * will seach for a matching event/task given the signalId/messageId * * that can be againt a running instance or it may start a new instance * ---------------------------------------------------------------------------- * @param messageId the id of the message or signal as per bpmn definition * @param matchingQuery should match the itemKey (if specified) * @param data message data */ throwSignal(signalId: any, data?: {}, matchingQuery?: {}): Promise; status(): { running: number; calls: number; }; /** * * @param model * @param afterNodeIds */ upgrade(model: string, afterNodeIds: string[]): Promise; private exception; private sanitizeData; } export { Engine };