AnsweredAssumed Answered

issue with bean acces in service task

Question asked by mdaviot on Oct 10, 2012
Latest reply on Oct 12, 2012 by frederikheremans1
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

Outcomes