0 Replies Latest reply on Jan 10, 2008 7:54 PM by jcarlos_andia

    JbpmContext Transaction begin not detected

    jcarlos_andia

      Hi everybody.

      I have a workflow to approve users, for that I have a method with the annotation @CreateProcess that creates a ProcessInstance, which works well (creates a processInstance with no problem). In a second method I need to update the first taskInstance of the processInstance created, for that I injected the @JbpmContext jbmContext so I can make jbmContext .save(taskInstance) and now I can not create a process the error is "Transaction begin not detected, try installing transaction:ejb-transaction in components.xml". When I add an entry like this:

      <transaction:ejb-transaction/>

      It throws an error when starting the server stating that the entry transaction is not bound.

      I also try not injecting the JbpmContext and create it from jbpmConfiguration (jbpmConfiguration.createJbpmContext) but it appears an error saying "Illegal attempt to associate a collection with two open sessions".

      I have been going around doing session.merge, beginning transactions, closing a session and open it againg, etc. and nothing works. I would like to know what I am doing wrong with injecting the JbpmContext, or with creating the jbpmContext from jbpmConfiguration, or if there is another way to save a jbpm component.

      All this stuff is within a SFSB with a scope of BusinessProcess. The funny part is that all this was working when I called its methods from another SFSB (the creation of the process and the updating of the task instance) but I had to change that and call my method from within my SFSB since its functionality is going to be used from various components.

      I'm using Seam 2.0GA with Jboss-4.2.2.GA.

      Thanks in advance.