| At line 24 added 1 line. |
| {{org.appfuse.jbpm.config}} - will contain hibernate configuration files / identity files \\ |
| At line 25 changed 1 line. |
| {{org.appfuse.jbpm.ant}} - will contain ant tasks (such as loading identities, cleaning schema, etc)\\ |
|
| The following files are from the Jbpm Starter Kit (see [IntegeratingJBPMIntoAppfuse] for the download link) :- |
|
| Copy the following files to {{org.appfuse.jbpm.config}}: |
| 1. {{jbpm/src/config.files/hibernate.cfg.xml}}\\ |
| 2. {{jbpm/src/resources/hsqldb/create.db.hibernate.properties}}\\ |
| 3. {{jbpm/src/resources/hsqldb/identity.db.xml}}\\ |
|
| {{create.db.hibernate.properties}} does require modification to point to the Jbpm datasource (the same as the one defined previously in Part I). |
|
| {{{ |
|
| hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect |
| hibernate.connection.driver_class=com.mysql.jdbc.Driver |
| hibernate.connection.url=jdbc:mysql://localhost/jbpm?useUnicode=true&characterEncoding=utf-8 |
| hibernate.connection.username=root |
| hibernate.connection.password= |
| hibernate.show_sql=true |
|
| hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider |
|
| }}} |
| \\ |
| \\ |
| {{identity.db.xml}} contains users/group/participation data. It can be modified to your liking. More on this later when we delve into creating / assinging tasks in the workflow. |
|
| And finally add these targets to your main AppFuse {{build.xml}} file: |
|
| {{{ |
|
| <target name="build.processes" description="builds the example processes"> |
| <copy todir="build/dao/gen/org/appfuse/jbpm/process/test"> |
| <fileset dir="src/dao/org/appfuse/jbpm/process/test" /> |
| </copy> |
| <zip destfile="build/dao/gen/org/appfuse/jbpm/process/test.process"> |
| <fileset dir="build/dao/gen/org/appfuse/jbpm/process/test" /> |
| </zip> |
| </target> |
|
| |
| <target name="clean_jbpm" depends="build.processes, declare.jbpm.tasks" description="refreshes jbpm database"> |
| <jbpmschema actions="drop" |
| cfg="src/dao/org/appfuse/jbpm/config/hibernate.cfg.xml" |
| properties="src/dao/org/appfuse/jbpm/config/create.db.hibernate.properties"/> |
| <jbpmschema actions="create" |
| cfg="src/dao/org/appfuse/jbpm/config/hibernate.cfg.xml" |
| properties="src/dao/org/appfuse/jbpm/config/create.db.hibernate.properties"/> |
| <deployprocess cfg="src/dao/org/appfuse/jbpm/config/hibernate.cfg.xml" |
| properties="src/dao/org/appfuse/jbpm/config/create.db.hibernate.properties"> |
| <fileset dir="build/dao/gen/org/appfuse/jbpm/process" includes="*.process" /> |
| </deployprocess> |
| <loadidentities file="src/dao/org/appfuse/jbpm/config/identity.db.xml" |
| cfg="src/dao/org/appfuse/jbpm/config/hibernate.cfg.xml" |
| properties="src/dao/org/appfuse/jbpm/config/create.db.hibernate.properties"/> |
| </target> |
|
|
| <target name="declare.jbpm.tasks"> |
| <taskdef classpathref="dao.compile.classpath" resource="org/jbpm/ant/jbpm.ant.tasks.properties" format="properties"></taskdef> |
| </target> |
| }}} |
| \\ |
| {{build.processes}} is a convenience task to build process defnitions. Multiple definitions can be added. |
| {{declare.jbpm.tasks}} does exactly what it names implies, loads task definitions used in the next target. |
| {{clean_jbpm}} refreshes the jbpm db. Which i find myself doing a lot of! It first drops the schema(you will lose all changes, so beaware), then creates a new one, then deploys the process defintions and finally loads the workflow identities(users) into the jbpm database. |
|