AnsweredAssumed Answered

Use mysql database table

Question asked by agiledevpro on Jul 15, 2014
Latest reply on Jul 17, 2014 by agiledevpro
Hi,

I want to create a process that inserts data into a mysql table that I've created. I wonder if this is possible?
I know that activiti uses a h2 database by default, but I want to use a mysql database instead.

I've created a maven project in eclipse and added the following dependency to my pom.xml:
dependency
         groupId mysql groupId
         artifactId mysql-connector-java artifactId
         version 5.1.13 version
dependency

I've also added databasetype, jdbcUrl, jdbcDriver, jdbcUsername and jdbcPassword to my activiti.cfg.xml file. Is there anything else I need to do?

I just want data to be added at a certain step in my process, would this be possible to do?

I've also created a JUint test and when I run this I get errors:

org.activiti.engine.ActivitiException: couldn't check if tables are already present using metadata:
### Error getting a new connection.  Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
### Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
   at org.activiti.engine.impl.db.DbSqlSession.isTablePresent(DbSqlSession.java:879)
   at org.activiti.engine.impl.db.DbSqlSession.isEngineTablePresent(DbSqlSession.java:834)
   at org.activiti.engine.impl.db.DbSqlSession.dbSchemaUpdate(DbSqlSession.java:767)
   at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:1145)

 

Any suggestions?

Thank you!

Outcomes