FlowableEventType no longer an Enumeration in v6


Just wondering if changing this from an Enumeration to an Interface is intentional and if so why? Being able to switch(event.getType()) seemed both natural and useful to me.


I believe that FlowableEventType has always been an interface (at least back to 2013 in the git history).

Do you mean org.flowable.engine.delegate.event.FlowableEngineEventType instead? That is an enum.

Have not looked at what has changed, but I believe the reference is that the example provided for an Event Listener no longer works:


public void onEvent(FlowableEvent event) {
switch (event.getType()) {


I believe the example is wrong; the body of the onEvent() method should be something like:

      if (event.getType() == FlowableEngineEventType.JOB_EXECUTION_SUCCESS) {
          System.out.println("A job well done!");
      else if (event.getType() == FlowableEngineEventType.JOB_EXECUTION_FAILURE) {
          System.out.println("A job has failed...");
      else {
          System.out.println("Event received: " + event.getType());