If there are multiple people working on website content it may be necessary to adopt a content approval workflow. Many CMSes have this feature, and Umbraco supports this concept as well. The Umbraco approval workflow has these steps:
Umbraco workflows are simple but should cover 80% of usage scenarios. Most customers I've worked with start by implementing approval workflows, but later find that workflows create unnecessary bottlenecks and sometimes abandon the approval process altogether. In this post I go through the setup to implement workflows and some issues you may encounter and how I resolved them.
The basic setup prerequesties,
In order to create an approval workflow I needed some user accounts. An author and an approver. One thing to note about these users is, you're going to want to use real email addresses for their accounts. This is in order to see the email notifications. I suppose it would be feasible to implement an approval workflow without automated emails, but I think communication would break down pretty quickly without it.
I created the Author account and assigned them the 'Writers' group. There are 4 predefined user roles. Administrators, Editors, Translators and Writers. Writers do not have publish permissions and can only add and update content. You can also specify which Umbraco nodes to which writers have access.
I created the approver user named 'Test Approver' with the 'Editor' role. This use role has access to add, edit and publish content.
There are a lot of SMTP mail services out there. For my experiment, I setup an AWS SES (Simple Email Service). SMTP settings are in the Web.Config under 'mailSettings'. When testing with telnet I could see that only port 587 would accept connections, so I added port="587" to the configuration. Umbraco has a handy 'health check' feature for SMTP configuration. Log into Umbraco Back Office as admin and navigate to Developer->Health Check->Services.
Once my SMTP was setup, I logged in as my Approver user and navigated to the Home content node. In order to receive notifications that authors have content ready for publishing, authors need to listen for notifications on parts of the content tree. For my test I opted for 'Send to Publish' notifications on the Home node which effectively covers all content items. As the approver user, right click on the Home node, select notifications and check 'Send to Publish'.
Ok, everything is setup for approvals.
I logged out as Approver and logged in as my Content Author User. Navigated to the 'About' content Item and updated the section title. The 'Save and publish' button now reads 'Save and send for approval'. So, I clicked it and got a 'Submitted and sent for approval confirmation message'. But no email...
At this point I am expecting that my approver would receive an email indicating an item is ready for publishing. I logged into AWS and checked SES for email activity. AWS was reporting send email count as 0. I did a telnet test to ensure that I could get to the AWS SMTP relay. This is a little tricky as telnet times out very quickly and it expects the credentials to be Base64 encoded. AWS also expects TLS connections so I didn't expect to get far with telnet. However, I was able to confirm that I could connect to AWS. I downloaded Wireshark and applied the 'smtp' display filter. Then I clicked the 'Save and send for approval' button again. Aha! In Wireshark I could see that AWS was reporting a 530 Authentication required error. and 530 Must issue a STARTTLS command first. A bit of internet searching indicated that I needed to turn on SSL.
I went to the Web.config SMTP settings and through intellisense discovered,
enableSSL="true"
Gave it another shot, restarted the site in Visual Studio and logged in as my author. Navigated to the about item and clicked 'Save and send'. Lo and behold, I receive an email notification with a link to the item requiring approval and publication. Success!!
It looks as though once the approver receives the request to review and publish, they are expected to log in, review or preview the page and click save and publish. I am not sure if there is a history of who did what, when or a revision history. My guess however, is that I have pretty much fully explored the Umbraco workflow as of version 7.7.7.
If you are hosting an Umbraco site, check out my other posts on Umbraco:
Photo by Scott Graham on Unsplash