Skip to main content

Persistence

A database layer is provided for storing workflow instances. All workflow instances and their associated data are kept in this layer. This layer is called master data.

The vNext Platform supports the Dual-Write Pattern. With this support:

  • Workflow instance data changes can be provided as a stream using the Event Sourcing approach. (CDC - Change Data Capture)
  • Copies of workflow instances can be hosted in another database. (Replication)

Master Data

Entity Framework-based database is used to store workflow instances:

  • A schema is created for each workflow.
  • Each workflow instance is stored in different data tables.
  • Each domain works with a different database.
  • Each runtime runs only one domain.
  • Domains cannot be divided into runtimes.

Workflow Schemas

For each workflow, a schema is created and a predefined set of tables is created to store data within it.

Tables

Instance: Holds basic information for each workflow instance.

InstanceData: Holds the data set contained in the workflow.

InstanceCorrelation: References of workflow instances started as SubProcess/SubFlow type. SubProcess/SubFlow may be running on a different domain.

InstanceTransition: Holds all transition information related to the workflow instance.

InstanceTask: Holds all task execution information related to the workflow instance.

InstanceAction: Holds all sub-step execution information related to a task executed in the workflow instance.

InstanceJobs: Holds all information related to scheduled tasks executed in the workflow instance.

Task

Task can work for multiple subjects, so there is a Type enum type to know for what purpose it was triggered. The reference field is used for the unique number of the record instance of the type that triggered the Task.

DB Diagram