import { Identity as PublicIdentity, UserTaskResult } from '@5minds/processcube_engine_sdk'; import { InternalIdentity as Identity } from '../Contracts/index'; import type { FlowNodeInstanceDatabaseAdapter, ProcessInstanceDatabaseAdapter } from '../Tools/DatabaseAdaptersSequelize'; import type { ExecuteProcessService } from './ExecuteProcessService'; import type { MessageEventService } from './MessageEventService'; import type { SignalEventService } from './SignalEventService'; /** * Gatekeeper Service for Core Access. */ export declare class CoreAccessService { private readonly executeProcessService; private readonly flowNodeInstanceDatabaseAdapter; private readonly messageEventService; private readonly processInstanceDatabaseAdapter; private readonly signalEventService; private readonly logger; constructor(executeProcessService: ExecuteProcessService, flowNodeInstanceDatabaseAdapter: FlowNodeInstanceDatabaseAdapter, messageEventService: MessageEventService, processInstanceDatabaseAdapter: ProcessInstanceDatabaseAdapter, signalEventService: SignalEventService); transferOwnership(processInstanceId: string, newOwner: PublicIdentity): Promise; finishExternalServiceTask(externalTaskId: string, externalTaskResult: TResult): Promise; finishUntypedTask(identity: Identity, taskInstanceId: string): Promise; finishManualTask(identity: Identity, manualTaskInstanceId: string): Promise; finishUserTask(identity: Identity, userTaskInstanceId: string, userTaskResult: UserTaskResult): Promise; triggerMessageEvent(identity: Identity, messageName: string, options?: { customCorrelationId?: string; processInstanceId?: string; payload?: any; triggerValue?: string; messageChannel?: string; }): Promise; triggerSignalEvent(identity: Identity, signalName: string, options?: { customCorrelationId?: string; processInstanceId?: string; payload?: any; triggerValue?: string; signalChannel?: string; }): Promise; retryProcessInstance(identity: Identity, processInstanceId: string, processDefinitionHash: string, flowNodeInstanceId?: string, newStartToken?: Record): Promise; terminateProcessInstance(identity: Identity, processInstanceId: string): Promise; /** * CAUTION: * This is only for those rare cases, when the engine stops processing a ProcessInstance and therefore no longer holds it in active memory. * Then, and ONLY then, we must handle process instance termination manually. Consider this an emergency circuit breaker. * Killing a process should only ever be done through the Process Instance class. */ private killProcessInstanceManually; private sendProcessKilledNotification; }