Database Schema
When the modeler is enabled (cibseven.webclient.modeler.enabled: true), the webclient requires a database schema to store diagrams, forms, and user sessions. The required tables must be created before startup. The webclient can connect to and use the database, but it does not create, update, or validate the schema itself (ddl-auto: none).
When the modeler is disabled (cibseven.webclient.modeler.enabled: false), its persistence components are disabled with it. If no other feature of the webclient stores data — the enterprise chat does — then no datasource configuration or database connection is required at all, as JPA is not initialized.
The tables are created by the engine: they are an optional part of its schema, and the engine creates and updates them like its own tables, see Database Schema for the SQL scripts and the Liquibase changelog.
Database Tables
| Table | Description |
|---|---|
mod_processes_diagrams |
Stores BPMN and DMN diagram metadata and the raw XML. From 3.0.0 a process key is unique within its folder, no longer across all folders |
mod_forms |
Stores form schemas as JSON. From 3.0.0 a form id is unique within its folder, no longer across all folders |
mod_user_sessions |
Tracks open editing sessions per user |
mod_diagram_usage |
Associates a user session with a specific diagram |
mod_form_usage |
Associates a user session with a specific form |
mod_element_templates |
Stores reusable element template definitions |
mod_folders |
The folders diagrams and forms are organized in. Each row names its parent, so the table holds the whole tree; a row without a parent is a folder at the top level. From 3.0.0 each row also names its project in project_id: the folder at the top level it lies under, which for that folder is itself. Required from 3.0.0 |
mod_processes_diagrams_aud |
Stores one snapshot of a diagram per save, so earlier states can be browsed, restored and compared. Written only by the enterprise edition; the community edition leaves it empty |
mod_forms_aud |
Stores one snapshot of a form per save, as mod_processes_diagrams_aud does for diagrams. From 3.0.0. Written only by the enterprise edition; the community edition leaves it empty |
mod_revinfo |
Numbers the snapshots of diagrams and forms and records when each was written. Enterprise Edition only |
mod_project_members |
The members of the projects, the folders at the top level: one row per user or group, with its role. A project without rows is open to every modeler user. Rows go when their project is deleted. Written only by the enterprise edition, from 3.0.0; the community edition leaves it empty |
chat_messages |
Stores real-time chat messages per room. Deleted messages are soft-deleted: the content is cleared and the row is retained as a tombstone, marked by deleted_at, so that polling clients learn about the deletion. Enterprise Edition only. |
chat_presence |
Tracks active users per chat room for the long-polling transport. Each row is a heartbeat record refreshed on every poll; stale entries are purged automatically. Enterprise Edition only. |
Enterprise Feature
The chat_messages and chat_presence tables are only used when the enterprise edition is active, cibseven.webclient.modeler.enabled: true, and cibseven.webclient.modeler.chat.enabled: true. The engine creates them with the other tables of this page all the same, so they also exist in an installation of the community edition, where they stay empty.
Schema Updates
The modeler tables are part of the engine schema, so they are updated with it. Follow the
database schema update guide — either the Liquibase
changelog or the $DATABASENAME_engine_$X_to_$Y.sql scripts — rather than applying modeler DDL by hand.
2.2 to 3.0
The update to 3.0 changes the modeler, chat and notification tables in the 2.2-to-3.0-extensions changelog
entry and the $DATABASENAME_extensions_2.2_to_3.0.sql scripts, separate from the engine’s own 2.2-to-3.0
entry and $DATABASENAME_engine_2.2_to_3.0.sql scripts. The Liquibase entry runs only where these tables
already exist (it checks for mod_element_templates), so an installation without them is left as it is.
The long-polling chat transport added two schema changes:
- the
chat_presencetable - the
deleted_atcolumn onchat_messages
A 2.2 installation that already used the chat over the websocket transport needs this update before
switching to longpolling: without chat_presence and deleted_at, presence and deletion events cannot be
served from the database.
chat_messages has to exist
The update alters chat_messages, so that table must already be present. Installations updated from 2.1
have it, because the 2.1 to 2.2 update creates it. An installation that was set up fresh at 2.2 only has it
if the modeler creation script was applied. Where it is missing, apply that script before the update —
otherwise the update fails on the chat_messages change, whether or not the chat is enabled.
Folders
The modeler organizes diagrams and forms in folders from 3.0.0, which the same update applies:
- the
mod_folderstable - a
folder_idcolumn onmod_processes_diagramsand onmod_forms, each with a foreign key tomod_folders - a folder named General, and every existing diagram and form filed into it
- from 3.0.0, a
project_idcolumn onmod_folders, with an index, set on General to its own id
The models of an installation that is updated therefore keep working and appear together in one folder, rather than in a list that has nowhere to belong. The id of that folder is written out in the update script rather than generated, so the same statement can both create it and file the models into it on every database.
The modeler keeps project_id current as folders are created and moved, and on start fills it in for any folder that has none or a wrong one. The enterprise edition uses it to leave the models of the projects a user may not see out of its lists inside the query.
Only where the modeler is enabled
mod_folders belongs to the modeler component of the engine schema. An engine with the modeler disabled creates none of the mod_ tables and needs none of this. See Enable / Disable.
Project members
From 3.0.0 the enterprise edition can restrict a project to its members, see Project Members. The update to 3.0 adds the table for them, mod_project_members, applied by the 2.2-to-3.0-extensions changelog entry and the $DATABASENAME_extensions_2.2_to_3.0.sql scripts. The enterprise modeler reads that table on every request, so it cannot open any folder until the update has been applied.
The update writes no rows: every project, General included, stays open to everyone after it. From then on the enterprise edition makes the creator of a project its Project Admin, and the owner of a user folder the first time they open the modeler.
Process keys and form ids per folder
Up to 2.2, a process key and a form id were unique across the whole modeler. From 3.0.0 they are unique within their folder only, so the same key can exist in several folders. The update to 3.0 makes this change, applied by the 2.2-to-3.0-extensions changelog entry and the $DATABASENAME_extensions_2.2_to_3.0.sql scripts:
- it drops the unique constraint on
processkeyinmod_processes_diagramsand onformidinmod_forms - it adds
mod_uk_diagrams_key_folderonprocesskeyandfolder_id, andmod_uk_forms_formid_folderonformidandfolder_id. On DB2 these two are unique indexes, because DB2 allows no NULL in a unique constraint andfolder_idmay be NULL
2.2 created the old constraints without a name, so each database chose one, and the scripts find it per database. On DB2 the update copies processkey and formid into new columns that replace the old ones, and reorganizes both tables with REORG TABLE through SYSPROC.ADMIN_CMD, so the user running it needs the authority to call that procedure.
The data needs no change: keys that were unique across the modeler are unique within every folder too.
Form snapshots
From 3.0.0 the enterprise edition also keeps snapshots of forms, see Snapshots & Comparison. The update to 3.0 adds their table, mod_forms_aud, applied by the 2.2-to-3.0-extensions changelog entry and the $DATABASENAME_extensions_2.2_to_3.0.sql scripts. It numbers its snapshots through mod_revinfo, like the diagram snapshots. The update writes no rows: forms saved before it have no history.
Diagram snapshots
From 3.0.0 the enterprise edition writes the diagram snapshots itself, where earlier versions had Hibernate
Envers write them. This needs no schema change and no migration: mod_processes_diagrams_aud and
mod_revinfo keep the shape they had, snapshots written by 2.2 stay readable, and snapshots written by 3.0
have the same columns filled.
What does change is that spring.jpa.properties.hibernate.integration.envers.enabled no longer has any
effect and can be dropped from the configuration — including from the Helm values, where it was set for the
webclient deployment. Leaving it in place is harmless: nothing reads it any more.
Supported Databases
Refer to Prerequisites for supported database versions.