Hi,
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.
Thanks!
Tim
Hi,
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.
Thanks!
Tim
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:
http://www.flowable.org/docs/userguide/index.html#eventDispatcherListener
public void onEvent(FlowableEvent event) {
switch (event.getType()) {
case JOB_EXECUTION_SUCCESS:
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()); }