@timg There is no official API to return the Form that starts a process at the moment. About you using the internal API, you should list processes from Operate API, but it also would not return the start form for you, unfortunately. Tasklist has some internal endpoints that are used only by the application, you can use them, but be aware that they can be changed by the engineers to adapt to new features on Tasklist. So here you have 2 options:
- Do the same as Tasklist is doing: the call below should return you the form in case this process is started by one (in case not, it will return 404) - also please bear in mind that because this is an internal endpoint, changes may occur on it without notifications.
curl -X 'GET' \
'http://localhost:8080/v1/external/process/<process_id>/form' \
-H 'accept: application/json'
Example of return:
{
"id": "subscribeForm",
"processDefinitionKey": "2251799813685273",
"title": "subscribeFormProcess",
"schema": "\n {\n \"components\": [\n {\n \"text\": \"# Subscribe to newsletter\",\n \"type\": \"text\",\n \"layout\": {\n \"row\": \"Row_0jjnqip\",\n \"columns\": null\n },\n \"id\": \"Field_1xn41dw\"\n },\n {\n \"label\": \"Name\",\n \"type\": \"textfield\",\n \"layout\": {\n \"row\": \"Row_15ghdy6\",\n \"columns\": null\n },\n \"id\": \"Field_0ibsmz4\",\n \"key\": \"field_1lfayry\"\n },\n {\n \"label\": \"Email\",\n \"type\": \"textfield\",\n \"layout\": {\n \"row\": \"Row_1klibf9\",\n \"columns\": null\n },\n \"id\": \"Field_0msuoi3\",\n \"key\": \"field_1prtdvl\",\n \"validate\": {\n \"required\": true\n }\n }\n ],\n \"type\": \"default\",\n \"id\": \"subscribe\",\n \"executionPlatform\": \"Camunda Cloud\",\n \"executionPlatformVersion\": \"8.3.0\",\n \"exporter\": {\n \"name\": \"Camunda Modeler\",\n \"version\": \"5.12.0-nightly.20230524\"\n },\n \"schemaVersion\": 8\n}\n ",
"version": null,
"tenantId": "<default>",
"isDeleted": false
}
- Another option would be to use exporters/importers and save the process on a storage of your preference, so you could use the xml process to find out what form should start the process.
I’m taking a request to make the start form as part of our official API when listing Processes.
A quick question just out of curiosity, on the POC you are doing are you trying to do the same as Tasklist - that is to display the form and start the process?