@5minds/processcube_engine
Version:
The ProcessCube Engine. Stores and executes BPMNs.
67 lines (66 loc) • 4.07 kB
TypeScript
import { FlowNodeInstanceList, FlowNodeInstanceSortSettings, GenericFlowNodeInstanceQuery, UserTaskResult } from '@5minds/processcube_engine_sdk';
import { InternalIdentity as Identity } from '../../Contracts/InternalDataModels/index';
import { CoreAccessService } from '../../Core/index';
import { ProxyConfiguration } from '../../Setups/EngineRouter';
import { FlowNodeInstanceDatabaseAdapter, UserTaskInstanceDatabaseAdapter } from '../../Tools/DatabaseAdaptersSequelize/index';
import { IamService, IdentityService } from '../../Tools/Iam/index';
export declare class FlowNodeInstanceService {
private readonly coreAccess;
private readonly iamService;
private readonly identityService;
private readonly flowNodeInstanceAdapter;
private readonly logger;
private readonly userTaskAdapter;
private readonly config;
constructor(coreAccess: CoreAccessService, iamService: IamService, identityService: IdentityService, flowNodeInstanceAdapter: FlowNodeInstanceDatabaseAdapter, userTaskAdapter: UserTaskInstanceDatabaseAdapter);
query(identity: Identity, query: GenericFlowNodeInstanceQuery, offset?: number, limit?: number, sortSettings?: FlowNodeInstanceSortSettings, includeCount?: boolean): Promise<FlowNodeInstanceList>;
finishUntypedTask(identity: Identity, taskInstanceId: string): Promise<void>;
finishManualTask(identity: Identity, manualTaskInstanceId: string): Promise<void>;
finishUserTask(identity: Identity, userTaskInstanceId: string, userTaskResult?: UserTaskResult): Promise<void>;
triggerMessageEvent(identity: Identity, messageName: string, options?: {
customCorrelationId?: string;
processInstanceId?: string;
payload?: any;
messageChannel?: string;
}): Promise<void>;
triggerSignalEvent(identity: Identity, signalName: string, options?: {
customCorrelationId?: string;
processInstanceId?: string;
payload?: any;
signalChannel?: string;
}): Promise<void>;
triggerTimerEvent(identity: Identity, flowNodeInstanceId: string): Promise<void>;
reserveUserTaskInstance(identity: Identity, flowNodeInstanceId: string, actualOwnerId: string): Promise<void>;
cancelUserTaskInstanceReservation(identity: Identity, flowNodeInstanceId: string): Promise<void>;
private enhanceAndExecuteQuery;
private loadSuspendedUserTaskInstance;
private ensureUserCanAccessUserTask;
private sendUserTaskReservedNotification;
private sendUserTaskReservationCanceledNotification;
private checkIfTaskIsAssignedToOtherUsers;
private checkIfTaskIsReservedForAnotherUser;
private ensureHasClaim;
private validateUserTaskResults;
}
export interface FlowNodeInstanceServiceProxy {
query(identity: Identity, query: GenericFlowNodeInstanceQuery, offset?: number, limit?: number, sortSettings?: FlowNodeInstanceSortSettings, includeCount?: boolean): Promise<FlowNodeInstanceList>;
finishUntypedTask(identity: Identity, taskInstanceId: string): Promise<void>;
finishManualTask(identity: Identity, manualTaskInstanceId: string): Promise<void>;
finishUserTask(identity: Identity, userTaskInstanceId: string, userTaskResult?: UserTaskResult): Promise<void>;
triggerMessageEvent(identity: Identity, messageName: string, options?: {
customCorrelationId?: string;
processInstanceId?: string;
payload?: any;
messageChannel?: string;
}): Promise<void>;
triggerSignalEvent(identity: Identity, signalName: string, options?: {
customCorrelationId?: string;
processInstanceId?: string;
payload?: any;
signalChannel?: string;
}): Promise<void>;
triggerTimerEvent(identity: Identity, flowNodeInstanceId: string): Promise<void>;
reserveUserTaskInstance(identity: Identity, flowNodeInstanceId: string, actualOwnerId: string): Promise<void>;
cancelUserTaskInstanceReservation(identity: Identity, flowNodeInstanceId: string): Promise<void>;
}
export declare const FlowNodeInstanceServiceProxyConfiguration: ProxyConfiguration;