feat: Implement correlation on event filter#1386
Conversation
a138648 to
ba7cffc
Compare
fjtirado
left a comment
There was a problem hiding this comment.
You need to separate the DSL gap PR you were working on from the Correlation one.
d8d98e5 to
77143c1
Compare
77143c1 to
17ca1de
Compare
|
@fjtirado I will send the other file separately after you review this one. |
2d9953c to
8385343
Compare
There was a problem hiding this comment.
@matheusandre1 Please remove changes in WorkflowMutalbeInstance, we are almost there!!!
8385343 to
3a7f751
Compare
There was a problem hiding this comment.
Are the changes of version in these three poms intentional?
There was a problem hiding this comment.
Yes, It was a poorly done rebase on my part; I didn't perform a git push force, and then I had to cherry-pick your changes (I had never done that before).
There was a problem hiding this comment.
But the version is already <version.org.junit.jupiter>6.1.0</version.org.junit.jupiter> in main, can not you avoid this files appearing in the review?
|
@matheusandre1 You need to remove the three commits that bump the versions |
3a7f751 to
299e0d9
Compare
299e0d9 to
d49e171
Compare
d49e171 to
8c39ac3
Compare
|
This copilot is driving me crazy. |
8c39ac3 to
f4dcbdb
Compare
| if (builder.type() == null) { | ||
| registerToAll(ce); | ||
| return new TypeEventRegistration(null, ce, null, workflow, task); | ||
| return new TypeEventRegistration(null, ce, ALWAYS_TRUE, workflow, task); |
There was a problem hiding this comment.
I know the AI was complaining, but this was not really needed, since the predicate was not used for all registration scenario and it was null on purpose.
We can keep your change since there is not a big difference between an unused null and unused anonymous inner class reference, but for future PRS please read my explanations when I resolve a not applicable AI comment.
|
@matheusandre1 Lest change the name of new method in WorkflowInstance to removeMetadata |
f4dcbdb to
2fddd7b
Compare
| String stateKey(TaskContext task) { | ||
| return expectResolver == null ? correlationStateKey(task) : null; | ||
| } |
There was a problem hiding this comment.
Consider statekey to return optional and ignore the rest of the comment
| List<?> output = (List<?>) outputValue; | ||
| assertThat(output).hasSize(1); | ||
| assertThat(output.get(0)).isInstanceOf(Map.class); | ||
| Map<String, Object> eventData = (Map<String, Object>) output.get(0); |
There was a problem hiding this comment.
Ok, lets add the unchecked so this guy shut up
| .build(); | ||
| } | ||
|
|
||
| private static Workflow listenCorrelateNoExpectWorkflow() { |
There was a problem hiding this comment.
This makes sense, but you can ignore since it is test code after all
| } | ||
| }); | ||
| } | ||
| cleanupCorrelationState(registration); |
There was a problem hiding this comment.
Thats a valid concern, Im not really sure we should remove any correlation data associated to the instance.
- Add CorrelationPredicate for evaluating correlation expressions - Add correlate support in AbstractEventFilterBuilder and AbstractEventFilterSpec - Update TypeEventRegistration and TypeEventRegistrationBuilder with correlation predicates - Implement correlation matching in AbstractTypeConsumer - Add CorrelationTest and listen-correlate.yaml - Add correlate tests in WorkflowBuilderTest and DSLTest Signed-off-by: Matheus André <matheusandr2@gmail.com>
Signed-off-by: Matheus André <matheusandr2@gmail.com>
2fddd7b to
f3a803a
Compare
|
@matheusandre1 See my comments about remove and my comments over AI comments ;) |
Many thanks for submitting your Pull Request ❤️!
What this PR does / why we need it: Closes: #1206
Special notes for reviewers:
Additional information (if needed):