Flowable-rest db not changing to Mysql

Hi,

I have downloaded flowable-admin.war,flowable-idm.war,flowable-modeler.war,flowable-rest.war and flowable-task. All these files has been deployed and I have change flowable-ui-app.properties files to point to MySQL database. Also I have change db.properties for flowable-rest.

When I use flowable-rest , I notice it is still points to H2 database.
Can you assist me on this ?

1 Like

Hi josh3006,
I have the same problem. But my database is postgres.

Hi,

Can you provide a bit more details about what you exactly changed in the db.properties of the Flowable REST app? Where do you see it’s still pointing to the H2 database?

Best regards,

Tijs

Mind that the REST APIs are exposed in both Flowable REST and in Flowable Task. Deploying both is not needed.

Regards,

Yvo

Please find the db.properties as below : -

db=mysql
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/flowable
jdbc.username=flowable
jdbc.password=flowable

After change this and run tomcat, I notice in tomcat logs still referring to H2 database

08:54:54,240 [localhost-startStop-1] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Started.
08:54:54,678 [localhost-startStop-1] INFO com.zaxxer.hikari.pool.PoolBase - HikariPool-1 - Driver does not support get/set network timeout for connections. (org.h2.jdbc.JdbcConnection.getNetworkTimeout()I)
08:54:55,839 [localhost-startStop-1] INFO org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl - Executing configure() of class org.flowable.spring.configurator.SpringIdmEngineConfigurator (priority:10000)
08:54:56,336 [localhost-startStop-1] INFO org.flowable.idm.engine.impl.db.DbSqlSession - performing create on identity with resource org/flowable/idm/db/create/flowable.h2.create.identity.sql
08:54:56,353 [localhost-startStop-1] INFO org.flowable.idm.engine.impl.IdmEngineImpl - IdmEngine default created
08:54:56,356 [localhost-startStop-1] INFO org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl - Executing configure() of class org.flowable.form.spring.configurator.SpringFormEngineConfigurator (priority:10000)
INFO 2/23/17 8:54 PM:liquibase: Successfully acquired change log lock

Hi yvo,

In my situation, we need to run the flowable-rest together with flowable-idm only in the tomcat instance.
Our external application will only use REST to call flowable-rest

The original db.properties uses different property keys:

db=h2
datasource.driver=org.h2.Driver
datasource.url=jdbc:h2:mem:flowable;DB_CLOSE_DELAY=-1
datasource.username=flowable
datasource.password=flowable

Make sure you use the same property keys.

Best regards,

Tijs

Thanks
It works as you explain

It was my mistake that I wrongly added the db.properties file

Hi Josh,
I am facing the same problem as you, as i can see in comments, you created one more db.properties for mysql, but I am not doing this. I am editing the original db.properties removing h2 configurations and changing it to point to mysql just like you have mentioned. So when I run tomcat again after making changes, and hit the rest api : GET localhost:8080/flowable-rest/service/runtime/tasks , it gives 404. Could you help.
I need to use flowable-rest and flowable-ui together so i am also changing flowable-ui-app.properties file to point to mysql, but after i run tomcat again, it changes back to h2 . Could you please help

Thanks in advance

Hi tijs,

I am facing the same problem as Josh, as i can see in comments, he created one more db.properties for mysql, but I am not doing this. I am editing the original db.properties removing h2 configurations and changing it to point to mysql :

db=mysql
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/flowable
jdbc.username=flowable
jdbc.password=flowable

. So when I run tomcat again after making changes, and hit the rest api : GET localhost:8080/flowable-rest/service/runtime/tasks , it gives 404. Could you help.

I need to use flowable-rest and flowable-ui together so i am also changing flowable-ui-app.properties file to point to mysql, but after i run tomcat again, it changes back to h2 . Could you please help

Thanks in advance

Hi Yvo,

I am facing the same problem as Josh, as i can see in comments, he created one more db.properties for mysql, but I am not doing this. I am editing the original db.properties removing h2 configurations and changing it to point to mysql :

db=mysql
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/flowable
jdbc.username=flowable
jdbc.password=flowable

. So when I run tomcat again after making changes, and hit the rest api : GET localhost:8080/flowable-rest/service/runtime/tasks , it gives 404. Could you help.

I need to use flowable-rest and flowable-ui together so i am also changing flowable-ui-app.properties file to point to mysql, but after i run tomcat again, it changes back to h2 . Could you please help

Thanks in advance

Have you tried this:

But it’s easier to copy the flowable-ui-app.properties file from one of the apps or get it from Github, and put it in the Tomcat lib folder. The UI applications will first look at a flowable-ui-app.properties file available on the classpath directly and this configuration will have precedence over the configuration file in the WAR.

as suggested in http://www.flowable.org/docs/userguide/index.html#flowableUIApps

where exactly i should put the flowable-ui-app.properties file instead of modifying the one existing at location : flowable-task/WEB-INF/classes/META-INF

Into the root of the classpath of the container, e.g. apache-tomcat-8.5.20\lib\flowable-ui-app.properties

But tomcat/lib has all the jar files, can i put a properties file there?

Yes, you can also put other files - like properties files - into this directory.

Hi Pascal
thanks for reply , i tried the changes you suggested, but all of a sudden i am facing a very strange issue. When i am trying to login on flowable UI - http://localhost:8080/flowable-task with credentials as specified in doc : https://paulhh.wordpress.com/2017/01/31/flowable-6-instant-gratification/ as:
uid : admin
pass : test
this credential is also mentioned in flowable-ui-app.properties file, its saying invalid credentials :frowning: . It was working till afternoon all of a sudden its giving this issue. Could you help

Thanks

Check the ACT_ID_USER table of your mysql database.

Check that it has this entry: ACT_ID_USER (ID_,REV_,FIRST_,LAST_,EMAIL_,PWD_,PICTURE_ID_) values ('admin','1','Test','Administrator','admin@flowable.org','test',null);

Hi Pascal ,
Thanks for the help :slight_smile: issue got resolved after i removed the flowable-ui-app.properties from tomcat/lib and just changed in apache-tomcat-8.0.12\webapps\flowable-task\WEB-INF\classes\META-INF\flowable-ui-app .Along with it , i added mysql-connector jar in tomcat/lib and web-inf/lib. I think placing jar in either of two can work but to be safe i added at both places. Working as desired now :slight_smile:

Cheers :slight_smile:
shweta

For Flowable 6.3 onwards