spec: one document, many recipients - attach: recordPrint and the fan-out scoping rule - #20
Open
delchev wants to merge 1 commit into
Open
spec: one document, many recipients - attach: recordPrint and the fan-out scoping rule#20delchev wants to merge 1 commit into
delchev wants to merge 1 commit into
Conversation
`forEach` + `attach: print` attaches each row's own document. The mirror shape - one document to many recipients, where the rows ARE the recipients and the attachment belongs to the record they hang off - had no syntax. `attach: recordPrint` renders the fan-out's anchor record, once, for everybody; the anchor is what must be a document, and its language knobs select the single render's language. The accompanying scoping rule settles what the gap entry left open: inside a fan-out a bare path resolves against the ROW and the reserved `record.` prefix addresses the anchor (one field of it), the recipient may never be record-scoped, and `record.` outside a fan-out is rejected. A `forEach` on a schedules[].notify or a notifications[] entry is rejected rather than ignored - both already say what they are about, so an accepted declaration there would silently send a different message.
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.
Closes the "Planned" entry that named this gap.
forEach+attach: printattaches each row's own document, which is what a per-row document (a payslip) needs. The mirror shape had no syntax: one document sent to many recipients, where the rows ARE the recipients and the attachment belongs to the record they hang off - a request for quotation mailed to each invited supplier, an agenda mailed to each participant.attach: recordPrintrenders the fan-out's anchor record: fan-out-only (outside one,attach: printalready renders that record), the anchor is what must satisfy the document requirement,language/languageFromselect ITS render language, and a conforming generator MUST render the document once per fan-out rather than once per recipient.The section also settles the point the gap entry left open - an explicit scoping rule when both records are addressable: a bare path resolves against the ROW, the reserved prefix
record.addresses the anchor (one field of it), the recipient may never be record-scoped, andrecord.outside a fan-out is rejected. Implicit mixing is how a message quotes the wrong party, and nothing in the rendered text would show it.Also normative: a
forEachon aschedules[].notifyor anotifications[]entry MUST be rejected - the first already runs once per matched row, the second is about the event record, so an accepted declaration there changes nothing and sends a different message than the one written down.Appendix A gains the
attach: recordPrintrow.Proven out by the reference implementation: eclipse-dirigible/dirigible#6740.