Data model in the process

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

  1. Create the data model.

  2. Bind the data model keys bidirectionally to the application (details described in the section Data model on the interface).

  3. Run the application with the assigned data model.

After performing 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.


Restrictions — 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 a variable:

modelInstanceId

This 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 tasks API and Data model API.


UserTasks

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


Subprocesses

To use the data model in a subprocess:

  1. Pass the variable to the subprocess modelInstanceId.

  2. The variable name must be identical as in the calling process.

Last updated

Was this helpful?