Thanks for the input, I may have the same problem. Originally, my problem
seemed to be related to the JBPM_LOG table:
| Batch entry 0 insert into JBPM_LOG (INDEX_, DATE_, TOKEN_, PARENT_,
TRANSITION_, SOURCENODE_, DESTINATIONNODE_, CLASS_, ID_) values ( was aborted.
Call getNextException() to see the cause.
|
However the code that calls it, does end one task (looks like a set in the code
below, but it is only one). Then the code tries to retrieve the newly created
tasks that are generated by ending the previous task and taking the default
transition. The strange thing is that this code will cause a deadlock
sometimes, and not others. Do I need to flush the JbpmSession or Hibernate
session before iterating the new tasks to avoid this problem as the transaction
is not comitted until the finally block. If so how? Thanks.
| ProcessInstance pi =
session.getGraphSession().loadProcessInstance(Long.valueOf(processInstanceID));
| //remove complaint variable
| ContextInstance contextInstance = pi.getContextInstance();
| contextInstance.deleteVariable("complaint");
|
| //end current tasks in order to follow the default transition
| Collection<MyTaskInstance> tasks =
pi.getTaskMgmtInstance().getTaskInstances();
| for(MyTaskInstance ti:tasks){
| ti.end();
| }
|
| //DO I NEED TO FLUSH THE TRANSACTION HERE?
|
| //set new tasks names and assign to the user location
| tasks = pi.getTaskMgmtInstance().getTaskInstances();
| for(MyTaskInstance ti:tasks){
| if(!ti.hasEnded()){
| ti.setDescription(user.getFirstName() + " " +
user.getLastName() + " - "
| + locationID + " - " +
| new SimpleDateFormat("MM/dd/yyyy").format(new Date()));
| ti.setActorId(createAssignmentExpression(accountID,locationID));
| }
| }
| session.getGraphSession().saveProcessInstance(pi);
|
| *...finally block omitted where session is closed....*
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3943573#3943573
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3943573
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user