3 Replies Latest reply on Oct 19, 2008 12:19 PM by kukeltje

    Fetching the current token

    oravecz

      If I obtain a process instance, it appears I can get a token by calling getRootToken(). I'm curious why this isn't just named getToken(). Is it possible to have more than one token active on a single process instance?

      In the same topic, what happens when I launch a subprocess? Will getRootToken() on my original (parent) process instance return to me the token from the sub process. If not, what is the best practice for obtaining the current token on a process instance?

        • 1. Re: Fetching the current token
          kukeltje

          good guess... there can be multiple tokens. e.g. when you use forks, so there is no 'current' token. A token is always in the context of something. e.g. a node ,task subprocess.

          • 2. Re: Fetching the current token
            oravecz

            So, in the case of a fork, what would getRootToken() return?

            Also, is getActiveChildren() the way to get a list of all active tokens on a process instance?

            • 3. Re: Fetching the current token
              kukeltje

               

              "oravecz" wrote:
              So, in the case of a fork, what would getRootToken() return?
              The root token... (of which there is only one)

              "oravecz" wrote:

              Also, is getActiveChildren() the way to get a list of all active tokens on a process instance?

              No, active child tokens of a token, so you have to call that recursively if you want all active tokens (and test on 'has active... before', that's more optimal