1 Reply Latest reply on Oct 17, 2008 2:31 PM by Aldo Bonzi

    sub-process definition is null

    Albert Scholtz Newbie

      I have an old problem or so it seems. I have the following process definition:



      <?xml version="1.0" encoding="UTF-8"?>
      
      <process-definition  xmlns=""  name="KYHProcess">
      
           <start-state name="start-state1">
                <transition to="viewAccount" name="toViewAccount"></transition>
           </start-state>
      
           <state name="viewAccount">
                <transition to="end-state1" name="toEndState1"></transition>
                <transition to="updateThreshold" name="toUpdateThreshold"></transition>
                <transition to="addCompanionProducts" name="toAddCompanionProducts"></transition>
                <transition to="viewBill" name="toViewBill"></transition>
                <transition to="resendVPin" name="toResendVPin"></transition>
           </state>
      
           <process-state name="updateThreshold">
                <sub-process name="updateThreshold"></sub-process>
                <transition to="viewAccount"></transition>
           </process-state>
      
           <process-state name="addCompanionProducts">
                <sub-process name=""></sub-process>
                <transition to="viewAccount"></transition>
           </process-state>
      
           <process-state name="viewBill">
                <sub-process name=""></sub-process>
                <transition to="viewAccount"></transition>
           </process-state>
      
           <process-state name="resendVPin">
                <sub-process name=""></sub-process>
                <transition to="viewAccount"></transition>
           </process-state>
      
           <end-state name="end-state1"></end-state>
      </process-definition>



      I have the updateThreshold process specified as followed:



      <?xml version="1.0" encoding="UTF-8"?>
      
      <process-definition  xmlns=""  name="updateThreshold">
      
      
           <start-state name="start-state1">
                <transition to="updateThreshold"></transition>
           </start-state>
      
           <task-node name="updateThreshold">
                <transition to="updateSuccessful"></transition>
           </task-node>
      
           <decision name="updateSuccessful">
                <transition to="success"></transition>
                <transition to="failed" name="to failed"></transition>
           </decision>
      
           <end-state name="failed"></end-state>
           <end-state name="success"></end-state>
      </process-definition>



      As i signal to enter the updateThreshold process-state, i get the following exception: org.jbpm.JbpmException: can't create a process instance when processDefinition is null.


      I deploy my processes using jbpm admin console, first updateThreshold and then KYHProcess. I also added 


      <bean name="jbpm.sub.process.resolver" class="org.jbpm.graph.node.DbSubProcessResolver" />




      to my jbpm.cfg.xml and still the same result. Using jBPM 3.2


      Regards
      Albert Scholtz

        • 1. Re: sub-process definition is null
          Aldo Bonzi Novice

          Found myself on the same problem.
          There's a useful talk about here


          Try adding the binding="late" in the following way



               <process-state name="updateThreshold">
                    <sub-process name="updateThreshold" binding="late"></sub-process>
                    <transition to="viewAccount"></transition>
               </process-state>