@5minds/processcube_engine
Version:
The ProcessCube Engine. Stores and executes BPMNs.
39 lines (38 loc) • 2.4 kB
TypeScript
import { Identity, Model } from '@5minds/processcube_engine_sdk';
import { ProcessDefinitionRaw, ProcessDefinitionRawList } from '../../Contracts/InternalDataModels/index';
import { EventMiddlewareHandler } from '../EventMiddlewareHandler';
import { DatabaseAdapter } from './BaseDatabaseAdapter';
export declare class ProcessDefinitionDatabaseAdapter extends DatabaseAdapter {
private readonly eventMiddlewareHandler;
constructor(eventMiddlewareHandler: EventMiddlewareHandler);
initialize(): Promise<void>;
persistProcessDefinition(identity: Identity, definition: Array<Model.Definitions> | Model.Definitions, overwriteExisting?: boolean): Promise<void>;
getAllProcessDefinitions(offset?: number, limit?: number, includeCount?: boolean, excludeDeleted?: boolean): Promise<ProcessDefinitionRawList>;
getByName(name: string, excludeDeleted?: boolean): Promise<ProcessDefinitionRaw>;
getByHash(hash: string, includeDeleted?: boolean): Promise<ProcessDefinitionRaw>;
getByProcessModelId(processModelId: string): Promise<ProcessDefinitionRaw>;
getDefinitionsWithRunningInstances(processModelIds?: string | Array<string>): Promise<ProcessDefinitionRawList>;
getByProcessInstanceId(processInstanceId: string): Promise<ProcessDefinitionRaw>;
getHistoryByName(name: string): Promise<Array<ProcessDefinitionRaw>>;
/**
* Flags all stored XMLs with the given name, as deleted.
* Doesn't actually delete anything, just ensures that the xmls will no longer be usable.
*/
flagAsDeletedByName(name: string): Promise<void>;
setIsExecutableFlag(processModelId: string, isExecutable: boolean): Promise<void>;
setIsSingletonFlag(processModelId: string, isSingleton: boolean): Promise<void>;
removeProcessDefinitionsFlaggedAsDeleted(): Promise<void>;
/**
* Deletes all stored XMLs with the given name, as well as any associated data.
*/
deleteByName(name: string): Promise<void>;
getProcessDefinitionIdForProcessModelId(processModelId: string): Promise<string>;
private storeProcessDefinition;
private processDefinitionExists;
private ensureProcessModelIdsAreUniqe;
private getProcessModelIdsForProcessDefinitionId;
private hash;
private convertToProcessDefinitionRuntimeObject;
private convertToProcessModelAssociationRuntimeObject;
private publishProcessUndeployedNotification;
}