5 Replies Latest reply on Jun 10, 2009 2:00 PM by jbossphan

    JBPM: Sub Process

      Hi, i do not understand how to define sub processes.
      in JBPM

      My eample here is very simple.


      First is here my subprocess

      <process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="subProcess">

      <start-state name="start-state1">

      </start-state>



      <end-state name="end-state1"></end-state>
      </process-definition>



      and here the main process which should be invoked the subProcess

      <process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="mainProcess">

      <start-state name="start-state1">

      </start-state>
      <process-state name="process-state1">
      <sub-process name="subProcess"/>

      </process-state>
      <end-state name="end-state1"></end-state>

      </process-definition>


      I can do what i want, i always get the following exception (if the processInstance signals the current token, i.e. the start state).
      I test these process in the jsf console.

      Both processes are deployed!!!!


      org.jbpm.JbpmException: can't create a process instance when processDefinition is null

      it is very hard to find something about sub processes ,only some lines in the doku.
      But these are exactly the lines, i used for these test case.

      Can someone help me?



        • 1. Re: JBPM: Sub Process
          kukeltje

          Please use some form of search functionality before posting like google or the sear of this forum

          Hint: probably has something to do with the deployment order

          • 2. Re: JBPM: Sub Process

            Sorry, i try to search in google, but there is nothing to find about sub processes in JBPM in the world wide web.

            If i set the attribute binding to late, it works.

            <sub-process name="subProcess" binding="late"/>

            But it works not, if these attribute binding is not set.

            I have installed a new jboss 4.2.1, a new JBPM 3.2.6 SP1

            i deploy first the sub process and then the main process.
            I have no errors during deployment.

            Try it out und look ..

            I think this is really a bug ...

            • 3. Re: JBPM: Sub Process
              kukeltje

              Nothing in google?

              http://www.google.nl/search?q=jbpm+subprocess+deployment+null

              The *first* hit mentiones all!!! even the binding=late

              I would be very surprised if it is a (re-introduced) bug since there are lots of testcases for this and many users using 3.2.6SP1 and nobody seems to have this problem. Are you sure if you deploy the subprocess the transaction is committed before the main process is deployed?

              • 4. Re: JBPM: Sub Process

                I am also very surprised. i am waiting many minutes between the two deployments. I am doing the deployment with the tab 'Deployment' of the GPD in Eclipse.
                I get the message, that deployment was successful.


                Then i create in the jsf administration console a new process instance of the main process, go to Tokens and signal the token ...


                without binding = late i get the error.

                i delete my jboss, i delete my jbpm, make a new installation of all but the error ist still there ...


                I have no idea ....






                • 5. Re: JBPM: Sub Process
                  jbossphan

                  If you don't specify late binding, the processname will be converted into a process id when the workflow is uploaded. You can see this in the jbpm_node table. For a sub-process, either the subprocname_ or subprocessdefinition_ column will be populated.

                  In my mind, I would think late binding should be the default. It is easy to run into issues where you update both the process that includes the sub-process and the actual sub-process. If you update the process that includes the sub-process first, it will store the process-id of the old sub-process which will no longer be the current definition when the sub-process gets updated.