Set definition key when creating deployment via REST API


#1

Hello,

I’m creating a deployment with a DMN table via REST API.
It works. I’m providing the “deployment-name” as “contact” as described in the documentation (https://docs.camunda.org/manual/latest/reference/rest/deployment/post-deployment/)

POST /engine-rest/deployment/create HTTP/1.1
Host: camunda-xxx.valuecare24.de
Authorization: Basic XXXXXXXXXXXX==
Cache-Control: no-cache
Postman-Token: da73edaf-9200-578a-39a4-018b8125d52e
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="deployment-name"

contact
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="enable-duplicate-filtering"

false
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="deploy-changed-only"

false
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="deployment-source"

contact.dmn
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="fileName"; filename=""
Content-Type:

Now the problem:
I cannot find a parameter in the documentation to define the Definition Key for my deployment. It ends up being set to “decision”, as you can see from the screenshot. This sounds like a generic default value to me. I want to set it to “contact”. Is there a way to achieve this?

PS: I don’t want to wrap the DMN table in a process application.

Thanks in advance and best regards

Steffen Brand


#2

Hi Steffen,

You can define the definition key in the modeler’s advanced mode, see

Cheers,
Thorben


#3

Thanks a lot :smiley:
I was on a completely wrong path and wouldn’t have found this in a million years :slight_smile:


#4

You’re welcome.

Some background: The highlighted field in the modeler is used to edit the ID of the decision table. The engine maps the ID in XML to the key of the deployed decision. Similarly, the engine interprets a BPMN process ID or CMMN case ID as defined in XML to the key attribute of the resulting process or case definition.