Beta Version

BLOG

Kapil Oliveti
4 Minute read

Understanding Sitecore Workflows

Workflows can be described as a series of predefined states that reflect work processes and procedures to create web content for your organization. What it is essentially does is to provide a flexible way to create, maintain and review content. Ensuring that only content that is approved gets published.

Workflow includes three elements:

  • States
  • Commands
  • Actions

As a minimum, each workflow must have two workflow states -  the ‘initial (editing)’ and ‘final (published)’ workflow state. You can only publish an item in a workflow, provided it is in the final workflow state.

Here’s a low down on the workflow items that are stored in the content tree:

  • Workflows

As mentioned above, this is the parent item that contains all the sub items that make up the workflow. When you go to the Content editor - select ‘System’ and scroll down to the ‘Workflows’ node in the tree on the left hand side of the editor. This is exactly where the Sitecore Simple workflow is configured.

Here’s a sneak peek of the structure:

Workflow Node

Each workflow is defined by the node that rests in the System/Workflow/Workflow template. Remember that you can have as many workflows as you like. If you want to add a new workflow, you just need to add a workflow node and populate it. The workflow node has just one significant field titled ‘Initial State’ that controls the default state in which all items will be created. In a simple workflow, the initial state is set to ‘Editing’.

  • States

These are the building blocks of the workflow and define steps the document must pass through before being published. The state nodes are based on the System / Workflow / State template and are added as children to the workflow node. The State template has only one checkbox titled ‘Final’; once that’s checked, items in this state are deemed complete and ready to publish. Items can only be published once they are in the final state.

The Simple workflow includes four states, out of which three of them - Editing, Reviewing and Approving - define the document flow prior to publishing. The last state, Done, indicates that the document is ready to be published.

  • Commands

This feature is to move content items from one workflow state to another. When a command is executed, the item is moved to the workflow state that’s defined in the command item - you can think of these as links between states. Command nodes are based on the System / Workflow / Command template which has a ‘Next State’ field.

Let’s look at the Approve command of the Reviewing state: 

You can see that it has ‘Next state’ set to ‘Simple/Approving’, that is the Approving state of the Simple workflow. Contrary to this, the Reject command has ‘Simple/Editing’ as its next state.

Binding the Item

Generally, users cannot pick which workflow an Item will have when creating or editing the Item.  The Workflow associated with the Item is predefined in the Template or Master associated with the Item.

  • Actions

The actions that are automatically performed on the items when they are in particular workflow states or when particular workflow commands are executed.

Ebook
Sitecore CMS Best Practices Implementation Audit Guide

Creating an Item

Go to the content editor and create a new item using the ‘Document with Workflow’ option. The Item is then created.

On the left side, the list shows that the item is in the ‘Editing’ state of the ‘Simple’ Workflow. You can try and publish the document using any type of publishing - publish item, incremental or full, but the Item will not appear on the published website. This is because the Item is in the ‘Editing’ state and does not have the ‘Final’ Checkbox ticked.

Executing Commands

In addition to check-in / check-out options, now you can also execute workflow commands from the Content Editor. Move the Item to the next state by clicking the ‘Submit’ button.

The comment is stored along with the Item’s workflow history which records all the states and transitions the Item passes through. Fill in the comment and click OK.

The Final State

Using the workflow commands, one can move the Item through all the states to the ‘Done’ state. You can try and publish it again and the Item will be accessible from a browser. When in the final state, the Item can no longer be modified. If an editor wants to rectify anything, he presses the ‘Edit’ button on the toolbar, which creates a new version of the Item, places it in the Editing state, and the whole process starts again.

Best Practices for Workflow

  • Try to avoid email notification of every workflow state. Only provide email notifications for critical workflow states. You can use RSS feeds instead of email notifications.

  • Apply appropriate workflow security.

  • You should minimize the number of workflows, states and actions involved.

We at Altudo invest heavily in technology to help brands succeed in customer experience and engagement. As Sitecore Implementation Partner we’ve helped 45+ Fortune 500 brands to deliver awe-inspiring customer experience through their website and marketing channels.

Kapil Oliveti Director Solution Architect


Browse Topics

Talk to our Experts

Talk to us about how we bring together 1:1 personalisation, deep Martech Expertise, CX & Demand Gen Strategy, Engagement Analytics & Cross-Channel Orchestration to drive award winning experiences that convert

Get in touch for a complimentary consultation or a demo today.