cancel
Showing results for 
Search instead for 
Did you mean: 

issue with bean acces in service task

mdaviot
Champ in-the-making
Champ in-the-making
Hello,

I have been stuck all day with this issue… your help would be really welcome.

I have a simple process DemoErrorManagement with a service task implemented as an expression which refers to a bean : myService, speficied with the interface Service1.

In my unit test I inject the bean myService which is mocked by Mockito, it runs seamlessly.

From a main class (StartProcess) I use a slightly different activiti.cfg.xml file to inject the real bean : DemoService. But it is not found by Activiti :  org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'myService'
I checked by changing the activiti.cfg.xml file that it is really used.

I attach the full project (it is very small, only to reproduce the issue) : http://dl.dropbox.com/u/21035474/DemoErrorMgt.zip (no way to upload it here as attachment to the post ?)

Is it a bug in Activiti or what am I doing wrong ?

Thanks a lot
Michel
10 REPLIES 10

frederikherema1
Star Contributor
Star Contributor
Indeed, it's only required if you want to limit the visibility of the whole spring-context ion expressions….