Sitefinity 4 RC: Workflow

November 24, 2010 Digital Experience

Workflow is the next stop on our tour through the new features of Sitefinity 4 RC. Workflow enables a CMS to enforce the rules established for a website to manage content publishing. This can be as simple as defining permissions for who can create, edit, approve, and publish content, or allow for more custom workflows to control more complex and specific scenarios, as we’ll see later.

Remember that the different editions of the final Sitefinity 4 Release will have different features available, so be sure to check the Sitefinity Pricing and Licensing page for the latest details.

Video

Once again, Gabe Sumner has compiled a helpful and detailed video on Workflow in Sitefinity 4 that takes you on a walkthrough of defining and using Workflow. Be sure to check it out below.

Creating Workflow

Workflow is enabled from the Sitefinity Administration Menu. If no workflow scenarios have been defined, click the option shown to create a new one.

This will bring up a dialog with several options for creating a workflow.

The simplest is a basic Approval Before Publish, perfect for smaller sites who just need a simple review process. There is also a two-step workflow, where content must first be approved, then approved again for publishing. This is helpful for websites with larger teams, perhaps with separate divisions for content and marketing.

For this example, I chose to go with a 2 step approval, since that is closest to the way things worked in previous versions of Sitefinity.

Custom Workflow

You also have the ability to implement a custom-developed workflow using Windows Workflow Foundation 4.0. Choosing this option will allow you to upload your implementation for use by Sitefinity.

There is an excellent article from Senior Developer Ivan Osmak that takes a deep dive in to Sitefinity Workflow to develop a custom workflow scenario that goes far beyond simply managing content state. Be sure to take a look to learn more about the power of this new platform!

Workflow Permissions and Scope

After selecting the workflow you are then shown a new dialog to define the scope and permissions for the workflow.

Permissions for each step in the workflow can be managed either by role or by user, allowing for greater flexibility than ever. While it is probably best to restrict based on role (for example, allowing all Editors to Approve), there may be instances where an individual in a restricted role may authorized to approve their own content.

By allowing permissions to be defined at the user level, Sitefinity 4 now allows you to handle this case right out of the box!

Each step in the workflow can be configured with a separate set of roles or users, allowing for further customization of your site's workflow. In this example, I've only defined permissions for the first approval step, meaning that only Administrators can publish content when it is fully approved.

Scope

Each workflow scenario can also be scoped to a specific set of Sitefinity content. In this example, I've only scoped pages. However, you can extend the scope of a workflow to additional content modules as needed. You can also specify that ALL content be subject to a particular workflow.

With Sitefinity 4 you no longer have an "all or nothing" approach, but rather a fully customizable and extensible tool to protect and manage your content.

Notifications

Another helpful new feature to Workflow in Sitefinity 4 is the ability to automatically notify approvers or publishers of pending content via email. In order for this feature to function properly, SMTP settings must be configured in the Sitefinity Administration Settings, available under Advanced -> System -> SMTP (Email Settings).

For a more detailed look at the settings needed, be sure to take a look at Gabe Sumner's video linked at the top of this article.

Workflow In Action

Now that we have defined our workflow, let's see it in action by logging in as a user I've created in the "Authors" role. This user has permissions only to create content, not approve it. When creating a page, instead of the standard "Publish" button, the user now sees "Send for Approval", which, if properly configured, will email the users responsible for approving the content.

When a user with the correct permissions logs in (in my example, users in the "Editor" role), they'll see that they have content available for approval. Opening the content for review will reveal a new set of options, including "Send for Publishing", which approves the content for the next step in the workflow.

Editors also have the ability to reject content if it does not meet their criteria, or to make further changes of their own without approving the content to the next step in the Workflow.

However, regardless of whether content is approved or rejected, logging in as Administrator will always enable the "Publish" button, allowing them to bypass all workflow (if that option was enabled) and directly publish content as needed.

Wrap Up

Workflow is clearly a helpful tool in managing and protecting the integrity of your content. Because Sitefinity 4 makes use of the Windows Workflow Foundation 4.0, developers can once again leverage their existing skills within the CMS platform. But even out of the box, Sitefinity Workflow is a flexible tool, more useful and powerful than ever before!

Be sure to take a moment to download the Sitefinity 4 RC and try it out for yourself. As always, please send us your feedback on your experience with the RC in our Sitefinity 4 Discussion Forum.

The Progress Team