flowable / flowable/flowable-engine

Change the parameter type from FlowableEngineEventType to FlowableEventType in RuntimeService .

Open
#3,927 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
7h 8m
Merged PRs (30d)
2

Description

**Describe the bug**

The `addEventListener `method of the `RuntimeService `interface, which receives an event type parameter, accepts an implementation class `FlowableEngineEventType `rather than interface `FlowableEventType`.

``` java
void addEventListener(FlowableEventListener listenerToAdd, FlowableEngineEventType... types);
```

**Expected behavior**

Change the parameter type from `FlowableEngineEventType` to `FlowableEventType`.

``` java
void addEventListener(FlowableEventListener listenerToAdd, FlowableEventType... types);
```

**Code**

Custom event type enumeration class: `RdmFlowableEventType`.

``` java
@Getter
@AllArgsConstructor
public enum RdmFlowableEventType implements FlowableEventType {

STEP_TASK_ENTERED;

}
```

Config Custom Listener With SpringBoot.

``` java
@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);
}

```
**Additional context**

Flowable V6.8.0 With SpringBoot.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.