Get BPMN 2.0 XML

Retrieves the BPMN 2.0 XML of a process definition.

Method

GET /process-definition/{id}/xml

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

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

Parameters

Path Parameters

Name Description
id The id of the process definition.
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 containing the id of the definition and the BPMN 2.0 XML.

Name Value Description
id String The id of the process definition.
bpmn20Xml String An escaped XML string containing the XML that this definition was deployed with. Carriage returns, line feeds and quotation marks are escaped.

Response Codes

Code Media type Description
200 application/json Request successful.
403 application/json The xml cannot be retrieved due to missing permissions on process definition resource. See the Introduction for the error response format.
404 application/json Process definition with given id/key does not exist. See the Introduction for the error response format.

Example

Request

GET /process-definition/aProcessDefinitionId/xml

GET /process-definition/key/aProcessDefinitionKey/xml

Response

{"id":"aProcessDefinitionId",
"bpmn20Xml":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<definitions xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
...
<userTask id=\"approveInvoice\" camunda:expression=\"${true}\" name=\"approve invoice\">\r\n
..."}

On this Page: