2 Replies Latest reply on Oct 18, 2009 1:56 PM by Albert Schief

    Creating a process just after a @EndTask method

    Albert Schief Newbie


      I am trying to create a process in a method just after a @EndTask method has completed.

      It goes like this:

      a @StartTask method calls another method containing two method calls:

      • a @EndTask method,

      • a method that does a @CreateProcess.

      I read Gavin saying here that a task is atomic and that process variables won't be changed before
      the task is succesfully completed. Is there something that I am missing and should check. It seems like the code is not fully atomic.

      I am able to workaround the problem but I have to use JBPM methods, ie.

      1. using an task.end() at the end in the @EndTask method because the task does not complete entirely though I am not getting any (visible) errors.

      2. do something (ManagedJbpmContext, token,..) to have the new process really started.

      I have the impression that there might some bad consequences if I solve the problem like this... Given that the application is supposed to work as long as possible.

      Any advice/suggestion is very welcome!

      Thank you!