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)
- 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.
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?
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