[jboss-user] [JBoss jBPM] - sessions and forks

pedrosacosta do-not-reply at jboss.com
Tue Oct 10 06:19:42 EDT 2006


I'm using a fork in my process definition, but i want to persist in the DB the sibling tokens of the fork. The problem is, the way that i'm implementing this funcionality, i've 

  | HibernateException Illegal attempt to associate a collection with two open sessions
  |  error. The cause of the error is the following line inside SpawningMultipleTransitions:

  | JbpmContext jbpmContext = JbpmConfiguration.getInstance().createJbpmContext();
  | 

The way i'm doing is:

processdefinition.xml

  |  ...
  |  <start-state name="start">
  |       <transition name="to_fork" to="Fork"></transition>
  |    </start-state>
  |    <fork name="Fork">
  |       <event type="node-enter">
  | 				<action name="spawning" class="com.link.bem.jbpm.action.SpawningMultipleTransitions"/>
  |       </event>
  |       <transition name="Path_A" to="Acidentes_A1"></transition>
  |       <transition name="Path_B" to="Acidentes_B1"></transition>
  |       <transition name="Path_C" to="Acidentes_C1"></transition>
  |       <transition name="Path_D" to="Acidentes_D1"></transition>
  |    </fork>
  |    ...
  | 


The problem is, when i enter the fork, i've already a JbpmContext session opened. How can use the session opened before enter the SpawningMultipleTransitions inside this class, or how should i close the opened session before open a new one inside the SpawningMultipleTransitions?

I hope i've made myself clear.

Thanks,
Pedro

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

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



More information about the jboss-user mailing list