2 Replies Latest reply on Feb 1, 2006 7:54 PM by aguizar

    graph of super- and sub-processes is not complete?

    camunda

      Hi all!

      I have a problem with jbpm 3.0.2 and subprocesses (related to Bug http://jira.jboss.com/jira/browse/JBPM-477):

      We have some sub-processes calling sub-processes semself. Now we want to traverse the full graph of processes so save each of them manually.

      The first try was: Get to the absolute root process and then recursivly go to each sub-processes (search all tokens and step into sub-processes). We only use the object oriented way (no hibernate queries).

      But the graph seems not to be complete. We have super-processes where the rootToken hast subProcessInstance = null (but there should be a reference). But this is not in every situation...

      Does anybody knows what is the problem here? I think, it is a problem with the Hibernate mappings, but because we use JDO for a long time, I don't know Hibernate so good...

      Any hints?

      Thanks in advance
      Bernd

        • 1. Re: graph of super- and sub-processes is not complete?
          camunda

          Has nobody have an idea?

          Is this solved with jbpm 3.1?

          Thanks
          Bernd

          • 2. Re: graph of super- and sub-processes is not complete?
            aguizar

            Bernd,

            As you might already know, only tokens positioned at process states contain a non-null subProcessInstance value. The reference will be gone when the token moves to another node. Furthermore, if the process state occurs in a forked line of execution, a child token will contain the subProcessInstance reference, rather than the root token.

            I looked at the solution you proposed in JBPM-477. Testing for a subProcessInstance in the root token is not enough. You have to traverse all descendant nodes recursively, via Token.getChildren() or Token.getActiveChildren().