Adding a workflow to an existing item in sitecore 6.5

*爱你&永不变心* 提交于 2020-01-03 15:33:20

问题


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:


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.



来源:https://stackoverflow.com/questions/13032040/adding-a-workflow-to-an-existing-item-in-sitecore-6-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!