import 'ses'; import { FlowNodeInstanceResult, FlowNodeViewModel, Identity, RuntimeExpressionParameters, TokenHistory } from '@5minds/processcube_engine_sdk'; import { FlowNodeInstanceDatabaseAdapter } from '../Tools/DatabaseAdaptersSequelize/FlowNodeInstanceAdapter'; export type FlowNodeExpressionParameters = { engine?: { id?: string; name?: string; }; environment?: Record; currentToken?: any; correlationId?: string; flowNodeExecutionCount?: number | null; processModelVersion?: string | null; correlationMetadata?: any; identity?: Identity; processInstanceMetadata?: any; currentDataObject?: any; currentFlowNode?: FlowNodeViewModel; previousFlowNodeId?: string; dataObjects?: { [dataObjectId: string]: any; }; additionalProperties?: { [key: string]: any; }; allowNonObjectResults: boolean; }; export declare class ProcessTokenService { private flowNodeInstanceDatabaseAdapter; constructor(flowNodeInstanceDatabaseAdapter: FlowNodeInstanceDatabaseAdapter); getAvailableParametersForExpressions(): Array; /** * Gets the result of the last Flow Node Instance executed for a Process Instance. * Should only be used for Process Instances that were finished successfully. */ getFinalResult(processInstanceId: string): Promise; validateSchema(dataContract: string, processedParams: RuntimeExpressionParameters, result: object): Promise; executeRuntimeExpression(expression: string, params: RuntimeExpressionParameters, dataContract?: string): Promise; getFlowNodeExecutionCount(params: RuntimeExpressionParameters): Promise; getParametersForRuntimeExpression(expression: string, params: RuntimeExpressionParameters): Promise; mergeRuntimeExpressionParameters(runtimeExpressionParametersA: RuntimeExpressionParameters, runtimeExpressionParametersB: RuntimeExpressionParameters): RuntimeExpressionParameters; buildTokenHistoryForProcessInstance(params: { processInstanceId: string; currentToken: object; currentFlowNodeId: string; previousFlowNodeId: string; }, expression?: string): Promise; private extractFlowNodesFromExpression; private sanitizeFlowNodeExpression; }