1 2 Previous Next 25 Replies Latest reply on Apr 16, 2014 6:31 AM by marco.rietveld

    JBPM5 integration with oracle

    anandintouch

      Hi,

      Is it possible to use oracle9+ version to integrate/use in jbpm5 project or we need to stick with H2 db only?

      If it's possible then can you provide me info about configuration ?,Idon't see much information about DB config in JBPM5 guide mentioned below-

       

      https://hudson.jboss.org/hudson/job/jBPM5/lastSuccessfulBuild/artifact/target/jbpm-5.0-SNAPSHOT-docs-build/jbpm-docs/html/ch02.html#d0e320

       

      Jbpm4.4 build file and user doc has nice details about using different DB in jbpm project.So please let me know how to use oracle db and where all config change need to be done?

      Thanks,

      Anand

        • 1. Re: JBPM5 integration with oracle
          krisverlaenen

          jBPM5 uses JPA (with Hibernate as default persistence provider) to persist process runtime data.  The tests use H2 in memory database simply because it is easy to set up and test.  But the persistence configuration can be updated to a lot of different databases.  I've just updated the documentation (it should show up in a few hours on the URL you mention) with a separate chapter on persistence, and that contains some information.  In general, you should just update your persistence.xml and the datasource you are using.

           

          If you still have questions after reading the updated documentation, or problems when changing the configuration, just let me know.

           

          It would be great if you could also document what changes you are making exactly to get it to run on oracle, as we could then extend the documentation with information like this

          • 2. Re: JBPM5 integration with oracle
            anandintouch

            Integration with oracle done successfully after changing build file a little bit as given below.But while running application it's not initializing knowledge session....seems issue with entry in persistence.xml file

             

            I'm able to successfully integrate with Oracle10g DB and schema is also created properly with following tables.

             

            -SessionInfo

            -ProcessInstanceInfo

            -WorkItemInfo

            -PROCESSINSTANCELOG (not sure how this table got created without having entry in persistence.xml)

            -EVENTTYPES  (not sure how this table got created without having entry in persistence.xml)


            Installer build file change is given below

            =============================

            <!-- Anand added new entry to copy hibernate.cfg.xml to meta-inf folder and oracle jar to lib folder-->
                <copy file="${install.home}/db/hibernate.cfg.xml"
                      tofile="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/classes/META-INF/hibernate.cfg.xml"
                      overwrite="true" />
                <copy file="${install.home}/db/driver/ojdbc14.jar"
                      todir="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib"/>

             

            Persistence.xml modification

            ========================

            1. <persistence version="1.0"
            2.              xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
            3.                                  http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
            4.                                  http://java.sun.com/xml/ns/persistence/orm
            5.                                  http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
            6.              xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
            7.              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            8.              xmlns="http://java.sun.com/xml/ns/persistence">
            9.   <persistence-unit name="org.drools.persistence.jpa" transaction-type="JTA">
            10.     <provider>org.hibernate.ejb.HibernatePersistence</provider>
            11.     <jta-data-source>java:jdbc/testDS1</jta-data-source>       
            12.     <class>org.drools.persistence.session.SessionInfo</class>
            13.     <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
            14.     <class>org.drools.persistence.processinstance.WorkItemInfo</class>
            15.     <properties>
            16.       <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>             
            17.       <property name="hibernate.max_fetch_depth" value="3"/>
            18.       <property name="hibernate.hbm2ddl.auto" value="create" />
            19.       <property name="hibernate.show_sql" value="true" />     
            20.       <property  name="hibernate.transaction.manager_lookup_class"  value="org.hibernate.transaction.JBossTransactionManagerLookup" />
            21.     </properties>       
            22.   </persistence-unit>
            23.   
            24. </persistence>

             

             

            (NOTE= But when I login to jbpm-console and when I go to Processes and select Evaluation Process and start the process then I get 1st form and I enter user as 'krisv' and when I hit complete button then I get following error. And because of this error there is no entry in "ProcessInstanceInfo" table )

             

            Please let me know if I can get help on this,please check updated entry in pastebin.com, error which I posted earlier was due to extra jar(hibernate-core-3.3.0.SP1.jar,persistence-api-1.0.jar etc ) which I added in lib forlder of console-server.war which I've removed now.

             

            Error

            =====

            2010-12-01 15:14:38,078 WARN  [org.hibernate.util.JDBCExceptionReporter] (http-localhost%2F127.0.0.1-9999-1) SQL Error: 1747, SQLState: 42000
            2010-12-01 15:14:38,078 ERROR [org.hibernate.util.JDBCExceptionReporter] (http-localhost%2F127.0.0.1-9999-1) ORA-01747: invalid user.table.column, table.column, or column specification

             

            2010-12-01 15:14:38,078 WARN  [org.hibernate.util.JDBCExceptionReporter] (http-localhost%2F127.0.0.1-9999-1) SQL Error: 1747, SQLState: 42000
            2010-12-01 15:14:38,078 ERROR [org.hibernate.util.JDBCExceptionReporter] (http-localhost%2F127.0.0.1-9999-1) ORA-01747: invalid user.table.column, table.column, or column specification

             

            2010-12-01 15:14:38,079 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] (http-localhost%2F127.0.0.1-9999-1) Could not synchronize database state with session
            org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update

                at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
                at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
                at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
                at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
                at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
                at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
                at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
                at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
                at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)
                at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:137)
                at org.jbpm.process.audit.WorkingMemoryDbLogger.addNodeEnterLog(WorkingMemoryDbLogger.java:90)
                at org.jbpm.process.audit.WorkingMemoryDbLogger.logEventCreated(WorkingMemoryDbLogger.java:52)
                at org.drools.audit.WorkingMemoryLogger.filterLogEvent(WorkingMemoryLogger.java:192)
                at org.drools.audit.WorkingMemoryLogger.beforeNodeTriggered(WorkingMemoryLogger.java:445)
                at org.drools.event.ProcessEventSupport.fireBeforeNodeTriggered(ProcessEventSupport.java:91)
                at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:119)
                at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)
                at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:188)
                at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:302)
                at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:108)
                at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1615)
                at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:289)
                at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:99)
                at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:38)
                at org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:274)
                at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:190)
                at org.jbpm.integration.console.CommandDelegate.startProcess(CommandDelegate.java:205)
                at org.jbpm.integration.console.ProcessManagement.newInstance(ProcessManagement.java:79)
                at org.jboss.bpm.console.server.FormProcessingFacade.startProcessWithUI(FormProcessingFacade.java:195)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
                at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
                at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
                at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
                at org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
                at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
                at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
                at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
                at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
                at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
                at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
                at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                at java.lang.Thread.run(Thread.java:619)
            Caused by: java.sql.BatchUpdateException: ORA-01747: invalid user.table.column, table.column, or column specification

             

                at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:343)
                at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10768)
                at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
                at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
                ... 64 more

             

            Message was edited by: Anand Prakash

            • 3. Re: JBPM5 integration with oracle
              anandintouch

              Tried one more change to solve this issue,but still same exception- I tried updating persistence.xml file in "jbpm-human-task-5.0-SNAPSHOT.jar" file

              under jbpm-human-task\src\main\resources\META-INF folder for Oracle related url,dialect,driver etc. under jbpm-gwt-console-server.war deployed in jboss.So basically I modified following things for Oracle DB configuration:-

               

              1. Modified hibernate.cfg.xml,persistence.xml and testDS1-ds under (C:\Anand\jbpm5\jbpm-installer\db) folder path

              2. Also I modified persistence.xml of jbpm-human-task-5.0-SNAPSHOT.jar file under "bpm-gwt-console-server.war" file deployed in jboss as mentioned above.

               

              But I get same issue as mentioned in my last post related to "Could not synchronize database state with session
              org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update".

              Let me know if you get chance to fix this.

               

              Thanks,

              Anand

              • 4. Re: JBPM5 integration with oracle
                krisverlaenen

                The default column name for the date inside the NodeInstanceLog was using "date", which is not allowed in Oracle DB.

                I've changed the default column name to "log_date" and tested persistence with Oracle DB and it seems to working correctly here.

                https://github.com/krisv/jbpm/blob/master/jbpm-bam/src/main/resources/AuditLog.hbm.xml

                Let me know if you still have issues.

                 

                Kris

                • 5. Re: JBPM5 integration with oracle
                  anandintouch

                  Thanks Kris, so changes to this AuditLog.hbm.xml file for Date column worked!

                   

                  So how doI make sure that I've latest source of jbpm5,because we are changing and fixing some issues,so can I take the source now with all the changes related to host,port and this Oracle issue from -  https://hudson.jboss.org/hudson/job/jBPM5/lastSuccessfulBuild/artifact/target/

                   

                  Thanks,

                  Anand

                  • 6. Re: JBPM5 integration with oracle
                    anandintouch

                    All Oracle related issues are resolved which was creating problem to execute Personal task from installer's sample Evaluation workflow.

                     

                    Basically,I fixed/modified couple of classes in "jbpm-human-task" module which was throwing ORA 00903,01747 etc. such as-

                    -PeopleAssignment (modified some of the reference table and columns name to reduce the size<30 characters )

                    -TaskData

                    -Attachment (modified column names)

                    -User,Group,Comment (renamed table because it was using Oracle's reserved keyword)

                      * Still that User,Group table is not created in my  database schema thogh I renamed,I can see "Comment" table in my schema

                    *  TaskData,Delegation,EmailNotification,PeopleAssignments etc. from persistence.xml has not been created yet (not sure why)

                        Could be these classes are of type "Embeddable"

                     

                    Now sample task can be excuted end-to-end with oracle DB

                    Thanks,

                    Anand

                    • 7. Re: JBPM5 integration with oracle
                      krisverlaenen

                      I just updated the latest source code with a bunch of improvements like you mentioned, and I tested it all on Oracle DB and it seems to work out of the box now.  Thanks a lot for the info !

                       

                      Kris

                      • 8. JBPM5 integration with oracle
                        wilmanchamba

                        JBPM5 installer default for the BD H2, I would like to convey a different configurationfor BD (in this case postgres) it and work with you on thisproject for review and thus help other developers.

                         

                        Whether the changes are:

                        In the db directory of jbmp-installer add the following files:

                         

                        File: jbpm-human-task-persistence.xml

                        +++++++++++++++++++++++++++++++++++++

                        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

                        <persistence version="1.0"

                                     xsi:schemaLocation="http://java.sun.com/xml/ns/persistence

                                                         http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd

                                                         http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"

                                     xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"

                                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                                     xmlns="http://java.sun.com/xml/ns/persistence">

                          <persistence-unit name="org.jbpm.task">

                            <provider>org.hibernate.ejb.HibernatePersistence</provider>

                            <class>org.jbpm.task.Attachment</class>

                            <class>org.jbpm.task.Content</class>

                            <class>org.jbpm.task.BooleanExpression</class>

                            <class>org.jbpm.task.Comment</class>

                            <class>org.jbpm.task.Deadline</class>

                            <class>org.jbpm.task.Comment</class>

                            <class>org.jbpm.task.Deadline</class>

                            <class>org.jbpm.task.Delegation</class>

                            <class>org.jbpm.task.Escalation</class>

                            <class>org.jbpm.task.Group</class>

                            <class>org.jbpm.task.I18NText</class>

                            <class>org.jbpm.task.Notification</class>

                            <class>org.jbpm.task.EmailNotification</class>

                            <class>org.jbpm.task.EmailNotificationHeader</class>

                            <class>org.jbpm.task.PeopleAssignments</class>

                            <class>org.jbpm.task.Reassignment</class>

                            <class>org.jbpm.task.Status</class>

                            <class>org.jbpm.task.Task</class>

                            <class>org.jbpm.task.TaskData</class>

                            <class>org.jbpm.task.SubTasksStrategy</class>

                            <class>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy</class>

                            <class>org.jbpm.task.OnAllSubTasksEndParentEndStrategy</class>

                            <class>org.jbpm.task.User</class>

                         

                         

                        <properties>

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

                              <property name="hibernate.connection.driver_class" value="org.postgresql.Driver"/>

                              <property name="hibernate.connection.url" value="jdbc:postgresql://localhost/jbpm5" />

                              <property name="hibernate.connection.username" value="postgres"/>

                              <property name="hibernate.connection.password" value="adminadmin"/>

                              <property name="hibernate.connection.autocommit" value="false" />

                              <property name="hibernate.max_fetch_depth" value="3"/>

                              <property name="hibernate.hbm2ddl.auto" value="update" />

                              <property name="hibernate.show_sql" value="false" />

                            </properties>

                          </persistence-unit>

                        </persistence>

                        +++++++++++++++++++++++++++++++++++++

                         

                        File: jbpm-bam-hibernate.cfg.xml

                        +++++++++++++++++++++++++++++++++++++

                        <?xml version='1.0' encoding='utf-8'?>

                        <!DOCTYPE hibernate-configuration PUBLIC

                                "-//Hibernate/Hibernate Configuration DTD 3.0//EN"

                                "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

                          <hibernate-configuration>

                              <session-factory>

                                  <!-- Database connection settings -->

                                <property name="connection.driver_class">org.postgresql.Driver</property>

                                <property name="connection.url">jdbc:postgresql://localhost/jbpm5</property>

                                <!--property name="connection.url">jdbc:h2:file:/NotBackedUp/data/mydb</property-->

                                <property name="connection.username">postgres</property>

                                <property name="connection.password">adminadmin</property>

                          

                                <!-- JDBC connection pool (use the built-in) -->

                                <property name="connection.pool_size">5</property>

                          

                                <!-- SQL dialect -->

                                <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>

                         

                         

                                <!-- Enable Hibernate's automatic session context management -->

                                <property name="current_session_context_class">thread</property>

                         

                         

                                <!-- Disable the second-level cache  -->

                                <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

                         

                         

                                <!-- Echo all executed SQL to stdout -->

                                <property name="show_sql">false</property>

                         

                         

                                <!-- Drop and re-create the database schema on startup -->

                                <property name="hbm2ddl.auto">update</property>

                                <mapping resource="AuditLog.hbm.xml"/>

                              </session-factory>

                          </hibernate-configuration>

                        +++++++++++++++++++++++++++++++++++++

                        These files will help us to modify the respective jar jbpm

                         

                        Rename datasource file by jbpmDS-ds.xml

                        File: jbpmDS-ds.xml

                        <?xml version="1.0" encoding="UTF-8"?>

                        <datasources>

                          <local-tx-datasource>

                            <jndi-name>jdbc/jbpmDS</jndi-name>

                            <connection-url>jdbc:postgresql:jbpm5</connection-url>

                            <!--connection-url>jdbc:h2:mem:mydb</connection-url-->

                            <driver-class>org.postgresql.Driver</driver-class>

                            <user-name>postgres</user-name>

                            <password>adminadmin</password>

                          </local-tx-datasource>

                        </datasources>

                        +++++++++++++++++++++++++++++++++++++++++++++

                         

                         

                        Persistences.xml and hibernate.cfg.xml files should be set according to the database specified, in this case Postgres as has been shown in previous settings files.

                         

                        File: persistence.xml

                        <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

                        <persistence version="1.0"

                                     xsi:schemaLocation="http://java.sun.com/xml/ns/persistence

                                                         http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd

                                                         http://java.sun.com/xml/ns/persistence/orm

                                                         http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"

                                     xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"

                                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                                     xmlns="http://java.sun.com/xml/ns/persistence">

                         

                         

                          <persistence-unit name="org.drools.persistence.jpa" transaction-type="JTA">

                            <provider>org.hibernate.ejb.HibernatePersistence</provider>

                            <jta-data-source>java:jdbc/jbpmDS</jta-data-source>      

                            <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>

                            <class>org.drools.persistence.info.SessionInfo</class>

                            <class>org.drools.persistence.info.WorkItemInfo</class>

                            <properties>

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

                              <property name="hibernate.max_fetch_depth" value="3"/>

                              <property name="hibernate.hbm2ddl.auto" value="update" />

                              <property name="hibernate.show_sql" value="false" />

                              <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" />

                            </properties>      

                          </persistence-unit>

                            

                        </persistence>

                        +++++++++++++++++++++++++++++++++++++++

                         

                        File: hibernate.cfg.xml

                        <?xml version='1.0' encoding='utf-8'?>

                        <!DOCTYPE hibernate-configuration PUBLIC

                                "-//Hibernate/Hibernate Configuration DTD 3.0//EN"

                                "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

                         

                         

                        <hibernate-configuration>

                         

                         

                            <session-factory>

                         

                         

                                <!-- Database connection settings -->

                                <property name="connection.driver_class">org.postgresql.Driver</property>

                                <property name="connection.url">jdbc:postgresql://localhost/jbpm5</property>

                                <!--property name="connection.url">jdbc:h2:file:/NotBackedUp/data/mydb</property-->

                                <property name="connection.username">postgres</property>

                                <property name="connection.password">adminadmin</property>

                         

                         

                                <!-- JDBC connection pool (use the built-in) -->

                                <property name="connection.pool_size">5</property>

                         

                         

                                <!-- SQL dialect -->

                                <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>

                         

                         

                                <!-- Enable Hibernate's automatic session context management -->

                                <property name="current_session_context_class">thread</property>

                         

                         

                                <!-- Disable the second-level cache  -->

                                <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

                         

                         

                                <!-- Echo all executed SQL to stdout -->

                                <property name="show_sql">false</property>

                         

                         

                                <!-- Drop and re-create the database schema on startup? -->

                                <property name="hbm2ddl.auto">update</property>

                                  <mapping resource="AuditLog.hbm.xml"/>

                             </session-factory>

                        </hibernate-configuration>

                        ++++++++++++++++++++++++++++++++++++++++++++++++

                         

                        Add the following properties in build.properties file

                        File: build.properties

                        .....

                         

                        # Wilman

                        # define the jar file to conecction bd

                        driver.connection=postgresql.jar

                        # define name file DataSource

                        file.datasource=jbpmDS-ds.xml

                        ++++++++++++++++++++++++

                         

                        And in the build.xml file

                        File: build.xml

                        <?xml version="1.0" encoding="UTF-8"?>

                         

                         

                        <project name="jBPM.install">

                         

                         

                          <property file="build.properties" />

                         

                         

                          <property name="install.home" value="./" />

                         

                         

                          <property name="jboss.server.conf.dir" value="${jboss.home}/server/${jboss.server.configuration}/conf" />

                          <property name="jboss.server.data.dir" value="${jboss.home}/server/${jboss.server.configuration}/data" />

                          <property name="jboss.server.deploy.dir" value="${jboss.home}/server/${jboss.server.configuration}/deploy" />

                          <property name="jboss.server.lib.dir" value="${jboss.home}/server/${jboss.server.configuration}/lib" />

                          <property name="jboss.server.birt.dir" value="${jboss.server.data.dir}/birt"/>

                          <property name="jboss.bind.address" value="localhost" />

                         

                         

                          <property name="eclipse.workspace.dir" value="${install.home}/workspace"/>

                         

                         

                          <property name="jboss.download.url" value="http://downloads.sourceforge.net/jboss/jboss-${jboss.server.version}.zip"/>

                          <property name="h2.download.url" value="http://repository.jboss.org/maven2/com/h2database/h2/1.2.124/h2-1.2.124.jar"/>

                          <property name="slf4j.download.url" value="http://repo1.maven.org/maven2/org/slf4j/slf4j-jdk14/1.5.11/slf4j-jdk14-1.5.11.jar"/>

                          <property name="birt.download.url" value="http://www.eclipse.org/downloads/download.php?file=/birt/downloads/drops/R-R1-2_3_2_2-200906011507/birt-runtime-2_3_2_2.zip&url=http://download.eclipse.org/birt/downloads/drops/R-R1-2_3_2_2-200906011507/birt-runtime-2_3_2_2.zip&mirror_id=1"/>

                          

                          <!-- ############ DOWNLOAD ############ -->

                         

                         

                          <!-- Download H2 -->

                          <target name="download.h2.check">

                            <echo message="Checking h2 download ..." />

                            <condition property="h2.not.available">

                              <not>

                                <available file="${install.home}/db/driver/h2.jar" />

                              </not>

                            </condition>

                          </target>

                          <target name="download.h2" depends="download.h2.check" if="h2.not.available">

                            <echo message="Getting h2 ..." />

                            <mkdir dir="${install.home}/db/driver"/>

                            <get src="${h2.download.url}" dest="${install.home}/db/driver/h2.jar"  />

                          </target>

                         

                         

                          <!-- Download BIRT engine (gwt-console) -->

                          <target name="check.birt">

                            <condition property="birt.download">

                              <equals arg1="${jBPM.birt.download}" arg2="true" />

                            </condition>

                          </target>

                          <target name="download.birt.check" depends="check.birt" if="birt.download">

                            <echo message="Checking birt reporting engine download ..." />

                            <condition property="birt.not.available">

                              <not>

                                <available file="${install.home}/lib/birt-runtime-2_3_2_2.zip" />

                              </not>

                            </condition>

                          </target>

                          <target name="download.birt" depends="download.birt.check" if="birt.not.available">

                            <echo message="Getting birt reporting engine ..." />

                            <mkdir dir="${install.home}/lib"/>

                            <get src="${birt.download.url}" dest="${install.home}/lib/birt-runtime-2_3_2_2.zip" />

                          </target>

                         

                         

                          <!-- Download JBoss AS -->

                          <target name="download.jboss.check">

                            <echo message="Checking JBoss AS download ..." />

                            <condition property="jboss.not.available">

                              <not>

                                <available file="${install.home}/lib/jboss-${jboss.server.version}.zip" />

                              </not>

                            </condition>

                          </target>

                          <target name="download.jboss" depends="download.jboss.check" if="jboss.not.available">

                            <echo message="Getting JBoss AS ..." />

                            <mkdir dir="${install.home}/lib"/>

                            <get src="${jboss.download.url}" dest="${install.home}/lib/jboss-${jboss.server.version}.zip"  />

                          </target>

                         

                         

                          <!-- Download Eclipse -->

                          <condition property="download.type" value="win32">

                            <os family="windows" />

                          </condition>

                          <condition property="download.type" value="macosx-carbon">

                            <and>

                              <os family="mac" />

                              <os family="unix" />

                            </and>

                          </condition>

                          <condition property="download.type" value="linux-gtk">

                            <and>

                              <not>

                                <os family="mac" />

                              </not>

                              <os family="unix" />

                              <not>

                                <or>

                                  <os arch="x86_64" />

                                  <os arch="amd64" />

                                </or>

                              </not>

                            </and>

                          </condition>

                          <condition property="download.type" value="linux-gtk-x86_64">

                            <and>

                              <not>

                                <os family="mac" />

                              </not>

                              <os family="unix" />

                              <or>

                                <os arch="x86_64" />

                                <os arch="amd64" />

                              </or>

                            </and>

                          </condition>

                          <condition property="download.extension" value="zip">

                            <os family="windows" />

                          </condition>

                          <condition property="download.extension" value="tar.gz">

                            <or>

                              <os family="mac" />

                              <os family="unix" />

                            </or>

                          </condition>

                          <condition property="expandTypeZip" value="true">

                            <equals arg1="${download.extension}" arg2="zip" />

                          </condition> 

                          <condition property="expandTypeTarGz" value="true">

                            <equals arg1="${download.extension}" arg2="tar.gz" />

                          </condition> 

                          <target name="download.eclipse.check">

                            <echo message="Checking Eclipse download ..." />

                            <condition property="eclipse.not.available">

                              <not>

                                <available file="${install.home}/lib/eclipse-java-helios-${download.type}.${download.extension}" />

                              </not>

                            </condition>

                          </target>

                          <target name="download.eclipse" depends="download.eclipse.check" if="eclipse.not.available">

                            <echo message="Getting Eclipse ..." />

                            <mkdir dir="${install.home}/lib"/>

                            <get src="http://download.eclipse.org/technology/epp/downloads/release/helios/R/eclipse-java-helios-${download.type}.${download.extension}"

                                 dest="${install.home}/lib/eclipse-java-helios-${download.type}.${download.extension}"  />

                          </target>

                          <target name="download.eclipse.gef.check">

                            <echo message="Checking Eclipse GEF download ..." />

                            <condition property="eclipse.gef.not.available">

                              <not>

                                <available file="${install.home}/lib/GEF-SDK-3.6.1.zip" />

                              </not>

                            </condition>

                          </target>

                          <target name="download.eclipse.gef" depends="download.eclipse.gef.check" if="eclipse.gef.not.available">

                            <echo message="Getting Eclipse GEF ..." />

                            <mkdir dir="${install.home}/lib"/>

                            <get src="http://download.eclipse.org/tools/gef/downloads/drops/3.6.1/R201009132020/GEF-SDK-3.6.1.zip"

                                 dest="${install.home}/lib/GEF-SDK-3.6.1.zip"  />

                          </target>

                         

                         

                          <!-- Download jBPM binaries -->

                          <target name="download.jBPM.bin.check">

                            <echo message="Checking jBPM binaries download ..." />

                            <condition property="jBPM.bin.not.available">

                              <not>

                                <available file="${install.home}/lib/jbpm-${jBPM.version}-bin.zip" />

                              </not>

                            </condition>

                          </target>

                          <target name="download.jBPM.bin" depends="download.jBPM.bin.check" if="jBPM.bin.not.available">

                            <echo message="Getting jBPM binaries ..." />

                            <mkdir dir="${install.home}/lib"/>

                            <get src="${jBPM.url}/jbpm-${jBPM.version}-bin.zip" dest="${install.home}/lib/jbpm-${jBPM.version}-bin.zip"  />

                          </target>

                         

                         

                          <!-- Download Drools Guvnor -->

                          <target name="download.drools.guvnor.check">

                            <echo message="Checking Drools Guvnor download ..." />

                            <condition property="drools.guvnor.not.available">

                              <not>

                                <available file="${install.home}/lib/drools-${drools.version}-guvnor.war" />

                              </not>

                            </condition>

                          </target>

                          <target name="download.drools.guvnor" depends="download.drools.guvnor.check" if="drools.guvnor.not.available">

                            <echo message="Getting Drools Guvnor ..." />

                            <mkdir dir="${install.home}/lib"/>

                            <get src="${drools.url}/drools-${drools.version}-guvnor.war" dest="${install.home}/lib/drools-${drools.version}-guvnor.war"  />

                          </target>

                         

                         

                          <!-- Download Designer -->

                          <target name="download.designer.check">

                            <echo message="Checking Designer download ..." />

                            <condition property="designer.not.available">

                              <not>

                                <available file="${install.home}/lib/designer-${designer.version}.war" />

                              </not>

                            </condition>

                          </target>

                          <target name="download.designer" depends="download.designer.check" if="designer.not.available">

                            <echo message="Getting Designer ..." />

                            <mkdir dir="${install.home}/lib"/>

                            <get src="${designer.url}/designer-${designer.version}.war" dest="${install.home}/lib/designer-${designer.version}.war"  />

                          </target>

                         

                         

                          <!-- Download jBPM Eclipse plugins -->

                          <target name="download.jBPM.eclipse.check">

                            <echo message="Checking jBPM Eclipse download ..." />

                            <condition property="jBPM.eclipse.not.available">

                              <not>

                                <available file="${install.home}/lib/jbpm-${jBPM.version}-eclipse-all.zip" />

                              </not>

                            </condition>

                          </target>

                          <target name="download.jBPM.eclipse" depends="download.jBPM.eclipse.check" if="jBPM.eclipse.not.available">

                            <echo message="Getting jBPM Eclipse ..." />

                            <mkdir dir="${install.home}/lib"/>

                            <get src="http://community.jboss.org/servlet/JiveServlet/download/15922-6-25925/jbpm-5.0.0-eclipse-all.zip" dest="${install.home}/lib/jbpm-${jBPM.version}-eclipse-all.zip"  />

                          </target>

                         

                         

                          <!-- Download Drools Eclipse plugins -->

                          <target name="download.drools.eclipse.check">

                            <echo message="Checking Drools Eclipse download ..." />

                            <condition property="drools.eclipse.not.available">

                              <not>

                                <available file="${install.home}/lib/drools-${drools.version}-eclipse-all.zip" />

                              </not>

                            </condition>

                          </target>

                          <target name="download.drools.eclipse" depends="download.drools.eclipse.check" if="drools.eclipse.not.available">

                            <echo message="Getting Drools Eclipse ..." />

                            <mkdir dir="${install.home}/lib"/>

                            <get src="${drools.url}/drools-${drools.version}-eclipse-all.zip" dest="${install.home}/lib/drools-${drools.version}-eclipse-all.zip"  />

                          </target>

                         

                         

                          <!-- Download jBPM gwt-console -->

                          <target name="download.jBPM.gwt-console.check">

                            <echo message="Checking jBPM gwt-console download ..." />

                            <condition property="jBPM.gwt-console.not.available">

                              <not>

                                <available file="${install.home}/lib/jbpm-${jBPM.version}-gwt-console.zip" />

                              </not>

                            </condition>

                          </target>

                          <target name="download.jBPM.gwt-console" depends="download.jBPM.gwt-console.check" if="jBPM.gwt-console.not.available">

                            <echo message="Getting jBPM gwt-console ..." />

                            <mkdir dir="${install.home}/lib"/>

                            <get src="${jBPM.url}/jbpm-${jBPM.version}-gwt-console.zip" dest="${install.home}/lib/jbpm-${jBPM.version}-gwt-console.zip"  />

                          </target>

                         

                         

                          <!-- ############ INSTALL ############ -->

                         

                         

                          <!-- Install JBoss AS -->

                          <target name="install.jboss" depends="download.jboss">

                            <unzip src="${install.home}/lib/jboss-${jboss.server.version}.zip" dest="${install.home}" />

                            <chmod perm="a+x" file="${install.home}/jboss-${jboss.server.version}/bin/run.sh" />

                            <chmod perm="a+x" file="${install.home}/jboss-${jboss.server.version}/bin/shutdown.sh" />

                          </target>

                         

                         

                          <!-- Install guvnor -->

                          <target name="check.jboss.version">

                            <condition property="jboss.version.is.5">

                              <equals arg1="${jboss.server.version}" arg2="5.1.0.GA" />

                            </condition>

                          </target>

                         

                         

                          <target name="install.guvnor.into.jboss" depends="download.drools.guvnor">

                            <antcall target="install.guvnor.into.jboss.5" />

                            <antcall target="install.guvnor.into.jboss.other" />

                          </target>

                          

                          <target name="install.guvnor.into.jboss.5" depends="check.jboss.version" if="jboss.version.is.5">

                            <mkdir dir="${install.home}/target/drools-guvnor"/>

                            <unzip src="${install.home}/lib/drools-${drools.version}-guvnor.war" dest="${install.home}/target/drools-guvnor" />

                            <delete>

                              <fileset dir="${install.home}/target/drools-guvnor/WEB-INF/lib" includes="xml-apis-*.jar"/>

                            </delete>

                            <zip basedir="${install.home}/target/drools-guvnor"

                                 destfile="${install.home}/target/drools-guvnor.war"/>

                            <copy file="${install.home}/target/drools-guvnor.war"

                                  tofile="${jboss.server.deploy.dir}/drools-guvnor.war"

                                  overwrite="true" />

                            <delete dir="${install.home}/target"/>

                          </target> 

                         

                         

                          <target name="install.guvnor.into.jboss.other" depends="check.jboss.version" unless="jboss.version.is.5">

                            <copy file="${install.home}/lib/drools-${drools.version}-guvnor.war"

                                  tofile="${jboss.server.deploy.dir}/drools-guvnor.war"

                                  overwrite="true" />

                          </target>

                          

                          <!-- Install designer -->

                          <target name="install.designer.into.jboss" depends="download.designer">

                            <copy file="${install.home}/lib/designer-${designer.version}.war"

                                  tofile="${jboss.server.deploy.dir}/designer.war"

                                  overwrite="true" />

                          </target>

                         

                         

                          <!-- Install configuration db file into jars -->

                          <target name="install.config.connectionDB.into.jars">

                            <mkdir dir="${install.home}/runtime/target"/>

                            <!-- Wilman: re build jbpm-human-task-5.X.X.jar -->

                            <mkdir dir="${install.home}/runtime/target/jbpm-human-task-${jBPM.version}-jar"/>

                            <unzip src="${install.home}/runtime/jbpm-human-task-${jBPM.version}.jar" dest="${install.home}/runtime/target/jbpm-human-task-${jBPM.version}-jar" />

                            <!-- Wilman: Fix for conflicting connection bd in configuration files in jars jbpm-->

                            <!-- Wilman: copy file jbpm-human-task-persistence.xml in jbpm-human-task-5.X.X.jar-->

                            <copy file="${install.home}/db/jbpm-human-task-persistence.xml"

                                  tofile="${install.home}/runtime/target/jbpm-human-task-${jBPM.version}-jar/META-INF/persistence.xml"

                                  overwrite="true"/>

                            <!-- Wilman: build jbpm-human-task-5.X.X.jar -->

                            <zip basedir="${install.home}/runtime/target/jbpm-human-task-${jBPM.version}-jar"

                                 destfile="${install.home}/runtime/target/jbpm-human-task-${jBPM.version}.jar"/>

                            <copy file="${install.home}/runtime/target/jbpm-human-task-${jBPM.version}.jar"

                                  tofile="${install.home}/runtime/jbpm-human-task-${jBPM.version}.jar"

                                  overwrite="true" />

                         

                         

                            <!-- Wilman: re build jbpm-bam-5.X.X.jar -->

                            <mkdir dir="${install.home}/runtime/target/jbpm-bam-${jBPM.version}-jar"/>

                            <unzip src="${install.home}/runtime/jbpm-bam-${jBPM.version}.jar" dest="${install.home}/runtime/target/jbpm-bam-${jBPM.version}-jar" />

                         

                         

                            <!-- Wilman: copy file jbpm-bam-hibernate.cfg.xml in jbpm-bam-5.X.X.jar-->

                            <copy file="${install.home}/db/jbpm-bam-hibernate.cfg.xml"

                                  tofile="${install.home}/runtime/target/jbpm-bam-${jBPM.version}-jar/hibernate.cfg.xml"

                                  overwrite="true"/>

                            <!-- Wilman: build jbpm-bam-5.X.X.jar -->

                            <zip basedir="${install.home}/runtime/target/jbpm-bam-${jBPM.version}-jar"

                                 destfile="${install.home}/runtime/target/jbpm-bam-${jBPM.version}.jar"/>

                            <copy file="${install.home}/runtime/target/jbpm-bam-${jBPM.version}.jar"

                                  tofile="${install.home}/runtime/jbpm-bam-${jBPM.version}.jar"

                                  overwrite="true" />

                         

                         

                           <delete dir="${install.home}/runtime/target"/>

                         

                         

                          </target>

                           

                          <!-- Install gwt-console -->

                          <target name="install.jBPM-gwt-console.into.jboss" depends="download.birt,download.jBPM.gwt-console,install.jBPM.runtime">

                            <!-- gwt-console -->

                            <mkdir dir="${install.home}/target"/>

                            <unzip src="${install.home}/lib/jbpm-${jBPM.version}-gwt-console.zip" dest="${install.home}/target" />

                            <mkdir dir="${install.home}/target/jbpm-gwt-console-server-war"/>

                            <unzip src="${install.home}/target/jbpm-gwt-console-server-${jBPM.version}.war"

                                   dest="${install.home}/target/jbpm-gwt-console-server-war"/>

                            <copy file="${install.home}/db/hibernate.cfg.xml"

                                  tofile="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/classes/hibernate.cfg.xml"

                                  overwrite="true" />

                            <copy file="${install.home}/db/persistence.xml"

                                  tofile="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/classes/META-INF/persistence.xml"

                                  overwrite="true" />

                            <!--

                            <antcall target="install.config.connectionDB.into.jars"/>

                                  -->

                            <!-- Wilman: copy file jbpm-human-task-5.X.X.jar into jbpm-gwt-console-server-war -->

                            <copy file="${install.home}/runtime/jbpm-human-task-${jBPM.version}.jar"

                                  tofile="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/jbpm-human-task-${jBPM.version}.jar"

                                  overwrite="true"/>

                            <!-- Wilman: copy file jbpm-bam-5.X.X.jar into jbpm-gwt-console-server-war -->

                            <copy file="${install.home}/runtime/jbpm-bam-${jBPM.version}.jar"

                                  tofile="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/jbpm-bam-${jBPM.version}.jar"

                                  overwrite="true"/>

                         

                         

                            <!-- Fix for conflicting javassist jar -->

                            <delete file="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/lib/javassist-3.6.0.GA.jar"/>

                            <!-- Other configuration like work item handlers -->

                            <copy todir="${install.home}/target/jbpm-gwt-console-server-war/WEB-INF/classes" overwrite="true">

                              <fileset dir="${install.home}/conf"/>

                            </copy>

                            <zip basedir="${install.home}/target/jbpm-gwt-console-server-war"

                                 destfile="${install.home}/target/jbpm-gwt-console-server-${jBPM.version}.war"/>

                            <copy file="${install.home}/target/jbpm-gwt-console-server-${jBPM.version}.war"

                                  tofile="${jboss.server.deploy.dir}/jbpm-gwt-console-server.war"

                                  overwrite="true" />

                            <copy file="${install.home}/target/jbpm-gwt-console-${jBPM.version}.war"

                                  tofile="${jboss.server.deploy.dir}/jbpm-gwt-console.war"

                                  overwrite="true" />

                            <delete dir="${install.home}/target"/>

                            <!-- db configuration -->

                            <copy file="${install.home}/db/${file.datasource}"

                                  tofile="${jboss.server.deploy.dir}/${file.datasource}"

                                  overwrite="true" />

                            <!-- wilman: copy driver -->

                            <copy file="${install.home}/db/driver/${driver.connection}"

                                  todir="${jboss.server.lib.dir}"

                                  overwrite="true" />

                            <!--

                            <copy todir="${jboss.server.lib.dir}" overwrite="true">

                              <fileset dir="${install.home}/db/driver/*"/>

                            </copy>

                            -->

                            <!-- authentication configuration -->

                            <copy file="${install.home}/auth/users.properties"

                                  tofile="${jboss.server.conf.dir}/users.properties"

                                  overwrite="true" />

                            <copy file="${install.home}/auth/roles.properties"

                                  tofile="${jboss.server.conf.dir}/roles.properties"

                                  overwrite="true" />

                            <!-- reporting -->

                            <antcall target="install.reporting.into.jboss" />

                          </target>

                         

                         

                          <target name="install.reporting.into.jboss" depends="check.birt" if="birt.download" >

                            <mkdir dir="${install.home}/target"/>

                            <unzip src="${install.home}/lib/birt-runtime-2_3_2_2.zip"

                                   dest="${install.home}/target"/>

                            <mkdir dir="${jboss.server.birt.dir}"/>

                            <mkdir dir="${jboss.server.birt.dir}/ReportEngine"/>

                            <copy todir="${jboss.server.birt.dir}/ReportEngine" overwrite="true">

                              <fileset dir="${install.home}/target/birt-runtime-2_3_2/ReportEngine"/>

                            </copy>

                            <delete dir="${install.home}/target"/>

                            <copy file="${install.home}/report/overall_activity.rptdesign"

                                  tofile="${jboss.server.birt.dir}/overall_activity.rptdesign"

                                  overwrite="true"/>

                            <copy file="${install.home}/report/process_summary.rptdesign"

                                  tofile="${jboss.server.birt.dir}/process_summary.rptdesign"

                                  overwrite="true"/>

                            <copy todir="${jboss.server.birt.dir}/ReportEngine/plugins/org.eclipse.birt.report.data.oda.jdbc_2.3.2.r232_v20090212/drivers" overwrite="true">

                              <fileset dir="${install.home}/db/driver"/>

                            </copy>

                          </target>

                         

                         

                          <!-- Install Eclipse -->

                          <target name="install.eclipse" depends="download.eclipse,download.eclipse.gef"> 

                            <antcall target="unzipEclipse" />

                            <antcall target="untarEclipse" />

                            <unzip dest="${install.home}" overwrite="true"

                                   src="${install.home}/lib/GEF-SDK-3.6.1.zip" />                                               

                          </target>

                          

                          <target name="unzipEclipse" if="expandTypeZip">

                            <unzip dest="${install.home}" overwrite="true"

                                   src="${install.home}/lib/eclipse-java-helios-${download.type}.zip" />

                          </target>

                         

                         

                          <target name="untarEclipse" if="expandTypeTarGz">

                            <gunzip src="${install.home}/lib/eclipse-java-helios-${download.type}.tar.gz"/>

                            <untar dest="${install.home}" src="${install.home}/lib/eclipse-java-helios-${download.type}.tar" />

                            <chmod perm="a+x" file="${install.home}/eclipse/eclipse" os="Linux"/>

                            <chmod perm="a+x" file="${install.home}/eclipse/Eclipse.app/Contents/MacOS/eclipse" os="Mac OS X"/>

                          </target>

                         

                         

                          <!-- Install Eclipse plugins -->

                          <target name="install.jBPM.runtime" depends="download.jBPM.bin">

                            <!-- create runtime -->

                            <mkdir dir="${install.home}/runtime"/>

                            <unzip src="${install.home}/lib/jbpm-${jBPM.version}-bin.zip" dest="${install.home}/runtime" />

                            <!-- Wilman set new configuration databases-->

                            <antcall target="install.config.connectionDB.into.jars"/>

                          </target>

                         

                         

                          <!-- Install Eclipse plugins -->

                          <target name="install.jBPM-eclipse.into.eclipse" depends="download.jBPM.eclipse">

                            <!-- install plugins -->

                            <unzip src="${install.home}/lib/jbpm-${jBPM.version}-eclipse-all.zip" dest="${eclipse.home}" />

                          </target>

                         

                         

                          <!-- Install Eclipse plugins -->

                          <target name="install.drools-eclipse.into.eclipse" depends="download.drools.eclipse">

                            <!-- install plugins -->

                            <unzip src="${install.home}/lib/drools-${drools.version}-eclipse-all.zip" dest="${eclipse.home}" />

                            <copy todir="${eclipse.home}/features" overwrite="true">

                              <fileset dir="${eclipse.home}/drools-update-site/features"/>

                            </copy>

                            <copy todir="${eclipse.home}/plugins" overwrite="true">

                              <fileset dir="${eclipse.home}/drools-update-site/plugins"/>

                            </copy>

                            <delete dir="${eclipse.home}/drools-update-site"/>

                          </target>

                         

                         

                          <!-- Install Demo -->

                          <target name="install.demo" depends="install.jboss,install.guvnor.into.jboss,install.designer.into.jboss,install.jBPM-gwt-console.into.jboss,install.eclipse,install.jBPM-eclipse.into.eclipse,install.jBPM.runtime,install.drools-eclipse.into.eclipse,start.human.task" />

                         

                         

                          <!-- WILMAN -->

                          <!-- Install jbpm5 -->

                          <target name="install.jbpm5" depends="install.guvnor.into.jboss,install.designer.into.jboss,install.jBPM-gwt-console.into.jboss,install.jBPM.runtime,start.human.task"/>

                         

                         

                        <!--install.eclipse,install.jBPM-eclipse.into.eclipse,install.jBPM.runtime,install.drools-eclipse.into.eclipse" -->

                         

                         

                         

                         

                          <!-- ############ START/STOP ############ -->

                         

                         

                          <!-- Start H2 server -->

                          <target name="start.h2" depends="download.h2">

                            <java classname="org.h2.tools.Server" fork="true" spawn="true">

                              <arg value="-tcp" />

                              <classpath location="${install.home}/db/driver/h2.jar" />

                            </java>

                          </target>

                          <!-- Stop H2 server -->

                          <target name="stop.h2" depends="download.h2">

                            <java classname="org.h2.tools.Server" fork="true">

                              <classpath location="${install.home}/db/driver/h2.jar" />

                              <arg value="-tcpShutdown" />

                              <arg value="tcp://localhost:9092" />

                            </java>

                          </target>

                         

                         

                          <!-- Start JBoss AS -->

                          <target name="start.jboss">

                          

                            <property name="jboss.full.path.win" location="${jboss.home}/bin/run.bat" />

                            <exec executable="${jboss.full.path.win}" spawn="yes"

                                  os="Windows 7,Windows Vista,Windows XP,Windows 2000,Windows 2003">

                              <env key="JAVA_OPTS" value="-XX:MaxPermSize=256m -Xms256m -Xmx512m" />

                              <arg value="-b" />

                              <arg value="${jboss.bind.address}" />

                              <arg value="-Djbpm.console.directory=${install.home}/sample/evaluation/src/main/resources" />

                            </exec>

                          

                            <property name="jboss.full.path.linux" location="${jboss.home}/bin/run.sh" />

                            <exec executable="${jboss.full.path.linux}" spawn="yes" os="Linux,Mac OS X">

                              <env key="JAVA_OPTS" value="-XX:MaxPermSize=256m -Xms256m -Xmx512m" />

                              <arg value="-b" />

                              <arg value="${jboss.bind.address}" />

                              <arg value="-Djbpm.console.directory=${install.home}/sample/evaluation/src/main/resources" />

                            </exec>

                            <waitfor maxwait="5" maxwaitunit="minute" checkevery="30"

                                     checkeveryunit="second" timeoutproperty="jboss.timeout">

                              <socket server="${jboss.bind.address}" port="8180" />

                            </waitfor>

                            <fail if="jboss.timeout" message="jboss did not start within 5 minutes"/>

                          </target>

                          <!-- Stop JBoss AS -->

                          <target name="stop.jboss">

                            <exec executable="${jboss.home}/bin/shutdown.bat"

                                  os="Windows 7,Windows Vista,Windows XP,Windows 2000,Windows 2003">

                              <arg value="-s" />

                              <arg value="jnp://${jboss.bind.address}:1099" />

                              <arg value="-S" />

                            </exec>

                            <exec executable="${jboss.home}/bin/shutdown.sh" os="Linux,Mac OS X">

                              <arg value="-s" />

                              <arg value="jnp://${jboss.bind.address}:1099" />

                              <arg value="-S" />

                            </exec>

                          </target>

                         

                         

                          <!-- Start Eclipse -->

                          <target name="start.eclipse">

                            <exec executable="${eclipse.home}/eclipse.exe"

                                  spawn="yes"

                                  os="Windows 7,Windows Vista,Windows XP,Windows 2000,Windows 2003">

                              <arg value="-data" />

                              <arg value="${eclipse.workspace.dir}" />

                              <arg value="-plugincustomization" />

                              <arg value="./eclipse.preferences.ini" />

                            </exec>

                            <exec executable="${eclipse.home}/eclipse" spawn="yes" os="Linux">

                              <arg value="-data" />

                              <arg value="${eclipse.workspace.dir}" />

                              <arg value="-plugincustomization" />

                              <arg value="./eclipse.preferences.ini" />

                            </exec>

                                    <chmod perm="a+x" file="./generate.mac.eclipse.preferences.sh" />

                            <exec executable="./generate.mac.eclipse.preferences.sh" os="Mac OS X"/>

                            <exec executable="${eclipse.home}/Eclipse.app/Contents/MacOS/eclipse" spawn="yes" os="Mac OS X">

                              <arg value="-data" />

                              <arg value="../../../../${eclipse.workspace.dir}" />

                              <arg value="-plugincustomization" />

                              <arg value="../../../../mac.eclipse.preferences.ini" />

                            </exec>

                          </target>

                         

                         

                          <!-- Start Human Task Service -->

                          <path id="classpath.human.task">

                            <fileset dir="${install.home}/runtime" includes="**/*.jar"/>

                            <fileset dir="${install.home}/db/driver" includes="**/*.jar"/>

                          </path>

                          <target name="start.human.task">

                            <mkdir dir="${install.home}/task-service/target"/>

                            <javac srcdir="${install.home}/task-service/src" destdir="${install.home}/task-service/target" classpathref="classpath.human.task">

                              <compilerarg value="-Xlint:unchecked"/>

                            </javac>

                            <copy todir="${install.home}/task-service/target">

                              <fileset dir="${install.home}/task-service/resources"/>

                            </copy>

                            <java classname="org.jbpm.DemoTaskService" fork="true">

                              <classpath>

                                <pathelement path="${install.home}/task-service/target"/>

                                <path refid="classpath.human.task" />

                              </classpath>

                            </java>

                          </target>

                         

                         

                          <!-- Start Demo -->

                          <target name="start.demo" depends="start.jboss,start.human.task" />

                          <!-- Stop Demo -->

                          <target name="stop.demo" depends="stop.jboss" />

                         

                         

                          <!-- ############ CLEAN ############ -->

                          

                          <!-- Clean jboss -->

                          <target name="clean.jboss">

                            <delete dir="${install.home}/jboss-${jboss.server.version}"/>

                            <delete dir="${install.home}/repository"/>

                            <delete file="${install.home}/repository.xml"/>

                          </target>

                         

                         

                          <!-- Clean eclipse -->

                          <target name="clean.eclipse">

                            <delete dir="${install.home}/eclipse"/>

                            <delete dir="${install.home}/runtime"/>

                            <delete dir="${eclipse.workspace.dir}"/>

                          </target>

                         

                         

                          <!-- Stop Demo -->

                          <target name="clean.demo" depends="clean.jboss,clean.eclipse" />

                          

                        </project>

                         

                         

                        I hope to help with that.

                         

                        Wilman

                        • 9. JBPM5 integration with oracle
                          salaboy21

                          William, thanks for post such useful information. Can you create a wiki document with that information?

                          Probably it will help a lot and other people can add the own customizations!

                          Greetings.

                          • 10. JBPM5 integration with oracle
                            arunsprasath

                            Hi,

                             

                            I just followed the instructions given by Wilman.

                            Actually I am using oracle instead of postgresql. But none of the tables are populated in my schema.

                            I have updated all the places where instead of postgresql I kept oracle details.

                             

                            After that i did "ant install.jbpm5".

                             

                            Kindly help me to solve the issue.

                             

                            Thanks in advance.

                            • 11. JBPM5 integration with oracle
                              wilmanchamba

                              Hi, Mauricio

                               

                              Indeed, with the loxageek company, has opened a wiki at:

                              Personalización de JBPM5 Instaler para Base de Datos

                               

                              http://www.loxageek.com/web/guest/base-de-conocimiento/-/wiki/JBPM/Personalización+de+JBPM5+Instaler+para+Base+de+Datos

                              • 12. JBPM5 integration with oracle
                                wilmanchamba

                                Hi Arun,

                                 

                                Try the start.demo target to complete the tables' creation, at this point you should have 27 tables and the tables regarding human task must be populated.

                                 

                                You must remove the dependency start.human.task from the start.demo target, it raises start.human.task service, this target also runs a class located in

                                {jbpm-installer}/task-service/src/org/jbpm/DemoTaskService.java, in which you have to comment out the lines of adding users and groups

                                and not have problems with creating users and groups, and has already created theinstall.jbpm5.

                                • 13. JBPM5 integration with oracle
                                  bpmn2user

                                  Though the following link uses Tomcat, instead of JBoss, information about changes to hibernate.cfg.xml etc might be useful

                                   

                                  http://community.jboss.org/people/bpmn2user/blog/2011/02/26/orcale-integration-with-jbpm5

                                  • 14. JBPM5 integration with oracle
                                    anandintouch

                                    Hi Arun,

                                    For Oracle integration,you need to change Oracle dialect,username,password,url in respective persistence.xml  files.

                                    For example-

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

                                          <property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver"/>

                                          <property name="hibernate.connection.url" value="jdbc:oracle:thin:@localhost:1521:xe" />

                                          <property name="hibernate.connection.username" value="jbpm"/>

                                          <property name="hibernate.connection.password" value="password"/>

                                     

                                    And also make sure that oracle jdbc jar(e.g. oracleJDBC-10.jar ) is in class path which can also be configured in ant script as I had mentioned in my old post date  Dec 1, 2010 7:07 PM under section "Installer build file change is given below"

                                    1 2 Previous Next