[JBoss jBPM] - Re: jBPM 4 CR1 AsyncActivity Unit Test fails due to FK const
by joshsiaw
Here you go:
jbpm.cfg.xml file:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <jbpm-configuration>
|
| <import resource="jbpm.default.cfg.xml" />
| <import resource="jbpm.tx.hibernate.cfg.xml" />
| <import resource="jbpm.jpdl.cfg.xml" />
| <import resource="jbpm.identity.cfg.xml" />
|
| <!-- Job executor is excluded for running the example test cases. -->
| <!-- To enable timers and messages in production use, this should be included. -->
| <!--
| <import resource="jbpm.jobexecutor.cfg.xml" />
| -->
|
| <import resource="jbpm.mail.templates.examples.xml" />
|
| </jbpm-configuration>
|
jbpm.hibernate.cfg.xml file:
| <?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>
|
| <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
| <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
| <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpmdb</property>
| <property name="hibernate.connection.username">root</property>
| <property name="hibernate.connection.password">p4ssw0rd</property>
| <property name="hibernate.hbm2ddl.auto">update</property>
| <property name="hibernate.format_sql">true</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.jpdl.hbm.xml" />
| <mapping resource="jbpm.identity.hbm.xml" />
|
| </session-factory>
| </hibernate-configuration>
|
logging.properties file:
| handlers= java.util.logging.ConsoleHandler
| redirect.commons.logging = enabled
|
| java.util.logging.ConsoleHandler.level = FINE
| java.util.logging.ConsoleHandler.formatter = org.jbpm.internal.log.LogFormatter
|
| org.jbpm.level=FINE
| # org.jbpm.pvm.internal.tx.level=FINE
| # org.jbpm.pvm.internal.wire.level=FINE
| # org.jbpm.pvm.internal.util.level=FINE
|
| org.hibernate.level=INFO
| org.hibernate.cfg.SettingsFactory.level=SEVERE
| org.hibernate.cfg.HbmBinder.level=SEVERE
| # org.hibernate.SQL.level=FINEST
| # org.hibernate.type.level=FINEST
| # org.hibernate.tool.hbm2ddl.SchemaExport.level=FINEST
| # org.hibernate.transaction.level=FINEST
|
I don't have a -ds.xml file though. Is that needed? I ran the build.xml using ant with the datasource settings modified in the build file. This is what I modified:
| <!-- DEFAULT PROPERTY VALUES -->
| <property name="database" value="mysql" />
| <property name="jbpm.parent.dir" value="../.." />
| <property name="jbpm.version" value="4.0.CR1" />
| <property name="jboss.version" value="5.0.0.GA" />
| <property name="jbpm.home" value="${jbpm.parent.dir}/jbpm-${jbpm.version}" />
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4238359#4238359
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4238359
17 years, 1 month
[JBoss jBPM] - Deleting a ProcessInstance in jBPM 3
by starbuxman
apologies if this is spam. I sent it to the forum mailing address but it didnt seem like it took, so i suspect i Have to post here instead. Anyway, apologies:
Hello,
I'm wondering if there's any recipes for deleting a ProcessInstance
from the DBMS in jBPM 3?
I realize that it's, essentially, just a Hibernate object graph and
that tailing through and scorching the earth on all the foreign keys,
as I would with any Hibernate model, ought to do it.. Having said
that, I'd love to avoid doing it if somebody else has already dealt
with it, because it seems awfully hairy from where I'm sitting :-)
Is there some hidden API method unnoticed? Basically, as processes
finish, I (almost ) have a trigger that will automatically check to
see if the node that was just finished is the last for the process
instance and it inserts a record into an audit table, so that I can
easily verify process X was run for customer X with variables 1,2, and
3. I then want to purge the process instance itself from the database.
Any ideas? Is this best handled from Java or from the DBMS? I like the
idea of handling it from Java since its more easily "read" for a Java
dev, plus, it's still transactional, and may not be that much slower
:-)
Issues I can imagine are basically, what happens in the case of
concurrences, or subprocesses? If I create a concurrence and that in
turn forks 10 subprocesses, and one of the 10 subprocesses finishes, i
want it to try and delete itself. When all 10 subprocesses have
finished, the super process (the creator of the subprocesses) should
evaluate that it has no outstanding branches and then try and delete
itself. You see?
Thanks,
Josh
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4238358#4238358
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4238358
17 years, 1 month