there is no current taskinstance in a decisionnode. The taskinstance does not call the decisionhandler, it takes a transition and does not know where this transitions to. Saving and closing a taskinstance saves the variable to the processlevel where it is accessible to the decisionhandler.
ohh... ok. this definitely clears up things. thanks!
I understand that the executioncontext is sent to all action/decision handlers,but then, shouldn't this be mentioned somewhere that decision handler will not get a current task instance from executioncontext,
executionContext.getTaskInstance() is kind of misleading.
(Although now, after your explanation, it looks so obvious :) , but I am sure there will be others like me..)
then they now have this forum post to find out ;-)