X4 Help Center
Breadcrumbs

Data Objects

To map processes in X4 BPMS, you need to define the required data structure for the Business Process in a so-called domain model file (.domainmodel).

With the Data Objects plugin, you extend domain model files in the X4 BPMS with the Data Object tab. On this tab, you can define a complex XML structure that models your business data.

For more information on domain model files, see Managing Domain Models.

For more information on how to work on the Data Object tab, see Defining Data Objects .

Setting up the database

  1. Start the desired PostgreSQL or MSSQL database and create the X4SERVER schema.

  2. Run the provided Liquibase script to create the database tables.

Installing the plugin

The plugin is included in the standard X4 BPMS package. No further installation steps are required.

Configuring the plugin

If you want to use the supplied H2 database, you do not need the dataobjects_persistence.xml file. By default, the data objects are persistent in the H2 database.

If you want to use your own database, perform the following steps:

  1. In the <server_directory>/configurations folder, create the dataobjects_persistence.xml file.

  2. Connect the plugin to the database using JDBC or a JNDI datasource.

Notes:

  • When using the JNDI datasource, a corresponding datasource must be created in the standalone.xml in the <server_directory>\wildfly\standalone\configuration folder:

    image-20250227-104803.png
  • If both a JDBC connection and a JNDI datasource are defined in the dataobjects_persistence.xml file, the JNDI datasource is used to connect to the database.

JDBC example configuration

XML
?xml version="1.0" encoding="UTF-8"?>
<DataObjectPersistenceConfig>
    <JdbcUrl>jdbc:postgresql://localhost:5432/postgres</JdbcUrl>
    <JdbcUser>postgres</JdbcUser>
    <JdbcPassword>MyStrong@Password1</JdbcPassword>
    <DefaultSchema>X4SERVER</DefaultSchema>
</DataObjectPersistenceConfig>

Example configuration of JNDI datasource

XML
<?xml version="1.0" encoding="UTF-8"?>
<DataObjectPersistenceConfig>
    <JtaDataSource>java:/DataObjectsPersistence</JtaDataSource>
</DataObjectPersistenceConfig>

Managing access rights

After installing and configuring the plugin, you need to assign the following roles to the users in Keycloak who are supposed to work with the plugin in the respective roles..

Role

Description

dataobject_writer

Allows the creation and updating of data objects.

dataobject_reader

Allows you to read existing data objects.

dataobject_delete

Allows the deletion of existing data objects.

Note:

Users who do not have the necessary role cannot execute the respective functions.

Automatic deletion of expired data objects

An automatic background process deletes expired data objects. This can also be configured via the dataobjects_persistence.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<DataObjectPersistenceConfig>
    <EnableDeletion>true</EnableDeletion>
    <DeletionIntervalMillis>60000</DeletionIntervalMillis>
</DataObjectPersistenceConfig>

If this configuration is not present, automatic deletion is turned off by default. If deletion is enabled, but no deletion interval is defined, the deletion will occur once per hour by default.

The default value of the retentionTime for data objects is 90 days. That is, by default, a data object is considered to have expired 90 days after the timestamp of the last update.

You can adjust the retention time of a data object within a Business Process by inserting the Data Object Persistence Adapter into your process. For more information about the Data Object Persistence Adapter, see Data Object Persistence Adapter.