[jboss-user] [JBoss jBPM] - org.hibernate.AssertionFailure: collection [org.jbpm.graph.d

arshadnj do-not-reply at jboss.com
Wed Jan 3 13:11:31 EST 2007


Hi,

I am trying to update the due date of a timer through my code and here is the step by step actions I have taken which is leading me to this exception:

1. I am creating a timer through process defintion for a specific state
2. When a enity business date changes, I need to modify the due date of the timer associated with this state.
3. What I do when this business date is changed:
   a. I am find the specific timer using SchedulerSession and for the given token
   b. Update the due date for this timer and call the deleteTimer and saveTimer by passing the same object (since there is no update timer method).

It is throwing this exception. We are using the spring modules for managing this transactions associated with hibernate and JBPM.

Here is little more info about code:
Process Defintion:
<state name="state name">
  |       <event type="node-enter">
  |          <action name="action" class="org.springmodules.workflow.jbpm31.JbpmHandlerProxy">
  |          	<targetBean>actionBeanName</targetBean>
  |          </action>
  |       </event>
  |       <transition name="name" to="another state"></transition>
  |       <timer name="lateTimer" duedate="1 days" transition="timeout"></timer>
  |    </state>

and the java code:
bpmTemplate.execute(new JbpmCallback() {
  |       public Object doInJbpm(JbpmContext context) {
  |         ProcessInstance processInstance = getProcessInstance(context, enity);
  |         if (processInstance != null) {
  |           Token token = processInstance.getRootToken();
  |           SchedulerSession schedulerSession = context.getSchedulerSession();
  | List<Timer> timers = schedulerSession.findTimersByName(
  | WorkflowProcessConstants.TIMER_NAME, token);
  |         	  Timer timer = timers.get(0);
  | if(!TimeUtil.isSameDay(timer.getDueDate(), enityDate)){
  |       		  timer.setDueDate(entityDate);
  |         		  schedulerSession.deleteTimer(timer);
  |         		  schedulerSession.saveTimer(timer);

and finally the stack trace:
org.hibernate.AssertionFailure: collection [org.jbpm.graph.def.Node.leavingTransitions] was not processed by flush()
  | 	org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:205)
  | 	org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:332)
  | 	org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:28)
  | 	org.hibernate.impl.SessionImpl.flush(SessionImpl.java:985)
  | 	org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:333)
  | 	org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
  | 	org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:584)
  | 	org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:496)
  | 	org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:469)
  | 	org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:266)
  | 	org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
  | 	org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
  | 	org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
  | 	$Proxy6.updateAndAdjustWorkflow(Unknown Source)
  | Controller.onFormSubmit(Controller.java:178)
  | 	AdminBaseFormController.onSubmit(AdminBaseFormController.java:130)
  | 	org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:258)
  | 	org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:259)
  | 	org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
  | 	org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
  | 	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:717)
  | 	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:658)
  | 	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
  | 	org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:357)
  | 	javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
  | 	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  | 	org.donorschoose.web.filter.ActionFilter.doFilter(ActionFilter.java:112)
  | 	org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
  | 	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
  | 
  | 
  | note The full stack trace of the root cause is available in the Apache Tomcat/5.5.12 logs.




View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997648#3997648

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997648



More information about the jboss-user mailing list