Skip to main content

Posts

Showing posts with the label Workflow

Sitecore XP: How to use site specific workflow when global workflow assigned on template standard values?

The Problem We were working with Sitecore XP 10.1 using ASP.NET MVC. Our solution had more than 100 Sitecore sites, and all page items and datasource items used the a Base workflow. The workflow was assigned globally through template standard values. However, some sites needed a simpler workflow with fewer states. We decided to introduce a new workflow called Simple Workflow for these sites. The plan was to create a script that would run against the sites requiring the simpler workflow and update the workflow and state fields of their existing items. This would move the existing content to the new workflow. However, there was another scenario to consider. Since the old workflow was still configured on the standard values of all item templates, any new item created on these sites could inherit the old workflow instead of Simple Workflow To address this, we planned to implement a custom processor that would update the workflow of newly created items to match the workflow used by...

EnableWorkflow attribute in Sitecore's site definitions

EnableWorkflow attribute defines if the workflow support for the site is enabled or not. This is an important attribute in site definition if you want workflow to work correctly. If you miss this, you may create problems for content authors which we will discuss in the post.  The Problem While testing a customization in Sitecore workflow, we stumbled upon following issue -  Content authors created a page in Experience Editor and left the page in Draft mode expecting all the data source items they edited on page are also in Draft state. Then a nightly automatic publish published all draft data source items to the live servers. Why did this happen? The steps to replicate. Create a new page in Sitecore  Open Experience Editor and add a component that needs a data source.  Select 'create a new data source' in the popup window.  Save the page in experience editor  Open the data source in the Content editor and take a look at the workflow state section. It will b...

How to push items linked in rendering data sources to next workflow state in Sitecore

Workflow implementation is important for content governance. When content author updates a page in Sitecore experience editor, Sitecore notifies content author to submit the page to push it to next workflow state.  But what about the rendering data sources present on the page. Do they get pushed to next workflow state or not?  Sitecore does push the rendering data source items present on page to next workflow state if you have the below setting set to true in your configs (which is true by default Sitecore 8.2 onwards) -  <setting name="WebEdit.AffectWorkflowForDatasourceItems" value="true" patch:source="Sitecore.ExperienceEditor.config"/> However, that's not all. Some of the rendering data sources may be dependent on other items (we will call them linked items), especially for container renderings (which act as container for other data items). There is no setting in Sitecore OOB that can push the linked items to next workflow state. Content auth...