Setting a condition inside of an execution listener set.Variable for variable that may not exist

cancel
Showing results for 
Search instead for 
Did you mean: 
TomV
Member II

Setting a condition inside of an execution listener set.Variable for variable that may not exist

The variable QaReviews may or may not exist. 

An execution listener created with a conditional inside.

{execution.setVariable('QaReviews',QaReviews == null ? null : QaReviews + 1 )}

This condition fails when ran (where QaReviews doesnt exist) with following error: HTTP Status 500 - Request processing failed; nested exception is org.activiti.engine.ActivitiException: Unknown property used in expression: ${execution.setVariable('QaReviews',QaReviews == null ? null : QaReviews + 1 )}

The condition should evalute to true if QaReviews == null.  Not sure why fails.