2 Replies Latest reply on Nov 4, 2005 6:56 AM by tom.baeyens

    How do you get all Sub Processes started by a given process?

    guy.walker

      I'm trying to find a way to make sure if I end a process, i can be sure that all sub process are closed down first. I notice that I can getSubProcessInstance on a token, but couldn't a given token have started more than one sub process?
      There doesn't appear to be a method to return all sub processes. Can a token only start one subprocess, in which case I guess i need to get all children from the root token and then get the sub processes from those.

      Have I answered my own question?

        • 1. Re: How do you get all Sub Processes started by a given proc
          kukeltje

          I think you have answered your own question. afaik, subprocesses are (currently) blocking. So get to the root token, get all child tokens and see if they have children left.

          You can also create your own hibernate query to achieve this, but then you have to learn hibernate and have the albeit small) risk that your app wont work anymore if the db changes

          • 2. Re: How do you get all Sub Processes started by a given proc
            tom.baeyens

            if subprocesses are non-blocking, they don't need to be synchronized with the parent process and hence a parent-child link is not really necessary for the process execution.

            you can have max 1 blocking subprocess that's why token has an optional reference to the subprocessinstance and not a collection of subprocessinstances.

            regards, tom.