cancel
Showing results for 
Search instead for 
Did you mean: 

org.activiti.engine.ActivitiException: Unknown property used in expression:

ad1
Champ in-the-making
Champ in-the-making
I have a simple  java class annotated as @component that i am referring in service task using the following settings:

Task Type : Expression
Expression : ${org.activiti.timeData.sayHello()}

The Process fails with error org.activiti.engine.ActivitiException: Unknown property used in expression: ${timeData.sayHello()}

I had tried this before in other processes and it had worked. The error trace  thrown does not give any clues
4 REPLIES 4

ad1
Champ in-the-making
Champ in-the-making
No Sure whether this is a bug.

I tried initializing the process in spring boot without deploying the process definition into the db. It works fine.. no issues when the java operation gets called.

However, after deploying the process definition into the db, it keeps complaining "Unknown property used in expression:"

tried all the scenarios

#{timeData.sayHello()}
${timeData.sayHello()}
${<packagename>.timeData.sayHello()}
#{<packagename>.timeData.sayHello()}

timeData as java delegate class
timeData as Serialization class


No luck Smiley Sad

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Andat,

Is timeData registered ad spring been in the spring app context somewhere?
(Can you check it in expression resolver?)

Regards
Martin

ad1
Champ in-the-making
Champ in-the-making
Martin - Yes it is annotated @Bean in the Config class

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

Did you check whether expression resolver has access to this bean?
See following jUnit tests org.activiti.spring.test.servicetask.ServiceTaskSpringDelegationTest
Regards
Martin