Autowired not working in JavaDelegate



can anybody guide me on following scenario.

I am trying to do some database operation in javadelegate class for my business logic. I am using spring4 with camunda bpm platform(7.7).

Following is piece of code trying to execute.

public class DatabaseLookupProcess implements JavaDelegate {

DatabaseLookupService dbLookupServ;

public void execute(DelegateExecution execution) throws Exception {


In above code i am getting DatabaseLookupService instance as null whereas this is working in non javadelegate class.
Please suggest how to resolve this issue?


Hi @milindk,
how do you link the class from your BPMN model? Are you using Delegate Expression, as described here: ?


I am using delegateclass option and providing qualified classname com.camunda.DatabaseLookupProcess.


This won’t work for version 7.7. But will work in 7.8. See

For now try to use Delegate Expression.


Hi Sdorokhova,

Thanks for guiding me. I have tried few option using Delegate Expression but it is not working.

Do you have any reference where some sample examples given on how to autowired using Delegate Expression. Please share me.



you just have to set the java delegate expression to “#{databaseLookupProcess}”.


Hi @milindk,
I’ve posted you the link to Getting Started. Have you checked it?

IMO it illustrates exactly the same as you want to achieve.


thanks OP for asking and thanks everyone else for responding. been having same issues (i’m also having health issues making me search for online pharmacy reviews and other things in this matter, but that’s another story) anyhow, i was having same issues as you and couldn’t resolve them all by myself. thanks for everything. i see that you people are more experienced than me, do you mind if i would have some questions? thanks!


You guys are terrific !!!
Thanks Jerome for quick help. My code is working now.