Database

The IBM Process Mining application requires the databases, Monet 11.49.5 or 11.49.9 and MongoDB 5.0 or later.

Installing MonetDB

To install MonetDB, use one of the following commands depending on your operating system.

  • To install MonetDB on Ubuntu Operating System, run the following command:

    echo "deb https://dev.monetdb.org/downloads/deb/ $(lsb_release -sc) monetdb" | sudo tee /etc/apt/sources.list.d/monetdb.list
    sudo wget --output-document=/etc/apt/trusted.gpg.d/monetdb.gpg https://dev.monetdb.org/downloads/MonetDB-GPG-KEY.gpg
    sudo apt update
    sudo apt install monetdb5-sql monetdb-client
    

    For more information, see Ubuntu&Debian Easy Setup.

    If the default available version of MonetDB is not supported for Ubuntu, you must state the explicit version during the installation:

    sudo apt install monetdb5-sql=11.49.9 monetdb-client=11.49.9 libmonetdb-client26=11.49.9 libmonetdb-stream26=11.49.9 monetdb5-server=11.49.9 libmonetdb28=11.49.9
    
  • To install MonetDB on RedHat, run the following command:

    sudo yum install https://dev.monetdb.org/downloads/epel/MonetDB-release-epel.noarch.rpm
    sudo rpm --import https://dev.monetdb.org/downloads/MonetDB-GPG-KEY
    sudo yum install MonetDB-SQL-server5 MonetDB-client
    

    For more information, see RedHat&CentOS Easy Setup.

    If the default available version of MonetDB is not supported for RedHat, you must state the explicit version during the installation:

    sudo yum install MonetDB-SQL-server5-11.49.9 MonetDB-client-11.49.9 MonetDB-11.49.9 MonetDB-stream-11.49.9
    

After the installation, do the following steps:

  1. Ensure that MonetDB is not enabled with the following command on Ubuntu and RedHat:
sudo systemctl status monetdbd
sudo systemctl stop monetdbd
sudo systemctl disable monetdbd
  1. Run the following commands to enable MonetDB the access to the library file shipped with IBM Process Mining:

For Ubuntu:

pushd /usr/lib/x86_64-linux-gnu/monetdb5
cp <PM_HOME>/native/linux/x64/*.so .
ln -s lib_PM-sql-1.15.0.so lib_PM-sql.so
popd

For RedHat:

pushd /usr/lib64/monetdb5
cp <PM_HOME>/native/linux/x64/*.so .
ln -s lib_PM-sql-1.15.0.so lib_PM-sql.so
popd

Configuring MonetDB

Standard configuration of MonetDB is automatic and does not require manual configuration. However, you can manually configure some settings in environment.conf and processmining.conf files.

Configuring MonetDB in environment.conf file

In <PM_HOME>/bin/environment.conf you can configure database name, listener, and database port settings. To do that, use the following properties in the environment.conf file:

PM_MONET_PORT=50000
PM_MONET_LISTEN=0.0.0.0
PM_MONET_DB_NAME=processmining

When you introduce changes to the processmining.conf file, make sure you do it correctly. For more information, see the Configuration file editing guidelines section.

Configuring MonetDB in processmining.conf file

In <PM_HOME>/etc/processmining.conf you can configure advanced settings such as database password and connection pool section.

To configure MonetDB, use the following section in processmining.conf file:

{
    monetdb: {
      database: "mydb",
      host: "127.0.0.1",
      port: 50000,
      user: "monetdb",
      password: "***",
      hikari: {
        poolName: "PMHikariCP_",
        maximumPoolSize: 16,
        connectionTimeout: 4000, #4 sec
        maxLifetime: 1800000, # 30 min
        minimumIdle: -1,
        idleTimeout: 60000 # 1 min
    }
  },
}

It is not mandatory to specify the password. However, if you choose to enter the password, you should enter it in the encrypted form.

You can also configure the hikari properties, an advanced configuration for the connection pool. For more information about the properties, see the Frequently used topic.

Installing MongoDB instance

You can use any one of the following methods to install a MongoDB instance:

  • Install the Community Edition on the same server as an application or a separated DB server.

  • Install the Enterprise Edition on the same server as an application or a separated DB Server.

  • Subscribe to the MongoDB Atlas service on AWS Cloud. Ensure that you choose the same region as that of the application.

Before you configure MongoDB, you must assign the following three MongoDB roles to the user:
- dbAdmin
- readWrite
- read

Advanced DB configuration (for clustering)

You must use a custom connection string when using a cluster. The following code sample in the <PM_HOME>/etc/processmining.conf file describes a custom connection string:

	persistence: {
  	mongodb: {
	database: "<database name>",
	password: "<database password>",

    	connectionString: “mongodb://username:<PASSWORD>@clusterdev0-shard-00-00-0mh5i.mongodb.net:27017,clusterdev0-shard-00-01-0mh5i.mongodb.net:27017,clusterdev0-shard-00-02-0mh5i.mongodb.net:27017/test?ssl=true&replicaSet=ClusterDev0-shard-0&authSource=admin&retryWrites=true&w=majority”

 		}
	}

The application replaces the <PASSWORD> placeholder with the actual password after the decryption process.

Setting up MongoDB for process app using URI

To set up a process app using URI, do the following:

  • Delete the following attributes in the <PM_HOME>/etc/accelerator-core.properties:

    # mongo configuration please update as per your mongo db detail
    spring.data.mongodb.authentication-database=<authentication database name>
    spring.data.mongodb.database=<database name>
    spring.data.mongodb.port=27017
    spring.data.mongodb.host=<database host>
    spring.data.mongodb.password=<database unencrypted-password>
    spring.data.mongodb.username=<database user>
    spring.data.mongodb.uuid-representation=standard
    
  • Add the following attribute in the <PM_HOME>/etc/accelerator-core.properties file.

Ensure that you include at least the host,port, database, and uuid-representation values in the URI to set up MongoDB for Process Apps. For more information on the URI layout, see the Connection Strings topic in MongoDB documentation.

spring.data.mongodb.uri: mongodb://username:<unencrypted-password>@clusterdev0-shard-00-00-0mh5i.mongodb.net:27017,clusterdev0-shard-00-01-0mh5i.mongodb.net:27017,clusterdev0-shard-00-02-0mh5i.mongodb.net:27017/test?ssl=true&replicaSet=ClusterDev0-shard-0&authSource=admin&retryWrites=true&w=majority&uuidRepresentation=standard

For Process App:
- Replace the <unencrypted-password> with the actual MongoDB password.
- uuidRepresentation=standard is required to set up MongoDB using URI.
- Alternatively, you can manually set up MongoDB. For more information about configuring MongoDB for Process App using manual steps, see the MongoDB configuration for process app.