Camunda Tasklist: REST: How to get User Task Form fields as Json?

Hello,

ho is i possible to get the form fields (generated Task Forms) as a JSON from Camunda?

Here is a sample User Task:

I see only one way to retrieve the rendered form.
But that doesn’t help me, because I need the structure to process it myself.

How it is possible?

I search for aa result like this:

{"camunda:formField": [
      {
        "id": "input1",
        "label": "My Input1",
        "type": "string",
        "defaultValue": "test default value",
      },
      {
        "id": "isimportant",
        "label": "Is it important?",
        "type": "boolean",
        "defaultValue": "true"
      }
    ]}

With /task/ID/rendered-form i only get HTML
With /task/ID/form-variables i only get the variables but not the form fields.

Hi @lul,

the generated task forms are tightly coupled to the Camunda Tasklist.

You can check the implementation here: camunda-bpm-platform/engine/src/main/java/org/camunda/bpm/engine/impl/form/engine at master · camunda/camunda-bpm-platform · GitHub

Maybe you can implement your own custom form engine and add it to the configuration: camunda-bpm-platform/ProcessEngineConfigurationImpl.java at master · camunda/camunda-bpm-platform · GitHub ?

Hope that helps, Ingo

1 Like