/** * @swagger * components: * schemas: * ExternalTask: * description: Describes an ExternalTask that the Engine has delegated to an ExternalTask worker for processing. * type: object * required: * - id * - workerId * - topic * - isSingleTry * - flowNodeInstanceId * - correlationId * - processDefinitionId * - processInstanceId * - ownerId * - payload * - lockExpirationTime * - state * properties: * id: * description: The ID of the ExternalTask. * type: string * workerId: * description: The ID of the worker that has most recently locked the ExternalTask for processing. * type: string * topic: * description: The topic of the ExternalTask. * type: string * isSingleTry: * description: A flag indicating whether or not the ExternalTask is a single try task. * type: boolean * flowNodeInstanceId: * description: The ID of the FlowNodeInstance that the ExternalTask belongs to. * type: string * correlationId: * description: The ID of the Correlation that the ExternalTask belongs to. * type: string * processDefinitionId: * description: The ID of the ProcessDefinition that contains the ExternalTask. * type: string * processModelId: * description: The ID of the ProcessModel that contains the ExternalTask. * type: string * embeddedProcessModelId: * description: The ID of the SubProcess that contains the ExternalTask. * type: string * processInstanceId: * description: The ID of the ProcessInstance the ExternalTask belongs to. * type: string * ownerId: * description: The ID of the user that owns the ExternalTask. * type: string * payload: * description: The payload containing all relevant data the worker needs to execute the ExternalTask. * type: object * lockExpirationTime: * description: The lock expiration time. On expiration, the task is released to be processed by other workers. If not set, the ExternalTask is not locked. * type: string * state: * description: The state of the ExternalTask. * $ref: '#/components/schemas/ExternalTaskState' * finishedAt: * description: The date when the ExternalTask was finished. * type: string * result: * description: The result of the ExternalTask. * type: object * error: * description: The error that occurred during processing of the ExternalTask (if any). * type: object * createdAt: * description: The date when the ExternalTask was created. * type: string */ /** * Describes an ExternalTask that the Engine has delegated to an * ExternalTask worker for processing. */ export declare type ExternalTask = { id: string; /** * The ID of the worker that has most recently locked the ExternalTask * for processing. */ workerId: string; topic: string; isSingleTry: boolean; flowNodeInstanceId: string; correlationId: string; processDefinitionId: string; processModelId?: string; embeddedProcessModelId?: string; processInstanceId: string; ownerId: string; /** * The payload containing all relevant data the worker needs to execute the * ExternalTask. */ payload: TPayload; /** * The lock expiration time. On expiration, the task is released to * be processed by other workers. * If not set, the ExternalTask is not locked. */ lockExpirationTime: Date; state: ExternalTaskState; finishedAt?: Date; result?: any; error?: any; createdAt?: Date; }; /** * @swagger * components: * schemas: * ExternalTaskState: * description: Describes the state of an ExternalTask. * type: string * enum: * - pending * - finished * - expired */ export declare enum ExternalTaskState { pending = "pending", finished = "finished", expired = "expired" }