3 Replies Latest reply on May 2, 2007 9:43 AM by kukeltje

    Finding out the last end state of a process

    preetisinghania

      Hi,

      I have a process that has 2 end states possible ie. endstate1 and endstate2. For a completed process how do i find out whether the process ended using endstate1 or endstate2.

      We are using jbpm version 3.1.4.

      Regards
      Preeti.

        • 1. Re: Finding out the last end state of a process

          I'm no expert, but I'd be looking at using a process variable that is set in an action-script in either:
          - the node-enter event of the end state(s)
          or
          - the transitions leading to the end states.

          I haven't done this before, though... hopefully someone with more experience will jump in if I'm off-base. Also, I never used 3.1.4, so I don't know what's "missing" from it relative to 3.2.

          -Ed Staub

          • 2. Re: Finding out the last end state of a process
            kukeltje

            Isn't the root token still IN the end node? If so, you can use something like token.getNode().getName().

            Besides that... I've never seen two end nodes... Do you have a special reason for this?

            • 3. Re: Finding out the last end state of a process
              kukeltje

              Now I come to think of it.... you have two end nodes and it is important to know which it ended in... I would use a specific processvariable for this, like Ed mentioned, but just use that and have one end node.

              Still, I'm curious why you need two end nodes. The only time I saw someone do this, was because he was just used to do it that way in powerpoint