Add defaultEventSource to WorkflowApplication#1556
Conversation
|
@matheusandre1 you must sign your commits with |
Sorry, I always forget about that. |
fjtirado
left a comment
There was a problem hiding this comment.
@matheusandre1
Lets make default event source a WorkflowValueResolver, so it returns an URI from the WorkflowContext, TaskContext and Model
Signed-off-by: Matheus André <matheusandr2@gmail.com>
| } | ||
|
|
||
| public Builder withDefaultEventSource(String defaultEventSource) { | ||
| return withDefaultEventSource(URI.create(defaultEventSource)); |
There was a problem hiding this comment.
If the string is not a valir URI, application initialization will fail. Im not sure we should have this method to be hones
There was a problem hiding this comment.
Yeah, it must fail fast.
There was a problem hiding this comment.
If the string is not a valir URI, application initialization will fail. Im not sure we should have this method to be hones
I'm a little confused here, should I remove it or keep it?
| List<CloudEvent> events = Collections.synchronizedList(new ArrayList<>()); | ||
| InMemoryEvents broker = new InMemoryEvents(); | ||
| broker.register(eventType, events::add); |
There was a problem hiding this comment.
There is a lot of duplicated code in these test, lets avoid copy paste and use "@beforeeach" annotation
Many thanks for submitting your Pull Request ❤️!
What this PR does / why we need it: Closes: #1554
Special notes for reviewers:
Additional information (if needed):