From RunaWFE
Jump to navigation Jump to search

An illustration of RunaWFE server configuration for working with two PostgreSQL DBMS examples in Altlinux p7 OS

RunaWFE Free Workflow System (BPMS) Version 4.4.2

© 2015-2021, "Process Technologies" Ltd, this document is available under GNU FDL license. RunaWFE Free is an open source system distributed under a LGPL license (

In this very guide an example of installation of RunaWFE server 4.2 to Altlinux p7 OS is considered. PostgreSQL is used as DMBS. Also installation and configuration of a second PostgreSQL DMBS example for using it as an additional data source in bot tasks is described.

RunaWFE server installation

# apt-get install runawfe-server

Starting the server to check if the installation is successful

# service runawfe4-server start

After the launch RunaWFE web-interface should be available by reference like http://ip:28080/wfe, where ip is the server address.

By default RunaWFE uses H2 DBMS.

Server stop

# service runawfe4-server stop

PostgreSQL 9.4 installation

# apt-get install postgresql9.4-server

Creation of a new PostgreSQL DB cluster

# /etc/init.d/postgresql initdb

By default the cluster is located in /var/lib/pgsql/data/

PostgreSQL server launch

# service postgresql start

Creation of a new user - runa_dbuser (you will need to enter password for the user two times)

# createuser –U postgres –d –S –R –P runa_dbuser

Creation of PostgreSql DB for RunaWFE

Connection to DMBS under postgres user

$ psql –U postgres

Creation of a DB by name "runa" for RunaWFE server


Granting priveleges to runa_dbuser on the created runa database

# GRANT ALL privileges ON DATABASE runa TO runa_dbuser;

View available DBs


Exit psql


Registering a class driver in application server

Create a module org.postgresql for jdbc driver of the following structure:

 - org
   - postgresql
     - main
       - module.xml
       - postgresql-9.4-1201.jdbc4.jar


<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="org.postgresql">
  <resource-root path="postgresql-9.4-1201.jdbc4.jar"/>
  <module name="javax.api"/>
  <module name="javax.transaction.api"/>

You can download the driver in the following way:

$ wget

Registration of a datasource in application server

The configurations of RunaWFE server in Altlinux OS are located in /usr/share/jboss-ass/configuration/

$ cd /usr/share/jboss-as/standalone/configuration/

Adding datasource section and driver to standalone-runa.xml

   <datasource jndi-name="java:jboss/datasources/PostgreDS" pool-name="PostgreDS">
     <driver name="postgresql" module="org.postgresql">

Binding of the datasource and installation of the corresponding dialect to

Create a catalogue /jboss-as/standalone/wfe.custom

$ mkdir wfe.custom

Create a file with the following content, defining connection type of server to PostgreSQL and bindings to PostgreDS datasource


At first system launch a database structure will be created automatically. Start RunaWFE server.

# service runawfe4-server start

Check the availability of RunaWFE server.

Make shure tables are created in runa DB. To do that enter runa DB under runa_dbuser

# psql –U runa_dbuser runa

Display the tables


If any problems occur, analyze logs located in /usr/share/jboss-as/standalone/log/

Creation and configuration of a second example of PostgreSQL DBMS

Note. Second example of PostgreSQL DBMS may be used only in bot tasks, otherwise you will need an additional confuguration - distributed transactions (XA)

By default a database cluster is created in the folder: var/lib/pgsql/data, for postgres user with the password postgres

For the second server example creation of a new cluster is required.

$ initdb –D /home/user/pgsql/data2 –U user

The new cluster will be created in /home/user/pgsql/data2, the owner is "user" account

Then registration of service for the second PostgreSQL example is carried out

If systemd is used

Create service file for the second PostgreSQL server example

# cp /lib/systemd/system/postgresql.service /lib/systemd/system/postgresql2.service

Edit postgresql2.service in the following way:


PostgresqlConfig en1.png

Carry out service registration by means of systemctl

# systemctl enable postgresql2
# systemctl start postgresql2
# systemctl status postgresql2

If SysV is used

Copy script /etc/init.d/postgres into /etc/init.d/postgres2

# cp /etc/init.d/postgres /etc/init.d/postgres2

Edit the script /etc/init.d/postgres2 in the following way:

PostgresqlConfig en2.png

PostgresqlConfig en3.png

PostgresqlConfig en4.png

Edit /home/user/pgsql/data2/postgres.conf, adding the line


PostgresqlConfig en5.png

Activate postgresql2 service

# chkconfig postgresql2 on

postgresql2 service launch is carried out under "user" account

$ service postgresql2 start

New DB creation and connection of a second datasource to RunaWFE

Connection to PostgreSQL server (second example, port 5433)

# psql –U user –p 5433 –d postgres

Creation of a new user

# create user runa_dbuser;
# alter user runa_dbuser superuser createrole createdb;

After creating a new user execute service restart

# service postgresql2 restart 

Creation of a new DB:

# psql –U runa_dbuser–p 5433 –d postgres

Connection of second datasource for RunaWFE

In /usr/share/jboss-as/standalone/configuration/standalone-runa.xml add second datasource into datasources section

<datasource jndi-name="java:jboss/datasources/PostgreMXDDS" pool-name="PostgreMXDDS">

Opening access to two PostgreSQL server examples online

In /var/lib/pgsql/data edit postgresql.conf

listen_addresses = '*'

PostgresqlConfig en6.png

In /var/lib/pgsql/data edit pga_hba.conf

host all all md5

PostgresqlConfig en7.png

By so doing the first PostgreSQL server example (port 5432) will be available online with password authentication (md5 method).

Opening of online access to the second PostgreSQL example (port 5433) is carried out likewise

Edit /home/user/pgsql/data2/postgresql.conf

listen_addresses = '*'

PostgresqlConfig en8.png

Edit /home/user/pgsql/data2/pga_hba.conf

host all all md5

By so doing the second PostgreSQL server example (port 5433) will be available online with password authentication (md5 method).