PDA

View Full Version : Jbpm31 Module and Deploy Process


akakunin
Apr 12th, 2006, 02:19 AM
I just downloaded last version of jbpm31 module and migrated our web-application from approach got from jbpm (initialization of configuration with jbpm's org.jbpm.web.JbpmContextFilter) to use jbpmConfiguration via spring beanFactory.

I'm using default settings I've got from spring-jbpm31 test for dataSource (only difference i'm using Postgres), transactionManager and jbpmConfiguration...

Everything works fine.... but only for reading...

Then I try to save something - it seems done well - but not really saved.
It seems for me that we problem in transaction management... but I'm not very familiar with transactions in Spring... before migration to the Spring jbpm works fine without any transactions...


So, how it is possible to make working correctly? For example this code I'm using for deploying new process definition:

ZipInputStream zis = new ZipInputStream(fileItem.getInputStream());
JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
processDefinition = ProcessDefinition.parseParZipInputStream(zis);
jbpmContext.deployProcessDefinition(processDefinit ion);


What I should add or change to see my process definition on the next web-page? (I cannot find it by id I had in deploy)

Thank you for your advice

akakunin
Apr 12th, 2006, 04:55 AM
OK, I found the source of problem - JbpmContextFilter called jbpmContext.close() after processing the pages - this method commited hibernate transaction user in JBPM Context.

So, I added this method into my code and everything started to work

Costin Leau
Apr 12th, 2006, 06:23 AM
So is there something missing from the jbpm support or the problem was in your code?