6 Replies Latest reply on Jun 29, 2010 4:43 AM by newbeewan

    jBPM without database

    suman291857

      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??
      OR
      Should jBPM must use database for its internal activities??

      Thanks

        • 1. Re: jBPM without database
          kukeltje

          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.

          Ronald

          • 2. Re: jBPM without database
            suman291857

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

            Kind Regards

            • 3. Re: jBPM without database
              tom.baeyens

              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
                rhodos

                Hi,

                 

                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?

                 

                Thanks,

                Rachel

                • 5. Re: jBPM without database
                  imjorge

                  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"
                  <hibernate-configuration>
                          <session-factory>
                              <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" />
                      </session-factory>
                  </hibernate-configuration>

                  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:

                   

                  jbpm.cfg.xml

                  <jbpm-configuration>

                  [...]

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

                  [...]

                       

                  </jbpm-configuration>

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

                  <jbpm-configuration>

                   

                    <process-engine-context>

                  [...]

                      <hibernate-configuration>

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

                      </hibernate-configuration>

                  [...]

                   

                  </jbpm-configuration>

                  • 6. Re: jBPM without database
                    newbeewan

                    Hi,

                     

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

                     

                    Regards