Problems retrieving the BPMN diagram

Hello,

I’m developing an application and would like to show the BPMN diagram implemented in Camunda. The process is published on the server however when trying to use the GET /process-definition/key/{key}/diagram the API does not return.
I noticed that when calling /process-definition/key/{key}, the returned JSON reports that the diagram is null.

Exemple: http://localhost:8080/engine-rest/process-definition/key/KYCBpm

{“id”:“KYCBpm:1:b8712424-dbca-11e9-b1f7-a08cfd1947be”,“key”:“KYCBpm”,“category”:“http://bpmn.io/schema/bpmn",“description”:"Processo Recertificação KYC - BPM Camunda”,“name”:“KYC BPM”,“version”:1,“resource”:“BPMN/KYC - v1.1.bpmn”,“deploymentId”:“b86eda32-dbca-11e9-b1f7-a08cfd1947be”,“diagram”:null,“suspended”:false,“tenantId”:null,“versionTag”:“1.0”,“historyTimeToLive”:null,“startableInTasklist”:true}

Please, could you share more information on how to retrieve the BPMN diagram?

Thank you,

Marcelo Leopoldino

Are you looking to get back the BPMN XML so that you can have it rendered in with bpmn.io ?
if that’s the case then you’re going to want to use the GET BPMN XML call.

Thank you @Niall for answering my question. I will probably implement the diagram rendering using bpmn-js provided by bpmn.io.

1 Like