Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the parameter type from FlowableEngineEventType to FlowableEventType in RuntimeService . #3927

Open
LinZhaoguan opened this issue Jul 17, 2024 · 0 comments

Comments

@LinZhaoguan
Copy link

LinZhaoguan commented Jul 17, 2024

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.

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

Expected behavior

Change the parameter type from FlowableEngineEventType to FlowableEventType.

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

Code

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);
    }

Additional context

Flowable V6.8.0 With SpringBoot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant