9

A content editor is on the experience editor, they have previewed the page, they are happy with the page, they want it to approve the version of the page they are previewing, so it is ready to go live when scheduled.

The page has lots of renderings with datasources.

For each data source, they have to approve it individually.

The content author just wants to approve the whole page, without having to approve each component.

I see 8.2 includes some features to keep datasources in sync with the parent page - "WebEdit.AffectWorkflowForDatasourceItems". (as well as to be able to approve individual data sources, and see on how many other pages they are used) Does this work if the data sources are in a different workflow than the page? https://jammykam.wordpress.com/2016/09/05/sitecore-8-2-managing-datasource-components-and-workflow-from-the-experience-editor/

Is there any documentation on this?

What could be done to move everything on the currently visible version of a page, to move it to the final state of the workflow for each data source on the page & the page version itself, regardless of workflow type.

This should only approve the version of the page previewing for a particular date, and the referenced data sources as used by renderings on that version of the page.

1
  • You have asked a lot of questions in one here Ian. I'd suggest re-working your question. Commented Oct 11, 2016 at 23:58

2 Answers 2

5

I wrote the article that you linked to in your question, and my main motivation for writing it was the (current) lack of documentation around this new feature.

Does this work if the data sources are in a different workflow than the page?

The answer is no. The workflow command executed on the datasource items is the exact same one as the "parent" item. There is a check in code that checks if the datasource item has a workflow attached to it, and if so if it has a workflow command with the exact same ID as the original. If you have 2 different workflows, even though the command names may match, the IDs will not.

If your items are in the same workflow but a different workflow state, then it will work.

What could be done to move everything on the currently visible version of a page, to move it to the final state of the workflow for each data source on the page & the page version itself, regardless of workflow type.

If you're using Sitecore 8.2, then provide a new implementation of the Workflow With Datasource command with whatever logic you need:

<commands>
  <command name="webedit:workflowwithdatasourceitems" type="Sitecore.ExperienceEditor.WebEdit.Commands.WorkflowWithDatasourceItems, Sitecore.ExperienceEditor" />
</commands>

If you're on an earlier version of Sitecore and want to implement this functionality then my original blog post has links to articles which provide this information. You could take a look at this implementation on Workflow Bundling by Jamie Scott and change the logic in the "bundling workflow command" to move the items to the final workflow stage. You would obviously want to check that the parent item is also being moved to the final workflow stage before doing the same with the datasources.

This should only approve the version of the page previewing for a particular date, and the referenced data sources as used by renderings on that version of the page.

I don't think any of the modules or the code in Sitecore 8.2 will account for Preview date in the workflow approval. You'll need to do something custom, I'm not even sure the Preview date is passed as a parameter to the workflow either. I'm not aware of being able to approve from the Experience Editor in Preview Mode either, which will only show you a preview of the page of items that have been approved (since if the item/datasource has not been approved, it will not be published at that date)

4

I'll try and answer some of these questions.

It does sounds like this setting will do what you want, and by default it's enabled in 8.2:

<setting name="WebEdit.AffectWorkflowForDatasourceItems" value="true" />

There doesn't seem to be any documentation for the new workflow features of 8.2 yet but based on the info here it suggests that components will not be left in a different workflow state to the page: https://dev.sitecore.net/Downloads/Sitecore%20Experience%20Platform/82/Sitecore%20Experience%20Platform%2082%20Initial%20Release/Release%20Notes

A number of enhancements to the Experience Editor have been implemented for the associated content on a page:

  • All page components that have data sources are highlighted with the green frame if the "associated content" checkbox is selected.
  • The toolbar of the component shows the datasource item's workflow and the number of pages that use the same datasource item.
  • For each piece of content used on the page, you can see the content item's details and the other pages that use this content.
  • For each page, you can see all the content items that are used on the page and their workflow states.
  • New notifications have been implemented to prevent authors from publishing broken pages.Data sources move through their workflows together with the context page.
2
  • @Ian please mark as the answer if this solves your problem. Commented Oct 12, 2016 at 9:37
  • It won't, it will only move items through that are in the same workflow.
    – jammykam
    Commented Oct 12, 2016 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.