Workflow on standard values mistake

Last week when I was setting up workflows for my customer I made a mistake that had some interesting side effects that were not all that predictable. When i added the workflow to the standard values of the template I was in a bit of a rush (that is my story and I am sticking to it) and I added the workflow to the field called “Workflow” to the standard values of the template. Just to really make sure that it would be in the right workflow state upon creating an item based on the template I added the first state to the field “State” as well.

To make sure that everything was working as I wanted it to I created an item based on the template and made sure that it was correctly put in a workflow i the right state. The workflow worked fine and I forgot about it.

A couple of days later another developer that was unaware of my changes to the template noticed that all the standard values from the items based on this template were not being published at all. We searched around for the problem and started suspecting the workflow. It turns out (quite logically) that the workflow was preventing the standard values from being published since the standard values item of the template was stuck in a workflow state that prevented it from being published and therefore the standard values on the items were not being published either.

Note to self: Only add workflows to the “Default workflow” field in the standard values.

Leave a Reply

Your email address will not be published. Required fields are marked *