Search code examples
sitecoresitecore6sitecore-workflow

Annoying issue with sitecore workflows and standard value inheritance


Right now i'm having a problem with sitecore workflow. The issue is as follows:

my template standard value has set the Workflow and Default Workflow fields set. The workflow state is set to draft. However, everytime i create an item from this template it is not inheriting the workflow section fields, all of them are empty

if i manually set workflow and workflow state for items, it works as expected up to the final state. However, if a content author edits the item, a new version is created but only the workflow field value is kept, while the workflow state is again empty.

what i'm doing wrong? why is this happening? I'm using sitecore 6.5.0


Solution

  • The __Standard Values of your template should only have the Default workflow field set; do not set the Workflow field on the __Standard Values item as that insinuates that the __Standard Values item is itself in the workflow! Similarly, do not set the State field on the __Standard Values item as that is saying that the __Standard Values item is in that state!

    Your Workflow item has an Initial State field on it that defines the initial state an item will be in (assuming the item uses that workflow).

    When you create an item, and that item has a __Standard Value with a workflow in the Default Workflow field, then that item will have its Workflow field set the same as the Default Workflow field of its __Standard Values. The state the item is in will be the Initial State as defined on said workflow.