Get BPMN 2.0 XML

Retrieves the BPMN 2.0 XML of this process definition.

Method

GET /process-definition/{id}/xml

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

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

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.
400 application/json The path parameter "key" has no value.
Process definition with given id does not exist. See the Introduction for the error response format.
404 application/json Process definition with given 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: