Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@

public interface EventPublisher extends AutoCloseable {
CompletableFuture<Void> publish(CloudEvent event);

/*If published decide to ignore life cycle events, override this method and leave it empty*/
default void publishLifeCycle(CloudEvent event) {
publish(event);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ protected <T extends WorkflowEvent> void publish(T ev, Function<T, CloudEvent> c
* using application event publishers. That might be changed if needed by children by overriding this method
*/
protected void publish(WorkflowApplication application, CloudEvent ce) {
application.eventPublishers().forEach(p -> p.publish(ce));
application.eventPublishers().forEach(p -> p.publishLifeCycle(ce));
}

private static <T> CloudEventData cloudEventData(T data, ToBytes<T> toBytes) {
Expand Down