6 Replies Latest reply on Jun 29, 2010 4:43 AM by Jaber C. Mourad

    jBPM without database

    suman291857 Newbie

      Hello All,
      Can i use jBPM without persisting process definition and process instances in database???
      My use case doesnt require me to do any sort of persistance with respect to process instances/definition??
      Should jBPM must use database for its internal activities??


        • 1. Re: jBPM without database
          Ronald van Kuijk Master

          jbpm relies on a database for its internal activities. This does not mean you need a full database however. You can use hsqldb in an in-memory mode, which does not persist anything. So this is kind of what you might configure.


          • 2. Re: jBPM without database
            suman291857 Newbie

            Thankf for your response!!
            Will keep posted abt my progress on using hsql-inmemory db.

            Kind Regards

            • 3. Re: jBPM without database
              Tom Baeyens Master

              jbpm 3.0+ also support full in memory without a database. e.g. SEAM is going to use it that way for pageflow in a JSF application.

              regards, tom.

              • 4. Re: jBPM without database
                Rachel Hodos Novice



                I am trying to use jBPM 4.3 without a database.  I don't know if this configuration is completely different than it was 4 years ago- is this still possible?  If so, how?




                • 5. Re: jBPM without database
                  Jorge Ferreira Newbie

                  You can use a in-memory database with hsqldb.


                  Just put jbpm.hibernate.cfg.xml in the classpath with the following contents:

                  <?xml version="1.0" encoding="UTF-8"?>
                  <!DOCTYPE hibernate-configuration PUBLIC
                  "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                              <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
                              <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
                              <property name="hibernate.connection.url">jdbc:hsqldb:mem:.</property>
                              <property name="hibernate.connection.username">sa</property>
                              <property name="hibernate.connection.password"></property>
                              <property name="hibernate.format_sql">true</property>
                              <property name="hibernate.show_sql">true</property>
                              <property name="hibernate.hbm2ddl.auto">create-drop</property>
                              <mapping resource="jbpm.repository.hbm.xml" />
                              <mapping resource="jbpm.execution.hbm.xml" />
                              <mapping resource="jbpm.history.hbm.xml" />
                              <mapping resource="jbpm.task.hbm.xml" />
                              <mapping resource="jbpm.identity.hbm.xml" />

                  I assume that you already have jbpm.cfg.xml on the classpath and that jbpm.cfg.xml includes directly or indirectly jbpm.hibernate.cfg.xml.


                  In my unit testing setup jbpm.cfg.xml includes jbpm.tx.hibernate.cfg.xml that then includes jbpm.hibernate.cfg.xml:





                       <import resource="jbpm.tx.hibernate.cfg.xml" />




                  jbpm.tx.hibernate.cfg.xml (from jbpm.jar):






                        <cfg resource="jbpm.hibernate.cfg.xml" />    





                  • 6. Re: jBPM without database
                    Jaber C. Mourad Novice



                    I'm using it in unit tests and it works well !