Retrieves a process definition according to the ProcessDefinition interface in the engine.

Method

GET /process-definition/{id}

GET /process-definition/key/{key} (returns the latest version of the process definition which belongs to no tenant)

GET /process-definition/key/{key}/tenant-id/{tenant-id} (returns the latest version of the process definition for tenant)

Parameters

Path Parameters

Name Description
id The id of the process definition to be retrieved.
key The key of the process definition (the latest version thereof) to be retrieved.
tenant-id The id of the tenant the process definition belongs to.

Result

A JSON object corresponding to the ProcessDefinition interface in the engine.Its properties are as follows:

Name Value Description
id String The id of the process definition.
key String The key of the process definition, i.e., the id of the BPMN 2.0 XML process definition.
category String The category of the process definition.
description String The description of the process definition.
name String The name of the process definition.
version Number The version of the process definition that the engine assigned to it.
resource String The file name of the process definition.
deploymentId String The deployment id of the process definition.
diagram String The file name of the process definition diagram, if it exists.
suspended Boolean A flag indicating whether the definition is suspended or not.
tenantId String The tenant id of the process definition.
versionTag String The version tag of the process definition.
historyTimeToLive Number History time to live value of the process definition. Is used within History cleanup.

Response Codes

Code Media type Description
200 application/json Request successful.
404 application/json Process definition with given id or key does not exist. See the Introduction for the error response format.

Example

Request

GET /process-definition/invoice:1:c3a63aaa-2046-11e7-8f94-34f39ab71d4e

GET /process-definition/key/invoice

Response

  1. {
  2. "id":"invoice:1:c3a63aaa-2046-11e7-8f94-34f39ab71d4e",
  3. "key":"invoice",
  4. "category":"http://www.omg.org/spec/BPMN/20100524/MODEL",
  5. "description":null,
  6. "name":"Invoice Receipt",
  7. "version":1,
  8. "resource":"invoice.v1.bpmn",
  9. "deploymentId":"c398cd26-2046-11e7-8f94-34f39ab71d4e",
  10. "diagram":null,
  11. "suspended":false,
  12. "tenantId":null,
  13. "versionTag":null,
  14. "historyTimeToLive":5
  15. }

原文: https://docs.camunda.org/manual/7.9/reference/rest/process-definition/get/