Catch Signal Events in a Spring Boot app

Hi all.

I’m trying to catch signal events in a spring boot app with a embebed camunda engine.
For instance, if we want to catch the “Police Conditions Changed” signal in this process to execute some custom code:

It’s possible to configure some bean in the spring boot app to catch this signals?

Can you point me some directions?

Thanks for your help.

A Signal (and messages) is typically designed to signal other BPMN. If you want to trigger some code, have you looked at using a service task that points to your code? see: https://docs.camunda.org/get-started/spring/service-task/

1 Like

Hi @StephenOTT,

Thank you for your answer. That maybe a option for some of the processes but, in other, process’s execution don’t depend’s directly from that logic, we want to decouple the business logic from it.

Can you explain further what you are trying to do and why you want to do it with a signal

For instance, when process A ends, we want to (asynchrony) execute some business logic that checks some form data record in some of the tasks of process A and starts n instances of process B, using some of the data in variables.

Maybe using a model like this https://github.com/camunda/camunda-bpm-reactor. Based on that, I’m trying to use a custom ProcessEnginePlugin…

you can do this using Java Delegates. You just need to trigger your delegate in your End event as a execution Listener; Have the Delegate trigger your async code.