Hi everyone,
I’m using Camunda 8 Self-Managed and I’m trying to retrieve the form associated with a deployed BPMN process.
Currently, I only have the processDefinitionId (the BPMN process ID, for example Process_0abcd123).
From the documentation, it looks like:
This means my current flow is:
-
Search for the process definition using processDefinitionId.
-
Retrieve the processDefinitionKey.
-
Use the processDefinitionKey to fetch the form.
Is this the recommended approach, or is there another API or best practice that allows retrieving the form directly from the processDefinitionId (or another identifier available in the BPMN(formId)) without performing the additional lookup?
Any guidance or recommended approach would be appreciated. Thanks!
Your current 3-step approach is indeed the recommended way, as Camunda 8 form APIs require the processDefinitionKey (system-generated key) rather than the processDefinitionId (BPMN process ID). I found the following relevant resources:
Does this help? If not, can anyone from the community jump in? 
Hints: Use the Ask AI feature in Camunda’s documentation to chat with AI and get fast help. Report bugs and features in Camuda’s GitHub issue tracker. Trust the process. 
Hi Satyam Gupta,
Yes, your approach is the recommended one, because a form has its own version, and a process definition has its own version too. If you were to search for a form directly using the processDefinitionId, you would also need to specify a version number to know exactly which form to retrieve, which adds extra complexity.
On the other hand, the processDefinitionKey already solves this problem. It is a unique number generated by the system for each new deployment, meaning the version is implicitly included in the key itself. So by using the processDefinitionKey, you are already pointing to a specific version of the process and its associated form, with no ambiguity.
Starting from Camunda 8.8, with the new Orchestration Cluster API, form retrieval has been simplified even further. You no longer need a formId at all:
To get the form of a user task, you only need the userTaskKey
GET > /user-tasks/{userTaskKey}/form
To get the start form of a process, you only need the processDefinitionKey
GET > /process-definitions/{processDefinitionKey}/form