To install Activiti on PostgreSQL, the following steps need to be executed.
General approach
- Create user in postgres
Create user in postgres database if needed. - Create database activiti
The above created user should own this database - Manually create database tables
Create scripts are provided in database folder of activiti archive in folder /database/create. - Unzip the activiti-explorer.war stored in wars folder
- Edit war content
- copy the needed JDBC driver to WEB-INF/lib folder
The jar can be downloaded from http://jdbc.postgresql.org/ - edit WEB-INF/classes/db.properties (see below)
- edit WEB-INF/activiti-standalone-context.xml (see below)
- copy the needed JDBC driver to WEB-INF/lib folder
- zip folder content as activiti-explorer.war
Make sure not to include sub-folder – WEB-INF must be in root or zip archive. - 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.