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
Hello!

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 https://github.com/Activiti/activiti-unit-test-template.git

Config :

No error case :

-<conditionExpression xsi:type="tFormalExpression">

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

</conditionExpression>

Error case :

-<conditionExpression xsi:type="tFormalExpression">

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

</conditionExpression>

Please suggest the solution

Outcomes