Install Activiti on postgresql

To install Activiti on PostgreSQL, the following steps need to be executed.

General approach

  1. Create user in postgres
    Create user in postgres database if needed.
  2. Create database activiti
    The above created user should own this database
  3. Manually create database tables
    Create scripts are provided in database folder of activiti archive in folder /database/create.
  4. Unzip the activiti-explorer.war stored in wars folder
  5. Edit war content
    1. copy the needed JDBC driver to WEB-INF/lib folder
      The jar can be downloaded from http://jdbc.postgresql.org/
    2. edit WEB-INF/classes/db.properties (see below)
    3. edit WEB-INF/activiti-standalone-context.xml (see below)
  6. zip folder content as activiti-explorer.war
    Make sure not to include sub-folder – WEB-INF must be in root or zip archive.
  7. Deploy updated war file to Tomcat or server you want to use.

Update db.properties

db=postgres
jdbc.driver=org.postgresql.Driver
jdbc.url=jdbc:postgresql://<servername>:<serverport>/<db name - e.g. activiti>
jdbc.username=<username>
jdbc.password=<password>

 

Update activiti-standalone-context.xml

Due to a bug, you need to edit activiti-standalone-context.xml.

<bean id=“processEngineConfiguration“ …>
…
   <property name="databaseSchemaUpdate" value="none" />
…
</bean>

See http://forums.activiti.org/content/problem-schemas-postgresql

If you do not want examples to be re-created after next start, you can uncomment / remove bean with id=demoDataGenerator from configuration. Updating the values to false should also work but did not work in my tests.
Important: do not remove this bean during the first deployment – this way an admin user “kermit” is created. (password is also “kermit”). After you have created your own user you can easyily remove demoDataGenerator from configuration and deploy again.

Update 2015-06-15

Removed bug tracker entry to http://jira.codehaus.org/browse/ACT-1610 as codehaus services have been stopped. (see https://www.codehaus.org/termination/).  I need to check again, if the bug is still open or not. In the new bug tracker under https://github.com/Activiti/Activiti/issues it does not seem to be listed.