I am using global listener to stream to my application all dispatched entities changes and in general events and there are several issues / gaps i dont understand, if someone can chime in here and explain some of this issues I will apreciate. Thanks!
-
ENTITY_CREATED is dispatched twice for sequenceFlow, only difference with the second one is second has endTime, seems to me this must be an ENTITY_UPDATE or ENTITY_DELETE ?
-
ENTITY_CREATED is dispatched twice for Event, here only difference i see is that deleteReason was added in a diferent position (so is detected by serializer). I assume this should not even exist as event or a property is missing and should also be an update.
-
In case of the task, has a ENTITY_CREATED for the activity of the task but no DELETED nor UPDATED after finished, but it has a HISTORIC_ACTIVITY_INSTANCE_ENDED. Where also the task itself has a separated ENTITY_CREATED and it has a ENTITY_DELETED. so seems a bug and inconsistency too.
-
ACTIVITY_STARTED vs HISTORIC_ACTIVITY_INSTANCE_CREATED
oddly activity started does not include for some reason entity id, which makes it some how useless vesrus historic version of it which includes the entity. why is this?
code for event listening
@Configuration(proxyBeanMethods = false)
@AutoConfigureAfter(BootstrapConfiguration.class)
public class CustomEngineConfiguration {
@Bean
public EngineConfigurationConfigurer<SpringProcessEngineConfiguration> customProcessEngineConfigurer(ApplicationContext context) {
return (configuration) -> {
SpringProcessEngineConfiguration cfg = context.getBean(SpringProcessEngineConfiguration.class);
// Registro del listener del proceso
PriBpmListener processListener = new PriBpmListener();
if ( cfg.getEventDispatcher() == null ) {
cfg.setEventDispatcher(new org.flowable.common.engine.impl.event.FlowableEventDispatcherImpl());
cfg.getEventDispatcher().addEventListener(processListener);
System.out.println("Event Dispatcher" + cfg.getEventDispatcher());
}
};
}
}
Process example
log file example for these events streams Flowable Event Log example · GitHub