2 Replies Latest reply on Jun 15, 2010 2:51 AM by shashwat123

    Setting superProcessToken results in to error :ERROR [STDERR] org.jbpm.JbpmException: couldn't signal without specifying  a leaving transition : transition is null

    shashwat123

      Hi,

       

      I have a problem while executing a sub-process. What I am trying to do is that when a sub-process executes i am setting its superprocess token and at the end of the execution I am setting the transition to end i.e if my Task is ti then I executes ti.end().

       

      As soon as the sub-process reaches its end transition, it throws the following error:

       

      ERROR [STDERR] org.jbpm.JbpmException: couldn't signal without specifying  a leaving transition : transition is null.

       

      If I do not set the superProcessToken in my code everything runs fine and i do not get any error on the console.  I am not getting that by only setting the superProcessToken why i am getting this error. I am using jBPM version 3.2.3.

       

      Please help.

        • 1. Re: Setting superProcessToken results in to error :ERROR [STDERR] org.jbpm.JbpmException: couldn't signal without specifying  a leaving transition : transition is null
          aguizar

          Shashwat, I don't quite get what the problem is. The process-state automatically creates the sub-process instance and sets the super-process token appropriately. The sub-process instance also signals the super-process token when it ends. You should not be doing this yourself.

          • 2. Re: Setting superProcessToken results in to error :ERROR [STDERR] org.jbpm.JbpmException: couldn't signal without specifying  a leaving transition : transition is null
            shashwat123

            Thanks Alejandro for your prompt reply. Yes you are correct that subprocess instance automatically sets the superprocess token. In my case if either I set the superprocess token or i use the 'createSubProcessInstance' to create the subprocess which automatically sets the super process token i get this error. Please have a look at the following code snippet, I am using in my work flow:

             

             

            public void execute(ExecutionContext executionContext) throws Exception {

             

                        processName = getProcessName();
                                          
                        ProcessDefinition processDefinition = ManagedJbpmContext.instance().getGraphSession().findLatestProcessDefinition(processName);

                        ProcessInstance pi = executionContext.getToken().createSubProcessInstance(processDefinition);

             

             

                           .......................

                           ..........................// some code to get data.

             

             

             

                              taskInstance.end();

            }

             

            If i do not call the "createSubProcessInstance" and use ManagedJbpmContext.instance().newProcessInstanceForUpdate(defName) to execute the subprocess every thing runs fine.