@villedemontreal/workit-bpm-client
Version:
Camunda BPM client for WorkIt that works with Camunda platform powered by TypeScript
24 lines (23 loc) • 1.68 kB
TypeScript
import { ICamundaClient, ICamundaConfig, ICamundaService, IClient, ICreateWorkflowInstance, ICreateWorkflowInstanceResponse, IDeployWorkflowResponse, IMessage, IPagination, IPaginationOptions, IPublishMessage, IUpdateWorkflowRetry, IUpdateWorkflowVariables, IWorkflow, IWorkflowClient, IWorkflowDefinition, IWorkflowDefinitionRequest, IWorkflowOptions } from '@villedemontreal/workit-types';
export declare class CamundaBpmClient implements IClient<ICamundaService>, IWorkflowClient {
private static _getWorkflowParams;
private readonly _client;
private _topicSubscription;
private readonly _config;
private readonly _repo;
constructor(config: ICamundaConfig, client: ICamundaClient);
subscribe(onMessageReceived: (message: IMessage, service: ICamundaService) => Promise<void>): Promise<void>;
unsubscribe(): Promise<void>;
deployWorkflow(absPath: string): Promise<IDeployWorkflowResponse>;
getWorkflows(options?: Partial<IWorkflowOptions & IPaginationOptions>): Promise<IPagination<IWorkflow>>;
getWorkflow(payload: IWorkflowDefinitionRequest): Promise<IWorkflowDefinition>;
updateVariables<T = any>(model: IUpdateWorkflowVariables<Partial<T>>): Promise<void>;
updateJobRetries({ jobKey, retries }: IUpdateWorkflowRetry): Promise<void>;
publishMessage<T, K>(payload: IPublishMessage<T, K>): Promise<void>;
createWorkflowInstance<T>(model: ICreateWorkflowInstance<T>): Promise<ICreateWorkflowInstanceResponse>;
cancelWorkflowInstance(instanceId: string): Promise<void>;
resolveIncident(incidentKey: string): Promise<void>;
private _startSubscriber;
private _hasBpmnProcessId;
private _getLogger;
}