4 Replies Latest reply on Mar 3, 2015 5:14 AM by emygdio

    jbpm 6 and mysql

    chiri

      Hi All,

       

      I want to use mysql db to persist all process and task related info.

      So far I have seen only h2 db in examples. Can anyone suggest how to use mysql db with jbpm6.

       

      Pointer to any sample code will be appreciated.

       

      -Gaurav

        • 1. Re: jbpm 6 and mysql
          abhijithumbe

          Hi,

          To configure jBPM 6 with mysql modify below files:

          jbpm-console.war/WEB-INF/classes/META-INF/persistence.xml

          jbpm-console.war/WEB-INF/jboss-deployment-structure.xml

           

          - Use correct JNDI name of the datasource inside the persistence.xml file, 

            <jta-data-source>java:jboss/datasources/MysqlDS</jta-data-source>

          - Use appropriate Database specific Hibernate Dialect name

            <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect" />

          - Add JBDC driver module dependency under dependencies section in jboss-deployment-structure.xml

          <dependencies>

            ...
            <module name="jdbcDriverModuleName" />
            ...
            </dependencies>

           

          Try with this approach..

          • 2. Re: jbpm 6 and mysql
            emygdio

            Hi kumargauravsahu?

             

            How did you install and run the Jbpm? If you are using the ant tasks in the  jbpm-installer, just try this documentation: Chapter 3. jBPM Installer

            • 3. Re: jbpm 6 and mysql
              chiri

              I am planning to run jBPM in embeded mode without using any container either (app or web). I want to use mysql to save process info so that in case of system crash, we must be able to recover pending processes.

              • 4. Re: jbpm 6 and mysql
                emygdio

                Hi kumargauravsahu,

                 

                Did you see this part of the documentation: Chapter 8. Persistence and Transactions. That explains how you could use the persistence in the Jbpm. To use with mysql you have to configure a data source in your application server using a mysql divrer.