Skip to main content
Version: 8.9

Data handling

Process data in Camunda is represented by variables. A variable has a name and a JSON value, and its visibility is determined by its variable scope.

BPMN processes do not have an explicit data model or schema. Instead, variables are created implicitly during process execution — for example, when a process instance is started with variables, when a job worker completes a job, when a message is correlated, or when input/output variable mappings are applied.

Because there is no formal schema, the modeler infers the available variables by analyzing what is defined in the process diagram itself. This page explains how that works, and how you can help the modeler provide better editor support.

How the modeler discovers variables

The modeler scans the process diagram and collects variables from the definitions it finds, such as:

The discovered variables are used in the following places:

  • FEEL editor suggestions — when writing expressions, the FEEL editor suggests variables in scope for the current element.
  • The Variables panel — an overview of all variables found in the diagram (see Inspecting variables).
note

The modeler can only discover variables that are explicitly defined in the diagram. Variables created at runtime — for example, by job workers, passed as process start variables, or set through the API — are not visible in the modeler unless you define them explicitly using example data.

Inspecting variables

The Variables panel helps you explore the variables in your process. Use it to understand which variables are visible in a given scope, where they are written, and what values they hold.

Variables panel

Selecting elements

The list of variables shown in the panel depends on the element or elements you have selected on the canvas. When you select one or more elements, the panel displays all variables in the scope of those elements, including variables from parent scopes (for example, a sub-process scope or the process scope).

If no element is selected, the panel shows variables at the process level.

Filtering variables

Use the search bar at the top of the panel to filter the displayed list of variables by name.

To show only the variables written by the selected elements, enable the Written by selection toggle.

Variable details

Expand a variable to see its details:

  • Written by — lists all elements in the diagram that write to this variable.
  • Value — shows the value of the variable, if it can be determined from the diagram.

Defining example data

Camunda 8 only

To help with editor support, you can add example data to an element. Add a JSON return value in the Data section of the properties panel. The values are used to derive variable names and types in the FEEL editor. Nested objects are also supported.

Providing this data is optional, but it's recommended if you want to take full advantage of the FEEL editor's suggestions. It is especially useful for variables that the modeler cannot discover automatically, such as variables created by job workers or passed as process start variables.

This data will also be used while playing your process to set variables from the respective elements when performing the following actions:

  • Starting a new instance
  • Completing a job
  • Publishing a message with variables
note

The provided example data is only used by the FEEL editor to provide variable suggestions while modeling, and by Play to prefill variables. It is not used during process execution.

Variable suggestions with example data

Data provided this way is added to the scope of the element. To use the data in other parts of your process, you can use output mappings to make the variables available in the parent scope.

Next steps