Hi, I am trying to call global tasklistener in spring boot starter project where we are using @EnableProcessApplication.below is the code .
@SpringBootApplication @ProcessApplication @ApplicationPath("/")
public class CamundaStarterApplication extends SpringBootProcessApplication{
public static void main(String[] args) {
SpringApplication.run(CamundaStarterApplication.class, args);
}
@Override
public TaskListener getTaskListener() {
return new TaskListener() {
public void notify(DelegateTask delegateTask) {
System.out.println("test start...");
};
}
I am starting the spring boot project and starting the process which is creating new task as well but
it expected to print test Start…once task is created but this is not printing on the console.
please help me on this.
No config needed on BPMN side.
If I hook up your event listener in the simple example, all works fine.
So I suggest something in your setup is not working.
Which version of the starter are you using?
Can you see something like the following in your log when you start your application?
INFO 2576 --- [ restartedMain] o.c.b.s.b.s.event.EventPublisherPlugin : EVENTING-001: Initialized Camunda Spring Boot Eventing Engine Plugin.
INFO 2576 --- [ restartedMain] o.c.b.s.b.s.event.EventPublisherPlugin : EVENTING-003: Task events will be published as Spring Events.
INFO 2576 --- [ restartedMain] o.c.b.s.b.s.event.EventPublisherPlugin : EVENTING-005: Execution events will be published as Spring Events.
INFO 2576 --- [ restartedMain] o.c.b.s.b.s.event.EventPublisherPlugin : EVENTING-007: History events will be published as Spring events.
If not, then the event publisher plugin is not enabled.
Please make sure that you haven’t set the following properties to false in your application.yaml