Skip to content
Snippets Groups Projects
Commit 23b5af20 authored by jurgenhaas's avatar jurgenhaas
Browse files

Update to v2: notify the content author as well

parent ff988b7a
Branches
No related tags found
No related merge requests found
## ECA Recipe: Notify: New Comment
## ECA Recipe: Notify: New Comments
ID: notify_new_comments
Notify the site owner by email when a new comment gets posted to the website.
Notify the site owner and the content author by email when a new comment gets posted to the website.
### Installation
......
{
"name": "drupal-eca-recipe/notify_new_comments",
"type": "drupal-recipe",
"description": "Notify: New Comment",
"description": "Notify: New Comments",
"license": "GPL-2.0-or-later",
"require": {
"drupal/eca_content": "*"
......
......@@ -5,8 +5,8 @@ dependencies:
- eca_content
id: notify_new_comments
modeller: bpmn_io
label: 'Notify: New Comment'
version: v1
label: 'Notify: New Comments'
version: v2
weight: 0
events:
Event_0i3cw7g:
......@@ -25,7 +25,7 @@ actions:
plugin: action_send_email_action
label: 'Send email'
configuration:
recipient: '[site:mail]'
recipient: '[site:mail],[entity:entity:author:mail]'
subject: 'New comment: [entity:entity:title]'
message: |-
A new comment was posted to "[entity:entity:title]":
......
......@@ -4,19 +4,20 @@ dependencies:
config:
- eca.eca.notify_new_comments
id: notify_new_comments
label: 'Notify: New Comment'
label: 'Notify: New Comments'
tags:
- ''
documentation: 'Notify the site owner by email when a new comment gets posted to the website.'
documentation: 'Notify the site owner and the content author by email when a new comment gets posted to the website.'
filename: ''
modeldata: |
<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:qa="http://some-company/schema/bpmn/qa" id="sample-diagram" targetNamespace="http://bpmn.io/schema/bpmn" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="notify_new_comments" name="Notify: New Comment" isExecutable="true" camunda:versionTag="v1">
<bpmn2:documentation>Notify the site owner by email when a new comment gets posted to the website.</bpmn2:documentation>
<bpmn2:process id="notify_new_comments" name="Notify: New Comments" isExecutable="true" camunda:versionTag="v2">
<bpmn2:documentation>Notify the site owner and the content author by email when a new comment gets posted to the website.</bpmn2:documentation>
<bpmn2:extensionElements>
<camunda:properties>
<camunda:property name="Changelog v1" value="Initial version" />
<camunda:property name="Changelog v2" value="Also send email to the author of the commented content" />
</camunda:properties>
</bpmn2:extensionElements>
<bpmn2:startEvent id="Event_0i3cw7g" name="New comment created" camunda:modelerTemplate="org.drupal.event.content_entity:insert">
......@@ -36,7 +37,7 @@ modeldata: |
<camunda:property name="pluginid" value="action_send_email_action" />
</camunda:properties>
<camunda:field name="recipient">
<camunda:string>[site:mail]</camunda:string>
<camunda:string>[site:mail],[entity:entity:author:mail]</camunda:string>
</camunda:field>
<camunda:field name="subject">
<camunda:string>New comment: [entity:entity:title]</camunda:string>
......
name: 'Notify: New Comment'
description: 'Notify the site owner by email when a new comment gets posted to the website.'
name: 'Notify: New Comments'
description: 'Notify the site owner and the content author by email when a new comment gets posted to the website.'
type: ECA
install:
- eca_content
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment