import { EventType } from '../../ProcessModel/index'; import { Correlation } from '../Correlation'; import { FlowNodeInstance } from '../FlowNodeInstance'; /** * @swagger * components: * schemas: * ProcessInstanceList: * description: A list of ProcessInstances. * type: object * required: * - processInstances * - totalCount * properties: * processInstances: * description: The process instances * type: array * items: * $ref: '#/components/schemas/ProcessInstance' * totalCount: * description: The total number of process instances * type: number */ export declare type ProcessInstanceList = { processInstances: Array; totalCount: number; }; /** * @swagger * components: * schemas: * ProcessInstance: * description: A ProcessInstance. * type: object * required: * - correlationId * - processInstanceId * - processDefinitionId * - processModelId * - hash * - state * - error * - ownerId * - startedByRootAccessToken * properties: * correlationId: * description: The id of the correlation in whichs context the process instance runs. * type: string * processInstanceId: * description: The id of the process instance. * type: string * processDefinitionId: * description: The id of the process definition which the process instance belongs to. * type: string * processModelId: * description: The id of the executed process model. * type: string * embeddedProcessModelId: * description: The id of the SubProcess that contains the executed process model. * type: string * processModelName: * description: The name of the executed process model. * type: string * processModelVersion: * description: The version of the executed process model. * type: string * parentProcessInstanceId: * description: The id of the parent process instance, if this process instance is a sub process. * type: string * hash: * description: The hash of the used process model. * type: string * xml: * description: The xml of the used process model. * type: string * state: * description: The state of the process instance. * $ref: '#/components/schemas/ProcessInstanceState' * error: * description: The error that occured during execution of the process instance (if any). * type: object * ownerId: * description: The id of the user who started the process instance. * type: string * anonymousSessionId: * description: The id of the anonymous session that started the process instance (if any). * type: string * startedByRootAccessToken: * description: A flag indicating whether or not the process instance was started using a root access token. * type: boolean * createdAt: * description: The date when the process instance was started. * type: string * finishedAt: * description: The date when the process instance was finished. * type: string * restartedAt: * description: The date when the process instance was restarted (if any). * type: string * terminatedByUserId: * description: The id of the user who terminated the process instance (if any). * type: string * durationInMilliseconds: * description: The duration of the process instance in milliseconds. * type: number * startEventId: * description: The id of the start event that started the process instance. * type: string * startEventType: * description: The type of the start event that started the process instance. * $ref: '#/components/schemas/EventType' * startToken: * description: The token that was used to start the process instance * type: object * endEventId: * description: The id of the end event that ended the process instance (if ended). * type: string * endEventType: * description: The type of the end event that ended the process instance (if ended). * $ref: '#/components/schemas/EventType' * endToken: * description: The token that reached the end event (if ended). * type: object * metadata: * description: The metadata of the process instance. * $ref: '#/components/schemas/ProcessInstanceMetadata' * correlation: * description: The correlation in whichs context the process instance runs. * $ref: '#/components/schemas/Correlation' * triggeredByFlowNodeInstance: * description: The FlowNodeInstance that triggered the process instance (if any). * $ref: '#/components/schemas/FlowNodeInstance' */ export declare type ProcessInstance = { correlationId: string; processInstanceId: string; processDefinitionId: string; processModelId: string; embeddedProcessModelId?: string; processModelName?: string; processModelVersion?: string; parentProcessInstanceId?: string; hash: string; xml?: string; state: ProcessInstanceState; error: Error; ownerId: string; anonymousSessionId?: string; startedByRootAccessToken: boolean; createdAt?: Date; finishedAt?: Date; restartedAt?: Date; terminatedByUserId?: string; durationInMilliseconds?: number; startEventId?: string; startEventType?: EventType; startToken?: any; endEventId?: string; endEventType?: EventType; endToken?: any; metadata?: ProcessInstanceMetadata; correlation?: Correlation; triggeredByFlowNodeInstance?: FlowNodeInstance; engineId?: string; }; /** * @swagger * components: * schemas: * ProcessInstanceState: * description: The state of a ProcessInstance. * type: string * enum: * - running * - finished * - error * - terminated */ /** * Lists the various states that a ProcessInstance can be in. */ export declare enum ProcessInstanceState { running = "running", finished = "finished", error = "error", terminated = "terminated" } /** * @swagger * components: * schemas: * ProcessInstanceMetadata: * description: Metadata for a ProcessInstance. * type: object */ /** * Describes a Metadata property of a ProcessInstance. */ export declare type ProcessInstanceMetadata = { [key: string]: string; };