Hi Team,
When I try to use Spring Event Bridge. When first User Task is getting created. Below is the result I got. Here I attached Java code & BPMN. Can anyone help me on this to understand how its happening ?
Result:
handle history event
handle mutable execution event
handle immutable execution event
handle history event
handle mutable execution event
handle immutable execution event
handle history event
handle mutable execution event
handle immutable execution event
handle mutable execution event
handle immutable execution event
handle history event
handle mutable execution event
handle immutable execution event
handle history event
handle history event
handle mutable task event
handle immutable task event
handle history event
Why these many times its getting called each method ?
Java Program:
@Component
public class SpringEventListener {
@EventListener
public void onTaskEvent(DelegateTask taskDelegate) {
// handle mutable task event
System.out.println(“handle mutable task event”);
}
@EventListener
public void onTaskEvent(TaskEvent taskEvent) {
// handle immutable task event
System.out.println("handle immutable task event");
}
@EventListener
public void onExecutionEvent(DelegateExecution executionDelegate) {
// handle mutable execution event
System.out.println("handle mutable execution event");
}
@EventListener
public void onExecutionEvent(ExecutionEvent executionEvent) {
// handle immutable execution event
System.out.println("handle immutable execution event");
}
@EventListener
public void onHistoryEvent(HistoryEvent historyEvent) {
// handle history event
System.out.println("handle history event");
}
}
spring-events.bpmn (2.9 KB)