Data model in the process

In order to use the data model in a process, the following steps must be performed:

  1. Create a data model.

  2. Bidirectionally bind the data model keys to the request (details described in the section Data model in the interface).

  3. Run the application with the assigned data model.

After completing the above steps, the data model is available in the process.


Where can the data model be used?

The data model can be used in:

  • script tasks,

  • userTasks,

  • subprocesses.


Limitations — where do model keys not work?

Data model keys do not work in:

If we want to use model data in these BPMN elements, we must map them to process variables. More information in the section Passing data to the process.


modelInstanceId – access to the model instance

A process that uses the data model automatically receives the variable:

modelInstanceId

It is the identifier of the data model instance in which the model values are stored. All operations on the data model during the process use this variable.


Script tasks

A detailed description of using the data model in script tasks can be found here: Script task API and Data model API.


UserTasks

In UserTasks, using the data model consists of using the model keys in the same way as in the section Data model in the interface.


Subprocesses

To use the data model in a subprocess:

  1. Pass the variable to the subprocess modelInstanceId.

  2. Variable name must be identical as in the calling process.

Last updated

Was this helpful?