Motivation
A business application built the intent way can render any document as a PDF (print templates + XSL-FO) and can already send plain-text mail from a schedule (schedules.notify). What it cannot do is the single most common outbound action a business document needs: send the document itself by e-mail - an invoice to its customer, a payslip to its employee, an escalating payment reminder.
Proposal (discussion-first)
A declarative "send document by e-mail" glue action, reusable from the three places an intent can act:
- A process step: a
sendDocument serviceTask arg (template: subject/body, to: a field or relation.field of the record, attaching the entity's rendered .print PDF).
- A transition (
transitions:): optional notify: block with the same shape - "on Void, mail the counterparty".
- A schedule (
schedules.notify): gains attach: print and template interpolation from the row's fields, so periodic notices can carry the document and reference its number/amount/due date.
Per-tenant SMTP already exists via the mail facade; the ask is the glue + a small template story (interpolate {field} from the record). Fail-soft on missing recipient (log + skip, as notify does today).
Why upstream
Every document-centric application needs this; module-local workarounds mean hand-written listeners around the print engine in every project.
Motivation
A business application built the intent way can render any document as a PDF (print templates + XSL-FO) and can already send plain-text mail from a schedule (
schedules.notify). What it cannot do is the single most common outbound action a business document needs: send the document itself by e-mail - an invoice to its customer, a payslip to its employee, an escalating payment reminder.Proposal (discussion-first)
A declarative "send document by e-mail" glue action, reusable from the three places an intent can act:
sendDocumentserviceTask arg (template:subject/body,to:a field or relation.field of the record, attaching the entity's rendered.printPDF).transitions:): optionalnotify:block with the same shape - "on Void, mail the counterparty".schedules.notify): gainsattach: printand template interpolation from the row's fields, so periodic notices can carry the document and reference its number/amount/due date.Per-tenant SMTP already exists via the mail facade; the ask is the glue + a small template story (interpolate
{field}from the record). Fail-soft on missing recipient (log + skip, as notify does today).Why upstream
Every document-centric application needs this; module-local workarounds mean hand-written listeners around the print engine in every project.