4
votes

I'm trying to set up workflows in sitecore 6.5. I can get the workflows to run just fine on NEW data items created from templates, but everytime I go to a data item that existed before I created the workflow, the ribbon bar tells me "This item is currently not part of a workflow".

I've added the Workflow I want set on the Default Workflow field, and in the Workflow field in the data item, but still the workflow is not applied.

I'm not sure how to get a newly created workflow to be applied to existing data items. Is this possible in sitecore 6.5?

1
Have you set the workflow on the standard items of a template?marto
Yes, the workflow is set on standard values of the template. That's how the new data items get the workflow going automatically for me. But existing items don't seem to work.TheNerd
it sounds like it should work. I would say post it to sitecore support - there might be another issue. The only other way is to go through the tree and manually set that workflow to all old items. If you want I can post the code to traverse the tree.marto
I'm experiencing what sounds like the same issue with Sitecore 6.3. stackoverflow.com/questions/13160618/…Bob Black

1 Answers

5
votes

Ok.. so the key to all of this is publishing.

  • Setting default workflow on standard values has no effect on items that are already part of a workflow. Doing so will only change the "default workflow" field on existing items but has zero effect on items that are already created

    • If the content that you want to add a workflow to is NOT part of a workflow currently AND that content is currently published, changing the workflow on that the template standard values also has NO EFFECT. The reason is that this is published content and if it were to be put into a workflow when it's already published, it would un-publish it. Bad news.

    • You should not be setting the workflow and workflow state on template standard values... ever. There is no need for you to do that and as you can see, it has unintended consequences that don't make sense at first.

Here's what you need to do. You simply set the default workflow on the template standard values. Now.. if you have content that is currently published, you simply need to create a new version (which it should do automatically for your content authors if you have it set up to do so in the web.config... it won't do that for you if you are an admin since you can edit published content) as soon as they try to edit the items. As long as the "default workflow" field is still set to "standard values" as soon as they create a new version of the item, it will put the new version in a workflow according to what is in your default workflow.