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

[QUESTION]: How to register listener using WorkflowStatusListener interface of OSS/Netflix Conductor #9

Open
PaulPheonix06 opened this issue Nov 1, 2024 · 0 comments
Labels
question Further information is requested

Comments

@PaulPheonix06
Copy link

Custom listener registration for Netflix Conductor to trigger upon workflow completion but not functioning as expected.

How can I register a custom listener in my code that should trigger when Netflix Conductor finishes executing a workflow? It seems that the listener is not being invoked upon workflow completion, even though I have set workflowStatusListenerEnabled to true. Am i missing anything?

Below is the code for my Custom Listener :

import com.netflix.conductor.common.run.Workflow;
import com.netflix.conductor.common.run.Workflow.WorkflowStatus;
import com.netflix.conductor.core.listener.WorkflowStatusListener;
import com.netflix.conductor.model.WorkflowModel;

import org.springframework.stereotype.Component;

@Component
public class MyWorkflowStatusListener implements WorkflowStatusListener {

    @Override
    public void onWorkflowCompleted(WorkflowModel workflow) {
        System.out.println("Completed" + workflow);
    }

    @Override
    public void onWorkflowTerminated(WorkflowModel workflow) {
        System.out.println("Terminated" + workflow);
    }

    @Override
    public void onWorkflowFinalized(WorkflowModel workflow) {
        System.out.println("finalized" + workflow);
    }
}
@PaulPheonix06 PaulPheonix06 added the question Further information is requested label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant