9 Replies Latest reply on Jan 29, 2009 8:29 PM by toppac.toppac.gmail.com

    Starting two tasks of different processes instances cause conversation error

    mikool

      Hi there!


      I have a simple application with a business process. The processes can be started without any problems. I also can start and end tasks. BUT when I start a task1 of one running process instance I cannot start a task2 of the other running process instance. I have to end task1 (of the first processes instance) then I can start the task2 of the second process instance.
      For both process instances I'm using the same process definition.
      For starting the processes and the tasks I simply use a POJO:


      @Name("processManager")
      public class OrderingProcess{
           
           @CreateProcess(definition="MyProcess")
           public String startProcess(){
                return "processStarted";
           }
           
           @StartTask
           public String startTask(){
                return "/home.xhtml";
           }
      }


      I get this error:

      "java.lang.IllegalStateException: begin method invoked from a long-running conversation, try using @Begin(join=true) on method: startTask"


      Should I use any special annotations?


      ciao,
      Mike