Accessing Spring Boot Bean from an ExecutionListener

Hi there!

I am using a ParseListener plugin to register an ExecutionListener on a Service task (in a spring boot app).I manually inject a spring bean (responsible for sending emails) into the listener when the bmpn model is parsed. All seems good.

However when I trigger the service task (which calls the listener) the listener instance no longer has the Spring bean.

Can someone advise how I can inject (@Autowire) a bean into an ExecutionListener?


Hi @brian

did you register the listener as Expression or Delegate Expression?

The engine could not resolve beans, when it calls the Java classes directly.

Hope this helps, Ingo

Thanks @Ingo_Richtsmeier. I will have to take the DelegateExpression approach.