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.
-
To enable deep publishing (i.e. publish the item and all of its descendants) enter the following in the Parameters field:
deep=1 -
To disable deep publishing (i.e. publish only the item itself), just leave the field blank or enter the following in the Parameters field:
deep=0
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.