Return to doc.sitecore.com

Valid for Sitecore 5.1.1, 5.2, 5.3
How to set up automatic publishing upon workflow completion.

Sitecore 5.1.1 introduces a new workflow action that will publish an item when it completes its workflow. 
 

This action is attached to the 'Done' state of a Simple workflow supplied with the standard Sitecore installation. The type string of the action is:  Sitecore.Workflows.Simple.PublishAction, Sitecore.Kernel. The item will be published automatically upon completion of the Simple workflow.

 

You can control the deepness of the publishing operation by using a parameter called deep.

 

The same can be done for a custom workflow by creating an item under the final state (it should have the Final checkbox checked in the Data section) from the Action template located under templates/System/Workflow.

 

Fill the necessary fields the way it is shown in the screenshot above.

 

To make the action more user friendly, you may create a custom template that consists of the following fields:

Type string (field type=text)

Deep (field type=checkbox)

 

Note: From the article about invoking an action you can learn how to cause the workflow to invoke any action.