Source

ilrt.formalworkflow / ilrt / formalworkflow / profiles / default / contentrules.xml

<?xml version="1.0"?>
<contentrules>
 <rule name="rule-1" title="Email awaiting review"
    description="Email when an editor pushes something to the review state"
    enabled="True" event="Products.CMFCore.interfaces.IActionSucceededEvent"
    stop-after="False">
  <conditions>
   <condition type="plone.conditions.WorkflowTransition">
    <property name="wf_transitions">
     <element>submit</element>
    </property>
   </condition>
   <condition type="plone.conditions.Role">
    <property name="role_names">
     <element>Editor</element>
    </property>
   </condition>
  </conditions>
  <actions>
   <action type="plone.actions.Mail">
    <property name="source">${user_email}</property>
    <property name="message">Hello Plone webmasters,
     
     The page page ${title} at
     ${url} has been submitted for review
     
     ${change_comment}
     
     Last edited or created by ${user_fullname}
     
     ${user_email}
     
     _____________________________
     Plone website automated email</property>
    <property name="recipients">${manager_emails}</property>
    <property name="subject">web content for review</property>
   </action>
  </actions>
 </rule>
 <rule name="rule-2" title="Email item is published"
    description="Email editor that their page is published" enabled="True"
    event="Products.CMFCore.interfaces.IActionSucceededEvent"
    stop-after="False">
  <conditions>
   <condition type="plone.conditions.WorkflowTransition">
    <property name="wf_transitions">
     <element>publish</element>
    </property>
   </condition>
   <condition type="plone.conditions.Role">
    <property name="role_names">
     <element>Reviewer</element>
     <element>Manager</element>
    </property>
   </condition>
  </conditions>
  <actions>
   <action type="plone.actions.Mail">
    <property name="source"/>
    <property name="message">Hi ${contributors},
     
     Thank you for submitting ${title}
     It has now been published at ${absolute_url}
     
     Yours,
     ${user_fullname} - Plone webmaster 
     
     _____________________________
     Plone website automated email</property>
    <property name="recipients">${contributor_emails}</property>
    <property name="subject">web content has been published</property>
   </action>
  </actions>
 </rule>
 <rule name="rule-3" title="Email content has been rejected"
    description="Email if content is rejected via workflow" enabled="True"
    event="Products.CMFCore.interfaces.IActionSucceededEvent"
    stop-after="False">
  <conditions>
   <condition type="plone.conditions.WorkflowTransition">
    <property name="wf_transitions">
     <element>reject</element>
    </property>
   </condition>
  </conditions>
  <actions>
   <action type="plone.actions.Mail">
    <property name="source"/>
    <property name="message">Hello ${contributors},
     
     I am sorry but there is a problem with your latest content edit, so it cannot be published.
     
     Please check the last comment in the content history for the reason at
     
     ${absolute_url}/@@historyview
     
     So that you may amend it, if necessary, and resubmit.
     
     Thank you,
     ${user_fullname} - Plone site webmaster
     
     _____________________________
     Plone website automated email</property>
    <property name="recipients">${contributor_emails}</property>
    <property
       name="subject">Sorry your content has been rejected for publication</property>
   </action>
  </actions>
 </rule>
 <assignment name="rule-1" bubbles="False" enabled="True" location=""/>
 <assignment name="rule-2" bubbles="False" enabled="True" location=""/>
 <assignment name="rule-3" bubbles="False" enabled="True" location=""/>
</contentrules>