Skip to main content

Fetching an existing JSON Variable

The Form SDK will only fetch those variables which are actually used in a form. Since a JSON object is usually not bound to a single input field, we cannot use the cam-variable-name directive. We thus need to fetch the variable programatically:
After that, you can work with the JSON object in your form, e.g., use it in input fields:

Creating a new JSON Variable

You can use JSON objects in your embedded forms. In order to persist this data in the process instance, you have to explicitely create the variable in the variableManager. This code-snippet creates the variable customer.

Full Example

A full example of this feature can be found in the Camunda Examples Repository.