Skip to content

Intent: declarative send-document-by-e-mail glue (process step / transition / schedule attach) #6356

Description

@delchev

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:

  1. 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).
  2. A transition (transitions:): optional notify: block with the same shape - "on Void, mail the counterparty".
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions