How to properly switch on workflows in configuration

A few days ago we tried to solve the workflow concept for a client of ours. Workflows and their set-us is quite well documented by Sitecore (specifically in the Workflow Cookbook and Workflow Reference). What we were not able to find though, was good documentation to how to set up the configuration properly.

In the Workflow Reference it is written that for making workflows active, the key enableWorkflow needs to be set to "true". It is not clear, where this key needs to be placed though. The inline comment help in the Web.config does not help either, since it only states that the workflows are enabled with  enableWorkflow.

Workflow are switched on – maybe a little counter-intuitively – for the website "shell"  on the Core database. The Config row that we are looking for, is located in the position of the Web.config: sitecore/sites/site

The configuration piece that enables workflow as a whole is <site name="shell" enableWorkflow="true" />.

The overall configuration could look for instance somewhat like this:

It is not necessary to switch on workflows for the other websites (even if in the example above they are enabled also on the sites "admin"  and  "modules_shell" ) . If the key enableWorkflow remains set to "false" on the site “shell” or it is not filled in altogether, the workflows cannot be enabled even by setting enableWorkflow to "true" on the configuration values for the created websites.

This also excludes any option to switch workflows on or off for the logical websites, hosted in a multisite Sitecore environment. The workflows can be either set to on or to off exclusively globally. It is possible to set the workflows on standard values of item templates, regardless if they are activated in the Web.config. The setting in the Web.config can only make the rules specified by the workflows really work.

A few other interesting things about workflows in Sitecore

Workflows have impact on publishing and the lifecycle of an item. Workflows are often used along with the Sitecore scheduler for the purpose of automatic publishing. In bigger Sitecore implementations it is always better to take care about the lifecycle of an item automatically, rather than letting the editors publish manually.

Workflows are absolutely essential for the correct working of the functionalities of the Sitecore Marketing Center. Specifically the setup and publishing of Goals and Engagement Plans that use the standard system workflow “Analytics Workflow” (to be found in /sitecore/system/Workflows/Analytics Workflow) and A/B and MV testing that uses the standard system workflow “Analytics Testing Workflow” (to be found in /sitecore/system/Workflows/Analytics Testing Workflow) cannot be used without the workflows enabled in configuration.

If you don’t have a clear vision of the workflow setup during setting up the Sitecore platform, it is better to leave them activated in the  Web.config, but leave the standard values of the item templates without any workflow assigned. It is possible to add the required workflows to the standard values of the item templates at a later stage (just to the field “Default Workflow”) and on any change of the existing content, based on that template, the workflow is immediately entered.

Leave a Reply

Your email address will not be published. Required fields are marked *