Thank you Mike,
Yes we can pass the variable while starting the process instance. But after that how does it work. Say my process xml consists of a linear sequence of java tasks. task 1 will have the variable you provided while instantiation. but how does task 2 will get hold of that, java tasks are independent tasks and will have no awareness of state engine right?