I already have an content item (item) with template A. Template A has not set any workflow initially and I set a new workflow in template's standard value.
If I go to the content item's workflow section, there is only "Default workflow" update. The fields "Workflow" and "State" are empty even I set "Initial State" in the workflow's property, as shown below screenshot. So, workflow process is not working on that item.
However, if I create new item with the template already set workflow, I could see all filled workflow fields based on its initial workflow setting. So, workflow process is perfectly working.
I have a number of pages without workflow setting and I'm about to assign new workflow in its templates.
How can I solve this issue???????
I used Powershell Script and it looks like this. It updates the empty field and perfectly works.
When you set the default workflow value on a standard values item it does not automatically and go through and add existing item versions into a specific workflow state. This is because any content that was previously published would become unpublished as it would go to the default state of the workflow, which is typically a draft state.
The next time you add a version to the item that now has workflow (either explicitly or by "editing" as a lower level user), its state should be set to draft as you'd expect.
If you need to migrate existing versions of items into workflow at particular state you will probably need to do this via code.