#Sitecore Workflows Back to Basics

One of the most overlooked features of Sitecore is the workflow. A good workflow implementation will ensure the correct content is published for a site. It can also bring different departments together for approval such as the marketing department and legal department. For instance marketing may come up with a campaign, but in order for it to be published would need to be approved by legal first to make sure everything is good. This is a very basic overview of a workflow meant for anyone beginning to understand how they work.

Workflow Basics

Using Lego as an example we can illustrate a workflow.

The out of the box workflows can be found at /sitecore/system/Workflows. If you look at XM Cloud you will see the following. XP/XM will look similar without the JSS Workflow.

Expanded view of the workflows above.

Breaking down the workflow parts.

ElementDescription
StatesThis is basically where you are at in a workflow. Could be draft, waiting for legal approval etc…
CommandsCommands is what the person in the workflow will do in order to go to the next state. A person doing the workflow could choose approve, reject, submit etc… It all depends on how the workflow is setup.
ActionsActions get executed when a command is initiated. An example would be a validation action or a publish action.

To assign a work flow to a template you can do the following:

Make sure you can view standard values.

In the standard values set the workflow values or if a content item is missing a workflow you can also set it in the workflow section of the item. For example here is a workflow created for an auto sticker template.

When a new item is created using the template you will see the Submit command on the menu. Once clicked will start the workflow.

After it is submitted you will see more commands. If all the approvals are met the publish action will execute.

Workbox

The workbox is a great tool to make sure you complete any workflow state/action assigned to you. You can find the workbox from the bottom tabs of the content editor or from the desktop.

I hope this overview makes sense. More than likely a developer will create a workflow based on needs. As someone who uses them though it is ok to ask for a workflow that mirrors a real world flow.

#Sitecore 8+ #Workflow Comment Box a Much-Needed Upgrade

Back in Sitecore 7 I was tasked with creating a new workflow. I quickly discovered out of the box workflow may not have all the features the client was asking for. One of the main features they wanted was a more intuitive comment box. The current one was just a JavaScript message box. They wanted something that they could put longer worded changes in and images. At that time I had to come up with a custom way to do that. With Sitecore 8 and above they have added this feature out of the box.

When creating and selecting a workflow command now you will notice there are three new fields. Comment Template, Comment Dialog Height and Appearance Evaluator Type (more about this later in another blog).

I created a template to be used for the comments. I kept it simple, but you can do a lot of different fields custom to your site.

I set the command with the following values. Keep in mind that you could have different comment boxes for different commands.

When the command was clicked the following popped up. Simple and nice!

The workflow is such a great and important feature in Sitecore. I am so glad it has been updated in Sitecore 8+. It just goes to show you that Sitecore listens and is always improving their products.