import { IIAMService, IIdentity } from '@essential-projects/iam_contracts'; import { APIs, DataModels } from '@process-engine/management_api_contracts'; import { ILoggingApi } from '@process-engine/logging_api_contracts'; import { IFlowNodeInstanceRepository } from '@process-engine/persistence_api.contracts'; export declare class KpiService implements APIs.IKpiManagementApi { private iamService; private flowNodeInstanceRepository; private loggingService; constructor(flowNodeInstanceRepository: IFlowNodeInstanceRepository, iamService: IIAMService, loggingService: ILoggingApi); getRuntimeInformationForProcessModel(identity: IIdentity, processModelId: string, offset?: number, limit?: number): Promise; getRuntimeInformationForFlowNode(identity: IIdentity, processModelId: string, flowNodeId: string): Promise; getActiveTokensForProcessModel(identity: IIdentity, processModelId: string, offset?: number, limit?: number): Promise; getActiveTokensForCorrelationAndProcessModel(identity: IIdentity, correlationId: string, processModelId: string, offset?: number, limit?: number): Promise; getActiveTokensForProcessInstance(identity: IIdentity, processInstanceId: string, offset?: number, limit?: number): Promise; getActiveTokensForFlowNode(identity: IIdentity, flowNodeId: string, offset?: number, limit?: number): Promise; /** * Array-Filter that checks if a given log entry is suitable for including * it into the runtime calculations. * * First, it determines if the log was recorded when the FlowNodeInstance * was finished. If so, it is a valid log entry. * * If it is a log that was recorded at the beginnng of a FlowNodeInstance * execution, the function checks if a corresponding exiting log exists. * * If one is found, the log is suitable for including it with runtime * calculation. * * If no matching exiting log could be found, then this likely means the * FlowNodeInstance is still running. The log will not be included in the * calculations. * * @param logToCheck The log to validate. * @param logIndex The index the log has in the given Array. * @param allFlowNodeLogs The full Array that is curently being filtered. * @returns True, if the log belongs to a finished * FlowNodeInstance, otherwise false. */ private logBelongsToFinishedFlowNodeInstance; private groupFlowNodeInstancesByFlowNodeId; private createFlowNodeRuntimeInformation; private groupLogsByFlowNodeInstance; private calculateRuntimeForFlowNodeInstance; private calculateQuartiles; private calculateFlowNodeArithmeticMeanRuntime; private isFlowNodeInstanceActive; private createActiveTokenInfoForFlowNodeInstance; }