Tuesday, April 26, 2016

Activiti BPMN Configure Oracle Database

I use version 5.19 of Activiti BPMN Engine.

Activiti comes with an in-memory H2 database. Which is not useful for any serious development or for Production Purposes. So i installed an Oracle 12c on my local computer for educational purposes and Configured Activiti to start pointing to that Database.

here's what you need to do to configure Oracle database for Activiti 5.19

I Assume you copied activiti war's into your Tomcat webapps folder. Once you have copied the wars will explode into a folder. I have copied both the activiti-explorer.war and activiti-rest.war to my tomcat8\webapps folder and started up tomcat.

After this you can go to tomcat8\webapps\activiti-explorer\WEB-INF\classes and you find a file called db.properties there. You can delete the contents of this file and replace it with

db = oracle
jdbc.driver = oracle.jdbc.OracleDriver
jdbc.url = jdbc:oracle:thin:@localhost:1521:SUNIL
jdbc.username = user
jdbc.password = password

and update your DB details in this.

You also need to add your ojdbc.jar to this lib folder here - tomcat8\webapps\activiti-explorer\WEB-INF\lib

You need to follow same steps for activiti-rest also.

If you are configuring Activiti into this Oracle DB, then you need to run some scripts to create your tables and other DDL in Oracle.

For this you can log into your Oracle user and run the script from your actual Activiti download folder. \activiti-5.19.0.2\database\create
For Oracle you need to execute the below .sql files in your oracle user.

activiti.oracle.create.engine.sql
activiti.oracle.create.history.sql
activiti.oracle.create.identity.sql

Now you can login to http://localhost:8090/activiti-explorer/ to log in and you database will be connecting to Oracle.

Thanks
SunilTK



4 comments:

  1. Do you have any problem to access it using REST webservice?
    I have done all of that, but when I tried to access it through webservice, it gave me 404 The requested URL was not found on this server

    ReplyDelete
    Replies
    1. I have not faced any issues. If you can share more info(logs). i can help.

      Delete
  2. Hi Sunil...
    Thanks for the write up. I have application where activiti is used and we have transaction app db and activiti DB. is it possible to have activiti explorer for existing activiti DB?

    ReplyDelete
    Replies
    1. yes, its possible. You need to install the activiti explorer

      Delete