Process definition "description" field

I would like to define process “description” using Camunda REST API.

As we know, REST API enables to read Process “description” field easily:
https://docs.camunda.org/manual/7.6/reference/rest/process-definition/get/

But i cannot find how i could define this field.

Hi @Erki_Kriks

If you are looking to edit an existing process definition programmatically then have a look at “BPMN Model API” which is Java API (You can’t use Rest API)

https://docs.camunda.org/manual/latest/user-guide/model-api/bpmn-model-api/

Thank you for feedback!

But where is the process “description” field when defining new BPMN data model with Java API?

Hi @Erki_Kriks,

The description attribute corresponds to the documentation element of the process in the BPMN XML.

Cheers,
Thorben

2 Likes

Yes, works perfectly!

// add process description field
Documentation doc = modelInstance.newInstance(Documentation.class);
doc.setId(“description”);
doc.setTextContent(service.getDescription());
process.getDocumentations().add(doc);

And after BPMN deploy to Camunda i see expected successful result in address:
http://mycamunda/camunda/engine-rest/engine/default/process-definition/

Thank you very much!

Same question about tasks, how to add description to task?

Thanks!
Erki

Same answer :slight_smile:

See https://docs.camunda.org/manual/7.6/reference/bpmn20/tasks/user-task/#description

2 Likes

Yes, work perfectly!

Same result:

Documentation doc = modelInstance.newInstance(Documentation.class);
doc.setId(“description”);
doc.setTextContent(“Task description information”);
task.getDocumentations().add(doc);

Thanks! :slight_smile: