what you seem to want is get a taskinstance by name or am I wrong? And then only the first one.
As I understand Token (as execution pointer) and TaskInstance (as newly created task in node when pointer has arrived) and found that they have relationship by the node name in which they are located at the moment. But why is the first one only? Any other suggestions? Any other relationships for addressing TaskInstance in conditions that I only know Token?
And, Ronald, I knew that only your posts will be the first in my topic :)
Here is my monologue :)
Really need some advices because I know that opportunities may lead to 'duplication' TaskInstance for the same Token in the same Node. What is the meaning for this case? And how can I identified TaskInstance by Token in this case?
the first one only because you have a 'return' in your java method in a for loop once a taskinstance is encountered in the taskinstances collection
Aaahhh... ok, there can't be more than one taskInstance with the same name in one token is what you think... ok... could be true.... not sure though.. just tested it and it is possible to have multiple tasks with the same name in the token, so my assumption that you return the first task in the token with a certain name is (by accident) correct ;-)