4 Replies Latest reply on Jun 16, 2010 5:53 AM by Mehul Verma

    creating a sub process instance throw error:  org.jbpm.JbpmException: couldn't signal without specifying  a leaving transition : transition is null

    Mehul Verma Newbie

      Hi,

       

      I am getting an error in executing a sub process.Main process finishes its execution and it calls the first sub-process, when sub process reaches it's end it throws the error: org.jbpm.JbpmException: couldn't signal without specifying  a leaving transition : transition is null.

       

      Further sub processes are called but same happens at the end of the other sub processes also. I think setting the super process token in the createSubProcessInstance causing this issue. Even if i do not call createSubProcessInstance and  I create sub process instance using newProcessInstance(processName) and then if i set the super processtoken explicitly in my code i get this error, if i do not set the super process token in my code i do not get this error.

       

      Please provide views, i am getting this error again and again.

       

      Thanks,

      Mehul

        • 1. Re: creating a sub process instance throw error:  org.jbpm.JbpmException: couldn't signal without specifying  a leaving transition : transition is null
          Maciej Swiderski Master

          Please provide a minimal test case for your scenario, without it it is difficult to find a way to help you.

           

          BTW, please use parent forum for these types of questions.

          • 2. Re: creating a sub process instance throw error:  org.jbpm.JbpmException: couldn't signal without specifying  a leaving transition : transition is null
            Mehul Verma Newbie

            I have three process say P1,P2,P3. P1 is my main process which in turn calls P2 and P2 calls P3. In my case P1 executes fine and calls P2. When P2 reaches its End node i get this error. Folliwing are the process def. files for the processes.

             

             

            <?xml version="1.0" encoding="ISO-8859-1"  ?>
            - <process-definition name="P-1">
            - <swimlane name="TestSwimlane">
              <assignment pooled-actors="TestSwimlane" />
              </swimlane>
            - <start-state name="s1">
              <task name="s1"  swimlane="TestSwimlane" />
              <transition to="t1" name="to t1" />
              </start-state>
            - <task-node name="t1">
            - <task name="t1"  swimlane="TestSwimlane">
              <controller allowAttachments="false" />
              </task>
            - <transition to="e1" name="to e1">
            - <action class="com.mypack.process.action.CallProcess" config-type="bean">
              <processName>A-2</processName>
              </action>
              </transition>
              </task-node>
              <end-state name="e1" />
              </process-definition>
            Second Process:
            <?xml version="1.0" encoding="ISO-8859-1"  ?>
            - <process-definition name="P-2">
            - <swimlane name="TestSwimlane">
              <assignment pooled-actors="TestSwimlane" />
              </swimlane>
            - <start-state name="s2">
              <task name="s2"  swimlane="TestSwimlane" />
              <transition to="t2" name="to t2" />
              </start-state>
            - <task-node name="t2">
            - <task name="t2"  swimlane="TestSwimlane">
              <controller allowAttachments="false" />
              </task>
            - <transition to="e2" name="to e2">
            - <action class="com.mypack.process.action.CallProcess" config-type="bean">
              <processName>A-3</processName>
              </action>
              </transition>
              </task-node>
              <end-state name="e2" />
              </process-definition>
            Third Process:
            <?xml version="1.0" encoding="ISO-8859-1"  ?>
            - <process-definition name="P-3">
            - <swimlane name="TestSwimlane">
              <assignment pooled-actors="TestSwimlane" />
              </swimlane>
            - <start-state name="s3">
              <task name="s3"  swimlane="TestSwimlane" />
              <transition to="t3" name="to t3" />
              </start-state>
            - <task-node name="t3">
            - <task name="t3"  swimlane="TestSwimlane">
              <controller allowAttachments="false" />
              </task>
              <transition to="e3" name="to e3" />
              </task-node>
              <end-state name="e3" />
              </process-definition>
            Code :
            public void execute(ExecutionContext executionContext) throws Exception {

             

                    // debug("entering call process action handler");
                    String name = null;

             

                    try {

             

                        name = getProcessName();           

             

                        ProcessInstance processInst = ProcessUtil.newProcessInstance(name);
                        Task task = Util.getStartTask(processInst.getProcessDefinition());

             

                        Token superProcessTOken = executionContext.getToken();
                        processInst.setSuperProcessToken(superProcessTOken); // If i comment this line i don't get this error.

             

                       ........code to extract caller data......

                        TaskInstance ti = Util.initProcess(processInst, task, values,
                                false);

             

                        if (ti != null) {
                            // setup the swimlane instance
                            Swimlane swm = ti.getTask().getSwimlane();
                            if (s != null) {
                                String assignment = swm.getPooledActorsExpression();
                                if (!Strings.isEmpty(assignment)) {
                                    ti.getSwimlaneInstance().setPooledActors(
                                            assignment.split(","));
                                }

             

                                ti.end();
                            }
                        }
            I hope now you can understand.
            • 3. Re: creating a sub process instance throw error:  org.jbpm.JbpmException: couldn't signal without specifying  a leaving transition : transition is null
              Maciej Swiderski Master

              Seems like you use jBPM 3, unfortunately I am not expert in version 3.x so you need to wait for other guys that are good at it