Workflow sending duplicate e-mails

webteam's Avatar

webteam

18 Sep, 2015 01:33 PM

We created our first workflow to send notifications each time someone creates and publishes a certain type of news article. Unfortunately everyone in the group is getting a duplicate e-mail on each e-mail step. I'm wondering what we could have done wrong. When the workflow starts we get 2 exact e-mails similar to the following:

Your attention is needed regarding the workflow: News Workflow: Sample News Title
User options:
• Go to the dashboard
• View the asset
• View the workflow screen
Workflow History:
Sep 17, 2015 5:50 PM Started workflow

  1. 1 Posted by Ryan Griffith on 18 Sep, 2015 01:50 PM

    Ryan Griffith's Avatar

    Hi,

    When the step immediately following the email trigger is a transition step, the trigger will send an email to the owner or owning group, which in this case would be the draft step and the owning group is Editors. The duplicate email is more than likely due to you also specifying a group within the email trigger's parameters in the initialize step.

    When you have a moment, try the following adjustment to your initialize step:

    <step type="system" identifier="initialize" label="Create" >
        <actions>
            <action identifier="draft" label="Draft Notification Email" move="forward" >
                <trigger name="com.cms.workflow.function.EmailProvider" />
            </action>
        </actions>
    </step>
    

    Note: I removed the merge trigger because you don't want to merge the working copy with the current version until the very end. Additionally, you want to use a version trigger to create a new version of the asset after the changes have been merged. I would recommend adjusting your publish step to the following:

    <step type="system" identifier="publish" label="Publish" >
        <actions>
            <action identifier="publish" label="Publish" move="forward" >
                <trigger name="merge" />
                <trigger name="com.cms.workflow.function.Version" />
                <trigger name="publish" />
                <trigger name="com.cms.workflow.function.EmailProvider" >
                    <parameter>
                        <name>mode</name>
                        <value>completed</value>
                    </parameter>
                    <parameter>
                        <name>recipient-groups</name>
                        <value>Editors</value>
                    </parameter>
                </trigger>
            </action>
        </actions>
    </step>
    

    Note: If the publish step ends up generating multiple emails as well, try removing the parameters from that email trigger.

    Please let me know if you have any questions.

    Thanks!

  2. 2 Posted by webteam on 18 Sep, 2015 03:46 PM

    webteam's Avatar

    That seemed to work great. It appears I needed to remove the parameters on publish as well. Thank you as always for the fast & excellent response!

    Slightly off topic of the main subject, is it possible to add an action in the Draft step to allow someone to relinquish ownership and put the ownership back to the group so someone else can assign the asset to themselves to edit?

  3. 3 Posted by Ryan Griffith on 18 Sep, 2015 04:03 PM

    Ryan Griffith's Avatar

    Thank you for following up, I am glad to hear that adjustment resolved the duplicate email issue.

    Slightly off topic of the main subject, is it possible to add an action in the Draft step to allow someone to relinquish ownership and put the ownership back to the group so someone else can assign the asset to themselves to edit?

    At the moment, there is no way to re-assign (or un-assign) the workflow step, but we do have a related suggestion on our Idea Exchange.

    I believe your only option would be to have the user go into the Edit step, don't make a change, and initiate the workflow again so it goes back into the Draft step.

    Please let me know if you have any questions.

    Thanks!

  4. webteam closed this discussion on 18 Sep, 2015 04:05 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac