AnsweredAssumed Answered

Error in evaluating expressions when run as unit test

Question asked by vickyc1 on Sep 9, 2016
Latest reply on Sep 19, 2016 by vickyc1

I am facing strange issue, wherein when I have the flow condition configured as simple expression, then the unit testing works. However, when I configure flow condition as Simple or Advanced condition using flow variables, then it gives error as

org.activiti.engine.ActivitiException: Unknown property used in expression: ${(!(activiti_flowConditionsBean.isEmpty(execution, 'ProductId')) )and(activiti_flowConditionsBean.exists(execution, 'ProductId') && ProductId == 'ABC')}

Caused by: org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'activiti_flowConditionsBean'

Unit tests are taken from

Config :

No error case :

-<conditionExpression xsi:type="tFormalExpression">

<![CDATA[${FieldValidationStatus == 'SUCCESS'}]]>


Error case :

-<conditionExpression xsi:type="tFormalExpression">

<![CDATA[${(!(activiti_flowConditionsBean.isEmpty(execution, 'ProductId')) )and(activiti_flowConditionsBean.exists(execution, 'ProductId') && ProductId == 'ABC')}]]>


Please suggest the solution