each node has a set of arriving transition, and
each transition has a original node.
u can get a arriving transition and get the arriving node.
Set arrivingtransitions = node.getArrivingTransitions();
// i dont know who to use Set ;
// u can get a transition from the transition set;
// i use atransition;
Node node = atransion.getFrom();
// but if u have more than one transition u have to judge which transition if the real arriving transition.
// if u process if complex, u can save the token's path in Context variable;
i hope it can help u.
i ended up saving the node name in each node in a process variable, not very pretty, would have been nicer if I could find out how the path in hte workflow was.