[Feature] Adding support for Kafka in the Workflow Event Listener #420
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request type
NOTE: Please remember to run
./gradlew spotlessApply
to fix any format violations.Changes in this PR
This PR adds the new Workflow Event Publisher
kafka
. It gives support to publish workflow events to Kafka. In addition to the existing events, Completed, Terminated and Finalized the following new events have been added:That addition of these new events does not change the behavior of the existing publishers, they are unchanged.
A new type
WorkflowSummaryExtended
was added that extends the WorkflowSummary, it maintains input and output properties as objects when publishing objects to Kafka.Moved rising of WorkflowFINALIZED
event fromcancelNonTerminalTasks
toendExecution
in theWorkflowExecutionOps.java
to make sure it is only raised once. Currently when using a Terminate Task in a workflow it is razed twice.To ensure that
FINALIZED
is raised to correct number of times, an overloadedcancelNonTerminalTasks
was introduced to control if this event should be raised or not, by default it is raised. This is because thecancelNonTerminalTasks
is called twice whenendExecution
is part of the flow. WhencancelNonTerminalTasks
is called fromendExecution
it should not raise the event again.Issue #