I am defining a simple variable in Input parameters of User task, which I want to use in XOR gateway at later point, but while evaluating condition, it throws this error:
Unknown property used in expression: ${Date == “1”}. Cause: Cannot resolve identifier ‘Date’.
Can someone help why this is occuring?
Hi @Abhijeet_Kotkar,
The variable is created on Task’s scope so it is not accessible from outer scope (Process Instance’s scope)
The name attribute of an inputParameter denotes the variable name inside the activity (a local variable to be created), whereas the name attribute of an outputParameter denotes the variable name outside of the activity
You can use outputParameter to create a variable on the outer scope.
1 Like
Thank you very much @hassang. It helped me
On top of that I’d recommend using ${execution.hasVariable(‘Date’) && Date == ‘1’} instead for safety.
Otherwise if for any reason Date is not present in the scope you’ll get an exception