Follow-up to #3607272 (channel-neutral notifications) and #3607367.
Setting up ECA + Easy Email to template each Orchestra notification type is a lot of per-type wiring (one model, condition and action per type). Add a first-class Easy Email delivery channel as an optional submodule, so a site templates notifications by authoring Easy Email templates only, with no automation glue.
Design
- New optional submodule
orchestra_easy_email(depends oneasy_email), a straight alternative toorchestra_mail: enable one or the other. - One subscriber on the neutral
OrchestraNotificationEvent, the same seamorchestra_mailuses. No ECA. - Convention mapping from the notification type to a prefixed Easy Email template, resolved most-specific-first:
orchestra_{workflow}_{type}(per-workflow override), thenorchestra_{type}(per-type), thenorchestra_generic(shipped catch-all, always present). - Recipients, languages and To/Cc/Bcc dispositions come from the event and are set programmatically on the Easy Email; grouped or per-recipient exactly like
orchestra_mail. - Orchestra token context (instance, token, correlation key, node label, and the process variables) is seeded so templates use the same tokens the message interaction exposes; recipients are full user objects, so user tokens work too.
- Ship the four core templates on install:
orchestra_task_assigned,orchestra_task_reminder,orchestra_interaction_link,orchestra_generic. - Notify node ergonomics: the node stays channel-neutral (it carries only a notification-type string, never a template id). Its config form shows the resolved template id and whether it exists yet, with a link to create or edit it.
A Notify node is customized by giving it a distinct notification type and creating the matching orchestra_{type} template; no per-node template wiring, and the node never names an Easy Email template directly.
Issue fork orchestra-3607508
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
mably commented