How to enable workflow in Experience editor mode?

In this blog we will discuss a weird bug we faced in one of our client projects. We had implemented workflow for our KB Articles as we used to fetch it from third party application and create using code. The workflow was very simple, when the Articles are created through code or modified, the Article is moved to a Draft state of Workflow. Then it is reviewed by one of the Content Editors and approved. So this workflow was working as expected in Content Editor.

We had some technical Content Editors previously hence we never verified if it is working in Experience Editor. Few weeks before the ownership of approving the Articles was taken over by a Marketing team where they used Experience Editor for any change. We realized that when the Editors updated or modified the Article in Experience Editor, the workflow wasn’t working as expected.

We started digging in, debugged all the code, tried to understand the dlls related to workflow and at the end understood that a small config change can fix our issue. So writing the blog so that others shouldn’t spend the efforts and time we invested in find the root cause.

Add enableWorkflow=”true” in the site definition for the website. We found that the Experience Editor runs using the site context we are looking at, hence the mentioned attribute is required in the site definition of the website.

I hope this will help any of the community members who faces the similar issue.

Thank you.. Keep Learning.. Keep Sitecoring.. 🙂

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 )

Facebook photo

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

Connecting to %s