The addEventListenermethod of the RuntimeServiceinterface, which receives an event type parameter, accepts an implementation class FlowableEngineEventTyperather than interface FlowableEventType.
Custom event type enumeration class: RdmFlowableEventType.
@Getter
@AllArgsConstructor
public enum RdmFlowableEventType implements FlowableEventType {
STEP_TASK_ENTERED;
}
Config Custom Listener With SpringBoot.
@Configuration
@RequiredArgsConstructor
public class FlowableListenerConfig {
private final RuntimeService runtimeService;
private final CustomListener listener;
@PostConstruct
public void init() {
// This line results in a compilation error.
runtimeService.addEventListener(listener, RdmFlowableEventType.STEP_TASK_ENTERED);
}
Describe the bug
The
addEventListener
method of theRuntimeService
interface, which receives an event type parameter, accepts an implementation classFlowableEngineEventType
rather than interfaceFlowableEventType
.Expected behavior
Change the parameter type from
FlowableEngineEventType
toFlowableEventType
.Code
Custom event type enumeration class:
RdmFlowableEventType
.Config Custom Listener With SpringBoot.
Additional context
Flowable V6.8.0 With SpringBoot.