Comala Workflow - Email Trigger

Peter Chang February 2, 2018

Hi, 

I'm trying to modify the "Simple approval workflow" by adding an approval process and triggering an email to be sent to the selected "Reviewers". My intention is to assign the review task to a member of the reviewer group and have an email notification sent to that person so they know there's a document pending their review/approval.

My approval process seems to work. When I click on assign, a list of members from the "Reviewers" group will show in the drop down. What I can't get working is the email notification. I suspect I have the trigger set incorrectly? I'm also not sure if "user=@Reviewers@" will work. I want the notification to be sent to the selected reviewer.

 

{workflow:name=Simple approval workflow|key=com.comalatech.sample.approvals.01}
{description}
The Simple Approval Workflow has 2 states.
In Progress: Staff edit pages, not visible to non-team members. Approved: Staff approve, visible to public.
{description}
{state:In Progress|approved=Approved|taskable=true}
{approval:Review|assignable=true|group=@Reviewers@}
{state}
{state:Approved|final=true|updated=In Progress|hideselection=true}
{state}
{trigger:statechanged|state=Review}
{send-email:user=@Reviewers@|subject=Page ready for approval}
The page @page@ is waiting for your approval.
{pageactivity}
{send-email}
{trigger}
{workflow}

 

 

Thanks,

Peter

1 answer

3 votes
Patricia Yague
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 9, 2018

Hi Peter!

Having a look at your requirements, I think the solution you need is the following:

{workflow:name=Simple approval workflow|key=com.comalatech.sample.approvals.01}
{description}
The Simple Approval Workflow has 2 states.
In Progress: Staff edit pages, not visible to non-team members. Approved: Staff approve, visible to public.
{description}
{state:In Progress|approved=Approved|taskable=true}
{approval:Review|assignable=true|group=reviewers}
{state}
{state:Approved|final=true|updated=In Progress|hideselection=true}
{state}
{trigger:pageapprovalassigned|approval=Review}
{send-email:user=@assignee@|subject=Page ready for approval}
The page @page@ is waiting for your approval.
{pageactivity}
{send-email}
{trigger}
{workflow}

 

the pageapprovalassigned is fired when the reviewers are assigned in the first state, and the @assignee@@ value reference will send the email to the assigned user.

Also, you don't need reference when using group names, please have a look at the example here -> https://wiki.comalatech.com/display/CW/send-email+macro

Please have a look at the documentation for more information and let me know if you need any help:

https://wiki.comalatech.com/display/CW/Value+Reference

https://wiki.comalatech.com/display/CW50/trigger#trigger-Events

 

Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events