@5minds/processcube_engine
Version:
The ProcessCube Engine. Stores and executes BPMNs.
1,286 lines (1,285 loc) • 88.5 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.restSettings = void 0;
const params = {
// Id of a Correlation.
correlationId: ':correlation_id',
// Instance Id of an UntypedTask.
untypedTaskInstanceId: ':untyped_task_instance_id',
// Id of an Event.
eventId: ':event_id',
// Name of an Event.
eventName: ':event_name',
// Id of an External Task.
externalTaskId: ':external_task_id',
// Id of a FlowNode.
flowNodeId: ':flow_node_id',
// Id of a FlowNodeInstance.
flowNodeInstanceId: ':flow_node_instance_id',
// Id of a ManualTask.
manualTaskInstanceId: ':manual_task_instance_id',
// Instance Id of a Process.
processInstanceId: ':process_instance_id',
// Id of a ProcessModel.
processDefinitionId: ':process_definition_id',
// Id of a ProcessModel.
processModelId: ':process_model_id',
// Id of a user.
userId: ':user_id',
// Id of a UserTaskInstance.
userTaskInstanceId: ':user_task_instance_id',
// Key of a metadata value
userMetadataKey: ':user_metadata_key',
};
const paths = {
// ApplicationInfo
/**
* @swagger
* /info:
* get:
* description: Gets some basic info about the host application.
* tags: [ApplicationInfo]
* responses:
* 200:
* description: Returns some basic info about the host application.
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/ApplicationInfo'
*/
getApplicationInfo: '/info',
/**
* @swagger
* /metrics:
* get:
* description: Gets a metrics report of the host application.
* tags: [ApplicationInfo]
* responses:
* 200:
* description: Returns a metrics report of the host application.
* content:
* application/json:
* schema:
* type: object
*/
getMetricsReport: '/metrics',
/**
* @swagger
* /authority:
* get:
* description: Gets the address of the authority that the host application uses for claim checks.
* tags: [ApplicationInfo]
* responses:
* 200:
* description: Returns the address of the authority.
* content:
* application/json:
* schema:
* type: string
* example: http://localhost:5000
*/
getAuthorityAddress: '/authority',
// Correlations
/**
* @swagger
* /correlations:
* get:
* description: Gets all Correlations.
* tags: [Correlations]
* parameters:
* - name: limit
* in: query
* description: The maximum amount of Correlations to be returned.
* required: false
* schema:
* type: number
* example: 10
* - name: offset
* in: query
* description: The index of the first Correlation to be returned.
* required: false
* schema:
* type: number
* example: 5
* responses:
* 200:
* description: Returns all Correlations.
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/CorrelationList'
*/
getCorrelations: '/correlations',
/**
* @swagger
* /correlations/{correlation_id}:
* get:
* description: Gets a Correlation by its ID.
* tags: [Correlations]
* parameters:
* - name: correlation_id
* in: path
* description: The ID of the Correlation to retrieve.
* required: true
* schema:
* type: string
* example: 123
* responses:
* 200:
* description: Returns the Correlation with the given ID.
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/Correlation'
*/
getCorrelationById: `/correlations/${params.correlationId}`,
// Cronjobs
/**
* @swagger
* /cronjobs/query:
* get:
* description: Queries a list of deployed Cronjobs.
* tags: [Cronjobs]
* parameters:
* - name: limit
* in: query
* description: The maximum amount of Cronjobs to be returned.
* required: false
* schema:
* type: number
* example: 10
* - name: offset
* in: query
* description: The index of the first Cronjob to be returned.
* required: false
* schema:
* type: number
* example: 5
* - name: processDefinitionId
* in: query
* description: The ID of the ProcessDefinition for which to retrieve Cronjobs.
* required: false
* schema:
* type: string
* example: myProcess_12345678
* - name: processModelId
* in: query
* description: The ID of the ProcessModel for which to retrieve Cronjobs.
* required: false
* schema:
* type: string
* example: myProcessModel_12345678
* - name: startEventId
* in: query
* description: The ID of the StartEvent for which to retrieve Cronjobs.
* required: false
* schema:
* type: string
* example: myStartEvent_12345678
* - name: crontab
* in: query
* description: The crontab expression for which to retrieve Cronjobs.
* required: false
* schema:
* type: string
* example: 0 0 1 * *
* - name: enabled
* in: query
* description: The enabled state for which to retrieve Cronjobs.
* required: false
* schema:
* type: boolean
* example: true
* - name: nextExecution
* in: query
* description: The nextExecution date for which to retrieve Cronjobs.
* required: false
* schema:
* type: string
* example: 2020-01-01T00:00:00.000Z
* responses:
* 200:
* description: Returns a list of Cronjobs.
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/DeployedCronjobList'
*/
queryCronjobs: '/cronjobs/query',
/**
* @swagger
* /cronjobs/process_models/{processModelId}/flow_node/{flowNodeId}/enable:
* post:
* description: Enables the given Cronjob for the given ProcessModel.
* tags: [Cronjobs]
* parameters:
* - name: processModelId
* in: path
* description: The ID of the ProcessModel for which to enable the Cronjob.
* required: true
* schema:
* type: string
* example: myProcessModel_12345678
* - name: flowNodeId
* in: path
* description: The ID of the FlowNode for which to enable the Cronjob.
* required: true
* schema:
* type: string
* example: myFlowNode_12345678
* responses:
* 204:
* description: The Cronjob was successfully enabled.
*/
enableCronjob: `/cronjobs/process_models/${params.processModelId}/flow_node/${params.flowNodeId}/enable`,
/**
* @swagger
* /cronjobs/process_models/{processModelId}/flow_node/{flowNodeId}/disable:
* post:
* description: Disables the given Cronjob for the given ProcessModel.
* tags: [Cronjobs]
* parameters:
* - name: processModelId
* in: path
* description: The ID of the ProcessModel for which to disable the Cronjob.
* required: true
* schema:
* type: string
* example: myProcessModel_12345678
* - name: flowNodeId
* in: path
* description: The ID of the FlowNode for which to disable the Cronjob.
* required: true
* schema:
* type: string
* example: myFlowNode_12345678
* responses:
* 204:
* description: The Cronjob was successfully disabled.
*/
disableCronjob: `/cronjobs/process_models/${params.processModelId}/flow_node/${params.flowNodeId}/disable`,
// DataObjects
/**
* @swagger
* /data_object_instances/query:
* get:
* description: Gets the DataObjectInstances that match the given query.
* tags: [DataObjectInstances]
* parameters:
* - name: limit
* in: query
* description: The maximum amount of DataObjectInstances to be returned.
* schema:
* type: number
* example: 100
* - name: offset
* in: query
* description: The index of the first DataObjectInstance to be returned.
* schema:
* type: number
* example: 5
* - name: dataObjectId
* in: query
* description: The ID of the DataObject for which to retrieve DataObjectInstances.
* schema:
* type: string
* example: myDataObject_12345678
* - name: processDefinitionId
* in: query
* description: The ID of the ProcessDefinition for which to retrieve DataObjectInstances.
* schema:
* type: string
* example: myProcessDefinition_12345678
* - name: processModelId
* in: query
* description: The ID of the ProcessModel for which to retrieve DataObjectInstances.
* schema:
* type: string
* example: myProcessModel_12345678
* - name: embeddedProcessModelId
* in: query
* description: The ID of the SubProcess for which to retrieve DataObjectInstances.
* schema:
* type: string
* example: myEmbeddedProcessModel_12345678
* - name: processInstanceId
* in: query
* description: The ID of the ProcessInstance for which to retrieve DataObjectInstances.
* schema:
* type: string
* example: myProcessInstance_12345678
* - name: flowNodeInstanceId
* in: query
* description: The ID of the FlowNodeInstance for which to retrieve DataObjectInstances.
* schema:
* type: string
* example: myFlowNodeInstance_12345678
* - name: createdAt
* in: query
* description: The createdAt date for which to retrieve DataObjectInstances.
* schema:
* type: string
* example: 2020-01-01T00:00:00.000Z
* responses:
* 200:
* description: Returns a list of DataObjectInstances.
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/DataObjectInstanceList'
*/
getDataObjects: '/data_object_instances/query',
// FlowNodeInstance
/**
* @swagger
* /flow_node_instances:
* get:
* description: Gets all FlowNodeInstances that match the given query.
* tags: [FlowNodeInstances]
* parameters:
* - name: limit
* in: query
* description: The maximum amount of FlowNodeInstances to be returned.
* schema:
* type: number
* example: 100
* - name: offset
* in: query
* description: The index of the first FlowNodeInstance to be returned.
* schema:
* type: number
* example: 5
* - name: flowNodeInstanceId
* in: query
* description: The ID of the FlowNodeInstance to be returned.
* schema:
* type: string
* example: myFlowNodeInstance_12345678
* - name: flowNodeId
* in: query
* description: The ID of the FlowNode for which to retrieve FlowNodeInstances.
* schema:
* type: string
* example: myFlowNode_12345678
* - name: flowNodeName
* in: query
* description: The name of the FlowNode for which to retrieve FlowNodeInstances.
* schema:
* type: string
* example: myFlowNode
* - name: flowNodeLane
* in: query
* description: The name of the Lane for which to retrieve FlowNodeInstances.
* schema:
* type: string
* example: myLane
* - name: flowNodeType
* in: query
* description: The type of the FlowNode for which to retrieve FlowNodeInstances.
* schema:
* type: string
* example: bpmn:BoundaryEvent
* - name: eventType
* in: query
* description: The event type of the FlowNodeInstance to be returned.
* schema:
* type: string
* example: messageEvent
* - name: correlationId
* in: query
* description: The correlationId of the FlowNodeInstance to be returned.
* schema:
* type: string
* example: myCorrelationId_12345678
* - name: processDefinitionId
* in: query
* description: The ID of the ProcessDefinition for which to retrieve FlowNodeInstances.
* schema:
* type: string
* example: myProcessDefinition_12345678
* - name: processModelId
* in: query
* description: The ID of the ProcessModel for which to retrieve FlowNodeInstances.
* schema:
* type: string
* example: myProcessModel_12345678
* - name: embeddedProcessModelId
* in: query
* description: The ID of the SubProcess that contains the ProcessModel for which to retrieve FlowNodeInstances.
* schema:
* type: string
* example: myProcessModel_12345678
* - name: processModelName
* in: query
* description: The Name of the ProcessModel for which to retrieve FlowNodeInstances.
* schema:
* type: string
* example: myProcessModelName_12345678
* - name: processInstanceId
* in: query
* description: The ID of the ProcessInstance for which to retrieve FlowNodeInstances.
* schema:
* type: string
* example: myProcessInstance_12345678
* - name: ownerId
* in: query
* description: The ID of the FlowNodeInstance owner for which to retrieve FlowNodeInstances.
* schema:
* type: string
* example: myOwner_12345678
* - name: state
* in: query
* description: The state of the FlowNodeInstance to be returned.
* schema:
* type: string
* example: running
* - name: previousFlowNodeInstanceId
* in: query
* description: The ID of the previous FlowNodeInstance for which to retrieve FlowNodeInstances.
* schema:
* type: string
* example: myPreviousFlowNodeInstance_12345678
* - name: parentProcessInstanceId
* in: query
* description: The ID of the parent ProcessInstance for which to retrieve FlowNodeInstances.
* schema:
* type: string
* example: myParentProcessInstance_12345678
* - name: createdAt
* in: query
* description: The createdAt date for which to retrieve FlowNodeInstances.
* schema:
* type: string
* example: 2020-01-01T00:00:00.000Z
* - name: updatedAt
* in: query
* description: The updatedAt date for which to retrieve FlowNodeInstances.
* schema:
* type: string
* example: 2020-01-01T00:00:00.000Z
* - name: triggeredByFlowNodeInstance
* in: query
* description: The ID of the FlowNodeInstance that triggered the FlowNodeInstance to be returned.
* schema:
* type: Array<string> | string | SearchQuery
* oneOf:
* - type: Array<string>
* example: ['myTriggeredFlowNodeInstance_12345678', 'myTriggeredFlowNodeInstance_87654321']
* - type: string
* example: myTriggeredFlowNodeInstance_12345678
* - $ref: '#/components/schemas/SearchQuery'
* responses:
* 200:
* description: Returns a list of FlowNodeInstances.
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/FlowNodeInstanceList'
*/
queryFlowNodeInstances: '/flow_node_instances',
/**
* @swagger
* /messages/{eventName}/trigger:
* post:
* description: Triggers a MessageEvent by its name.
* tags: [Events]
* parameters:
* - name: eventName
* in: path
* description: The name of the MessageEvent to be triggered.
* required: true
* schema:
* type: string
* example: myMessageEvent
* - name: processInstanceId
* in: query
* description: The ID of the ProcessInstance for which to trigger the MessageEvent.
* required: false
* schema:
* type: string
* example: myProcessInstance_12345678
* requestBody:
* content:
* application/json:
* required: false
* schema:
* type: object
* properties:
* payload:
* type: string
* description: The payload to be sent with the MessageEvent.
* required: false
* example: myPayload
* responses:
* 204:
* description: Indicates the MessageEvent was successfully triggered.
*/
triggerMessageEvent: `/messages/${params.eventName}/trigger`,
/**
* @swagger
* /signals/{eventName}/trigger:
* post:
* description: Triggers a SignalEvent by its name.
* tags: [Events]
* parameters:
* - name: eventName
* in: path
* description: The name of the SignalEvent to be triggered.
* required: true
* schema:
* type: string
* example: mySignalEvent
* - name: process_instance_id
* in: query
* description: The ID of the ProcessInstance for which to trigger the SignalEvent.
* required: false
* schema:
* type: string
* example: myProcessInstance_12345678
* responses:
* 204:
* description: Indicates the SignalEvent was successfully triggered.
*/
triggerSignalEvent: `/signals/${params.eventName}/trigger`,
/**
* @swagger
* /timer/{flowNodeInstanceId}/trigger:
* post:
* description: Triggers a TimerEvent by its FlowNodeInstanceId immediately.
* tags: [Events]
* parameters:
* - name: flowNodeInstanceId
* in: path
* description: The FlowNodeInstanceId of the TimerEvent to be triggered.
* required: true
* schema:
* type: string
* example: 123456789
* responses:
* 204:
* description: Indicates the TimerEvent was successfully triggered.
*/
triggerTimerEvent: `/timer/${params.flowNodeInstanceId}/trigger`,
/**
* @swagger
* /untyped_tasks/{untypedTaskInstanceId}/finish:
* put:
* description: Finishes a specific UntypedTask by its UntypedTaskInstanceId.
* tags: [UntypedTasks]
* parameters:
* - name: untypedTaskInstanceId
* in: path
* description: The ID of the UntypedTaskInstance to be finished.
* required: true
* schema:
* type: string
* example: myUntypedTaskInstance_12345678
* responses:
* 204:
* description: Indicates the UntypedTaskInstance was successfully finished.
*/
finishUntypedTask: `/untyped_tasks/${params.untypedTaskInstanceId}/finish`,
/**
* @swagger
* /manual_tasks/{manualTaskInstanceId}/finish:
* put:
* description: Finishes a specific ManualTask by its ManualTaskInstanceId.
* tags: [ManualTasks]
* parameters:
* - name: manualTaskInstanceId
* in: path
* description: The ID of the ManualTaskInstance to be finished.
* required: true
* schema:
* type: string
* example: myManualTaskInstance_12345678
* responses:
* 204:
* description: Indicates the ManualTaskInstance was successfully finished.
*/
finishManualTask: `/manual_tasks/${params.manualTaskInstanceId}/finish`,
/**
* @swagger
* /user_tasks/{userTaskInstanceId}/finish:
* put:
* description: Finishes a specific UserTask by its UserTaskInstanceId.
* tags: [UserTasks]
* parameters:
* - name: userTaskInstanceId
* in: path
* description: The ID of the UserTaskInstance to be finished.
* required: true
* schema:
* type: string
* example: myUserTaskInstance_12345678
* requestBody:
* content:
* application/json:
* required: false
* schema:
* type: object
* responses:
* 204:
* description: Indicates the UserTaskInstance was successfully finished.
*/
finishUserTask: `/user_tasks/${params.userTaskInstanceId}/finish`,
/**
* @swagger
* /user_tasks/{userTaskInstanceId}/reserve:
* put:
* description: Reserves a UserTask for a specific User.
* tags: [UserTasks]
* parameters:
* - name: userTaskInstanceId
* in: path
* description: The ID of the UserTaskInstance to be reserved.
* required: true
* schema:
* type: string
* example: myUserTaskInstance_12345678
* requestBody:
* content:
* application/json:
* required: true
* schema:
* type: object
* properties:
* actualOwnerId:
* type: string
* description: The ID of the User who reserves the UserTask.
* required: true
* example: myUser_12345678
* responses:
* 204:
* description: Indicates the UserTaskInstance was successfully reserved.
*/
reserveUserTaskInstance: `/user_tasks/${params.userTaskInstanceId}/reserve`,
/**
* @swagger
* /user_tasks/{userTaskInstanceId}/cancel-reservation:
* delete:
* description: Cancels the reservation of the given UserTask instance.
* tags: [UserTasks]
* parameters:
* - name: userTaskInstanceId
* in: path
* description: The ID of the UserTaskInstance for which to cancel the reservation.
* required: true
* schema:
* type: string
* example: myUserTaskInstance_12345678
* responses:
* 204:
* description: Indicates the UserTaskInstance reservation was successfully canceled.
*/
cancelUserTaskInstanceReservation: `/user_tasks/${params.userTaskInstanceId}/cancel-reservation`,
// External Tasks
/**
* @swagger
* /external_tasks/deployed_topics:
* get:
* description: Fetches a list of all ExternalTask topics from all deployed Process Models.
* tags: [ExternalTasks]
* responses:
* 200:
* description: A list of all ExternalTask topics from all deployed Process Models.
* content:
* application/json:
* schema:
* description: A list of all ExternalTask topics from all deployed Process Models.
* type: array
* items:
* type: string
* example:
* - myTopic
* - myOtherTopic
* - myThirdTopic
* - myFourthTopic
*/
getAllDeployedTopics: '/external_tasks/deployed_topics',
/**
* @swagger
* /external_tasks/fetch_and_lock:
* post:
* description: Fetches the tasks available for an ExternalTaskWorker and locks them for a defined time.
* tags: [ExternalTasks]
* requestBody:
* content:
* application/json:
* required: true
* schema:
* $ref: '#/components/schemas/FetchAndLockRequestPayload'
* example:
* workerId: string
* topicName: string | Array<string>
* maxTasks: 10
* longPollingTimeout: 2000
* lockDuration: 10000
* payloadFilter: string
* responses:
* 204:
* description: A list of locked ExternalTasks.
* content:
* application/json:
* schema:
* type: array
* items:
* $ref: '#/components/schemas/ExternalTask'
*/
fetchAndLockExternalTasks: '/external_tasks/fetch_and_lock',
/**
* @swagger
* /external_tasks/{externalTaskId}/extend_lock:
* put:
* description: Extends the lock duration of an ExternalTask by a given amount of time.
* tags: [ExternalTasks]
* parameters:
* - name: externalTaskId
* in: path
* description: The ID of the ExternalTask for which to extend the lock duration.
* required: true
* schema:
* type: string
* example: myExternalTask_12345678
* requestBody:
* content:
* application/json:
* required: true
* schema:
* $ref: '#/components/schemas/ExtendLockRequestPayload'
* responses:
* 204:
* description: Indicates the ExternalTask lock was successfully extended.
*/
extendExternalTaskLock: `/external_tasks/${params.externalTaskId}/extend_lock`,
/**
* @swagger
* /external_tasks/{externalTaskId}/error:
* put:
* description: Finishes the given External Task with the given Error.
* tags: [ExternalTasks]
* parameters:
* - name: externalTaskId
* in: path
* description: The ID of the ExternalTask for which to finish with an Error.
* required: true
* schema:
* type: string
* example: myExternalTask_12345678
* requestBody:
* content:
* application/json:
* required: true
* schema:
* $ref: '#/components/schemas/HandleExternalTaskErrorRequestPayload'
* responses:
* 204:
* description: Indicates the ExternalTask was successfully finished with an Error.
*/
finishExternalTaskWithError: `/external_tasks/${params.externalTaskId}/error`,
/**
* @swagger
* /external_tasks/{externalTaskId}/finish:
* put:
* description: Finishes the ExternalTask with the given ID.
* tags: [ExternalTasks]
* parameters:
* - name: externalTaskId
* in: path
* description: The ID of the ExternalTask to finish.
* required: true
* schema:
* type: string
* example: myExternalTask_12345678
* requestBody:
* content:
* application/json:
* required: true
* schema:
* $ref: '#/components/schemas/FinishExternalTaskRequestPayload'
* responses:
* 204:
* description: Indicates the ExternalTask was successfully finished.
*/
finishExternalTask: `/external_tasks/${params.externalTaskId}/finish`,
// ProcessDefinition
/**
* @swagger
* /process_definitions:
* post:
* description: Creates or updates a ProcessDefinition or a list of ProcessDefinitions.
* tags: [ProcessDefinitions]
* requestBody:
* content:
* application/json:
* required: true
* schema:
* $ref: '#/components/schemas/PersistProcessDefinitionsPayload'
* example:
* xml: string | Array<string>
* overrideExisting: true
* responses:
* 201:
* description: Indicates the ProcessDefinition(s) was/were successfully persisted.
*/
persistProcessDefinitions: '/process_definitions',
/**
* @swagger
* /process_definitions:
* get:
* description: Gets all ProcessDefinitions the requesting user is allowed to see.
* tags: [ProcessDefinitions]
* parameters:
* - name: includeXml
* in: query
* description: Whether or not to include the raw XML for each process instance. CAUTION, This will significantly increase the response body size!
* required: false
* schema:
* type: boolean
* example: true
* default: false
* - name: includeCount
* in: query
* description: Whether or not to include the total count of matching query results.
* required: false
* schema:
* type: boolean
* example: false
* default: true
* - name: offset
* in: query
* description: The index of the first ProcessDefinition to include.
* required: false
* schema:
* type: number
* example: 0
* - name: limit
* in: query
* description: The maximum number of ProcessDefinitions to include.
* required: false
* schema:
* type: number
* example: 10
* responses:
* 200:
* description: A list of ProcessDefinitions.
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/ProcessDefinitionList'
*/
getProcessDefinitions: '/process_definitions',
/**
* @swagger
* /process_definitions/{processDefinitionId}:
* get:
* description: Gets a ProcessDefinition by its id.
* tags: [ProcessDefinitions]
* parameters:
* - name: includeXml
* in: query
* description: Whether or not to include the raw XML for each process instance. CAUTION, This will significantly increase the response body size!
* required: false
* schema:
* type: boolean
* example: true
* default: false
* - name: includeCount
* in: query
* description: Whether or not to include the total count of matching query results.
* required: false
* schema:
* type: boolean
* example: false
* default: true
* - name: processDefinitionId
* in: path
* description: The ID of the ProcessDefinition to retrieve.
* required: true
* schema:
* type: string
* example: myProcess_12345678
* responses:
* 200:
* description: A ProcessDefinitions.
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/ProcessDefinition'
*/
getProcessDefinitionById: `/process_definitions/${params.processDefinitionId}`,
/**
* @swagger
* /process_definitions/{processDefinitionId}:
* delete:
* description: Deletes the ProcessDefinition with the given ID.
* tags: [ProcessDefinitions]
* parameters:
* - name: processDefinitionId
* in: path
* description: The ID of the ProcessDefinition to delete.
* required: true
* schema:
* type: string
* example: myProcess_12345678
* - name: delete_all_related_data
* in: query
* description: If set to true, all ProcessInstances and ProcessModels related to the ProcessDefinition will be deleted as well.
* required: false
* schema:
* type: boolean
* example: true
* responses:
* 204:
* description: Indicates the ProcessDefinition was successfully deleted.
*/
deleteProcessDefinition: `/process_definitions/${params.processDefinitionId}`,
// ProcessModels
/**
* @swagger
* /process_models:
* get:
* description: Gets all currently deployed Process Models.
* tags: [ProcessModels]
* responses:
* 200:
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/ProcessModelList'
*/
getAllProcessModels: '/process_models',
/**
* @swagger
* /process_models/{processModelId}/:
* get:
* description: Gets a deployed Process Model by its ID.
* tags: [ProcessModels]
* parameters:
* - name: processModelId
* in: path
* description: The ID of the ProcessModel to retrieve.
* required: true
* schema:
* type: string
* example: myProcess_12345678
* responses:
* 200:
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/ProcessModel'
*/
getProcessModelById: `/process_models/${params.processModelId}/`,
/**
* @swagger
* /process_models/{processModelId}/process_definition:
* get:
* description: Gets a ProcessDefinition for a given ProcessModel.
* tags: [ProcessModels]
* parameters:
* - name: includeXml
* in: query
* description: Whether or not to include the raw XML for each process instance. CAUTION, This will significantly increase the response body size!
* required: false
* schema:
* type: boolean
* example: true
* default: false
* - name: includeCount
* in: query
* description: Whether or not to include the total count of matching query results.
* required: false
* schema:
* type: boolean
* example: false
* default: true
* - name: processModelId
* in: path
* description: The ID of the ProcessModel for which to retrieve the ProcessDefinition.
* required: true
* schema:
* type: string
* example: myProcess_12345678
* responses:
* 200:
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/ProcessDefinition'
*/
getProcessDefinitionForProcessModel: `/process_models/${params.processModelId}/process_definition`,
/**
* @swagger
* /process_models/{processModelId}/start:
* post:
* description: Starts a new instance from the given set of parameters.
* tags: [ProcessModels]
* parameters:
* - name: processModelId
* in: path
* description: The ID of the ProcessModel for which to start a new instance.
* required: true
* schema:
* type: string
* example: myProcess_12345678
* requestBody:
* content:
* application/json:
* required: true
* schema:
* $ref: '#/components/schemas/ProcessStartRequest'
* responses:
* 200:
* content:
* application/json:
* schema:
* $ref: '#/components/schemas/ProcessStartResponse'
*/
startProcessInstance: `/process_models/${params.processModelId}/start`,
/**
* @swagger
* /process_models/{processModelId}:
* delete:
* description: Deletes the ProcessDefinition that contains the Process Model with the given ID.
* tags: [ProcessModels]
* parameters:
* - name: processModelId
* in: path
* description: The ID of the ProcessModel for which to delete the ProcessDefinition.
* required: true
* schema:
* type: string
* example: myProcess_12345678
* - name: delete_all_related_data
* in: query
* description: If set to true, all ProcessInstances related to the ProcessDefinition will be deleted as well.
* required: false
* schema:
* type: boolean
* example: true
* responses:
* 204:
* description: Indicates the ProcessDefinition was successfully deleted.
*/
deleteProcessDefinitionByProcessModelId: `/process_models/${params.processModelId}`,
/**
* @swagger
* /process_models/{processModelId}/enable:
* post:
* description: Enables the given Process Model.
* tags: [ProcessModels]
* parameters:
* - name: processModelId
* in: path
* description: The ID of the ProcessModel to enable.
* required: true
* schema:
* type: string
* example: myProcess_12345678
* responses:
* 204:
* description: Indicates the ProcessModel was successfully enabled.
*/
enableProcessModel: `/process_models/${params.processModelId}/enable`,
/**
* @swagger
* /process_models/{processModelId}/disable:
* post:
* description: Disables the given Process Model.
* tags: [ProcessModels]
* parameters:
* - name: processModelId
* in: path
* description: The ID of the ProcessModel to disable.
* required: true
* schema:
* type: string
* example: myProcess_12345678
* responses:
* 204:
* description: Indicates the ProcessModel was successfully disabled
*/
disableProcessModel: `/process_models/${params.processModelId}/disable`,
// ProcessInstance
/**
* @swagger
* /process_instances/query:
* get:
* description: Gets all ProcessInstances that match the given query.
* tags: [ProcessInstances]
* parameters:
* - name: includeXml
* in: query
* description: Whether or not to include the raw XML for each process instance. CAUTION, This will significantly increase the response body size!
* required: false
* schema:
* type: boolean
* example: true
* default: false
* - name: includeCount
* in: query
* description: Whether or not to include the total count of matching query results.
* required: false
* schema:
* type: boolean
* example: false
* default: true
* - name: offset
* in: query
* description: The index of the first ProcessInstance to include in the result set.
* required: false
* schema:
* type: number
* example: 0
* - name: limit
* in: query
* description: The maximum number of ProcessInstances to return.
* required: false
* schema:
* type: number
* example: 10
* - name: correlationId
* in: query
* description: Filter by the CorrelationId of the ProcessInstances.
* required: false
* schema:
* type: Array<string> | string | SearchQuery
* oneOf:
* - type: string
* example: myCorrelationId
* - type: Array<string>
* example: ['myCorrelationId1', 'myCorrelationId2']
* - $ref: '#/components/schemas/SearchQuery'
* - name: processInstanceId
* in: query
* description: Filter by the ID of the ProcessInstances.
* schema:
* type: Array<string> | string | SearchQuery
* oneOf:
* - type: string
* example: myProcessInstance_12345678
* - type: Array<string>
* example: ['myProcessInstance_12345678', 'myProcessInstance_87654321']
* - $ref: '#/components/schemas/SearchQuery'
* - name: processDefinitionId
* in: query
* description: Filter by the ID of the ProcessDefinition that the ProcessInstances belong to.
* schema:
* type: Array<string> | string | SearchQuery
* oneOf:
* - type: string
* example: myProcess_12345678
* - type: Array<string>
* example: ['myProcess_12345678', 'myProcess_87654321']
* - $ref: '#/components/schemas/SearchQuery'
* - name: processModelId
* in: query
* description: Filter by the ID of the ProcessModel that the ProcessInstances belong to.
* schema:
* type: Array<string> | string | SearchQuery
* oneOf:
* - type: string
* example: myProcessModel_12345678
* - type: Array<string>
* example: ['myProcessModel_12345678', 'myProcessModel_87654321']
* - $ref: '#/components/schemas/SearchQuery'
* - name: processModelName
* in: query
* description: Filter by the name of the ProcessModel that the ProcessInstances belong to.
* schema:
* type: Array<string> | string | SearchQuery
* oneOf:
* - type: string
* example: My Process Model
* - type: Array<string>
* example: ['My Process Model', 'My Other Process Model']
* - $ref: '#/components/schemas/SearchQuery'
* - name: processModelHash
* in: query
* description: Filter by the hash of the ProcessModel that the ProcessInstances belong to.
* schema:
* type: Array<string> | string | SearchQuery
* oneOf:
* - type: string
* example: 12345678
* - type: Array<string>
* example: ['12345678', '87654321']
* - $ref: '#/components/schemas/SearchQuery'
* - name: ownerId
* in: query
* description: Filter by the ID of the User that owns the ProcessInstances.
* schema:
* type: Array<string> | string | SearchQuery
* oneOf:
* - type: string
* example: 12345678
* - type: Array<string>
* example: ['12345678', '87654321']
* - $ref: '#/components/schemas/SearchQuery'
* - name: state
* in: query
* description: Filter by the state of the ProcessInstances.
* schema:
* type: Array<string> | string | SearchQuery
* oneOf:
* - type: string
* example: running
* - type: Array<string>
* example: ['running', 'finished']
* - $ref: '#/components/schemas/SearchQuery'
* - name: parentProcessInstanceId
* in: query
* description: Filter by the ID of the parent ProcessInstance.
* schema:
* type: Array<string> | string | SearchQuery
* oneOf:
* - type: string
* example: myParentProcessInstance_12345678
* - type: Array<string>
* example: ['myParentProcessInstance_12345678', 'myParentProcessInstance_87654321']
* - $ref: '#/components/schemas/SearchQuery'
* - name: embeddedProcessModelId
* in: query
* description: Filter by the ID of the embedded process model.
* schema:
* type: Array<string> | string | SearchQuery
* oneOf:
* - type: string
* example: myModel1
* - type: Array<string>
* example: ['myModel1', 'myModel2']
* - $ref: '#/components/schemas/SearchQuery'
* - name: terminatedByUserId
* in: query
* description: Filter by the ID of the User that terminated the ProcessInstances.
* schema:
* type: Array<string> | string | SearchQuery
* oneOf:
* - type: string
* example: 12345678
* - type: Array<string>
* example: ['12345678', '87654321']
* - $ref: '#/components/schemas/SearchQuery'
* - name: createdBefore
* in: query
* description: The maximum created date of the ProcessInstances to include in the results.
* schema:
* type: string
* example: 2021-01-01T00:00:00.000Z
* - name: createdAt
* in: query
* description: The minimum created date of the ProcessInstances to include in the results.
* schema:
* type: Array<string> | string
* oneOf:
* - type: string
* example: 2021-01-01T00:00:00.000Z
* - type: array
* items:
* type: string
* example: ['2021-01-01T00:00:00.000Z', '2021-01-02T00:00:00.000Z']
* - name: createdAfter
* in: query
* description: The minimum created date of the ProcessInstances to include in the results.
* schema: