template-application-events-java: stamp notify outcome on load/render failures too (#7290) - #7313
Open
nedelcho-delchev-tues wants to merge 1 commit into
Conversation
… failures too (eclipse-dirigible#7290) Notification.java.template only wrapped Mail.send in the try that stamps `outcome:`. The relation loads and the attach:print/report render ran before it, so a load failure (a connection blip, a repository refusal) or a broken .print template propagated straight out of onMessage with no stamp: the broker redelivers forever, the record's outcome field stays empty - the silent state eclipse-dirigible#7023 introduced the stamp to remove - and `event: { onNotifyFailed: ... }` never fires. Widen the try to open right after the guard check, covering the relation loads, the attachment render and the send, mirroring the notify branch of Job.java.template (eclipse-dirigible#7278) and Transition.java.template, which already open their try before the loads. Verified: mvn formatter:validate (repo-wide, BUILD SUCCESS); added a test to IntentEngineIT asserting the generated Notification's try opens before the relation load and the attachment render, and both outcome stamps still land inside it - ran green. Fixes eclipse-dirigible#7290 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Notification.java.templateonly wrappedMail.sendin the try that stampsoutcome:. The relation loads and theattach: print/reportrender ran before it, so a load failure (a connection blip, a repository refusal) or a broken.printtemplate propagated straight out ofonMessagewith no stamp: the broker redelivers forever, the record's outcome field stays empty - the silent state#7023introduced the stamp to remove - andevent: { onNotifyFailed: ... }never fires.Job.java.template(#7278) andTransition.java.template, which already open their try before the loads.Note for the maintainers
While tracing this I checked the other two templates carrying the same
stampNotifyOutcomemachinery.Transition.java.templateis correct, as the issue states.Send.java.template, however, appears to have the same gap in both its fan-out and non-fan-out branches - its shared per-record body still only wrapsMail.send, not the relation loads or the attachment render, in either branch. I left it untouched since the issue names onlyNotification.java.templateand I didn't want to expand scope unilaterally on something the issue text asserts is already fixed - flagging it here in case a follow-up issue is warranted.Test plan
mvn formatter:validate(repo-wide) -BUILD SUCCESSIntentEngineIT(an_event_notification_keeps_its_relation_loads_and_attachment_render_inside_the_fail_soft_try) asserting the generatedNotification's try opens before the relation load and the attachment render, and both outcome stamps (sent/failed: <reason>) still land inside itmvn -pl tests/tests-integrations -am -P integration-tests -Dit.test="IntentEngineIT#an_event_notification_keeps_its_relation_loads_and_attachment_render_inside_the_fail_soft_try" -D selenide.headless=true install- greenFixes #7290
🤖 Generated with Claude Code