Thanks Maciej , it works. I was adding process variable from the code. In the bpmn i am using variable result which obviously at the bpmn parse time it would not know. I declared the variable in the variable definition of the process and it worked.
Regards
Prashanth