Sitecore Workflows – Adding new states, commands and actions

In this blog post, I would like to show how easy is to create your own Sitecore Workflows based on Sample Workflow which is OOTB in Sitecore.

Let’s begin with some theory – A workflow is a series of predefined states that reflect the work processes and procedures for creating web content. Workflows are introduced usually to prevent accidental publishing and/or also to approve content before publishing.

Workflows consist of three elements – states, commands and actions.

Workflow specific items are stored in the content tree:

  • Workflows – the parent item that contains all the sub items that make up the workflow.
  • States – the basic building blocks of the workflow. The workflow states represent the different stages in your content creation process.
  • Commands – move content items from one workflow state to another. When the command is executed, the item is moved to the workflow state that is defined in the command 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.

 

Our custom workflow will start like this (further states are not listed) and will have two different paths – Urgent and Normal:

 

To demonstrate this I have just duplicated “Sample Workflow” and created “Custom Workflow”. I have renamed “Awaiting Approval” to “Awaiting Normal Approval”. I have created “Awaiting Urgent Approval” with the same commands. I have also created “Submit Urgent” command for “Draft” state. This command will give us ability to go from “Draft” state to “Awaiting Urgent Approval” state.

As I’ve already mentioned, under the “Draft” state I have added new command “Submit Urgent” for which I have set “Awaiting Urgent Approval” as next state. For “Submit” command, I kept next step “Awaiting Normal Approval”.

I have checked “Suppress Comment” for “Submit Urgent” command. Implication of this setting is to not show comment popup. It is therefore speeding up approval process.

On my sample template that I have created, I have set this new workflow as default on Standard values:

Do not forget to change paths to workflow states / commands in your workflow if you are duplicating it:

If you don’t do that, paths will remain on Sample Workflow as you can see below!

 

Now editors will have two options after “Draft” State:

 

In Workbox it will be also highlighted as different step and different box to approve:

 

Happy workflowing 🙂

More information can be found here:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s