Bproc Service Task Issue when Using Java Delegate Class

Hello,

I’m using Bproc service task and I’m unable to access any injected class/object when I use Java Delegate Class to handle the service task. I get a null pointer exception for any injected class/object. Any ideas on how I can resolve this issue?

Hi,
JavaDelegate service task is not a Spring component, so injection doesn’t work. To get the instance of Spring component use the AppBeans class. There is an example in the documentation. EmailService is obtained there this way:

EmailService emailService = AppBeans.get(EmailService.class);

Many Thanks Max,

This is working now.

regards,