Publish Trigger

Overview

This trigger publishes or unpublishes the current asset in workflow (if publishable) to all enabled Destinations available to the user authorizing the publish.

When using the Publish trigger, the system differentiates between Transition steps and System steps. System steps that call the Publish trigger will authorize the publish as the system user (which operates as an administrator-level user), whereas Transition steps consider the Site Role and permissions of the current user who has ownership of the step.

Declaration


                <trigger class="com.cms.workflow.function.Publisher" name="Publish"/>
                

Usage


                <trigger name="Publish"/>
                

Parameters

Destination Parameter

                <parameter>  
      <name>destination</name>  
      <value>/path/to/destination</value>  
   </parameter>
                

Unless specified, the system will publish to all applicable Destinations. You can specify multiple destinations by putting in multiple parameter nodes, each containing a name and value tag, such as:


                <parameter>  
      <name>destination</name>  
      <value>/path/to/destination</value>  
   </parameter>  
   <parameter>  
      <name>destination</name>  
      <value>/path/to/another/destination</value>  
   </parameter>
                

Please note that the path to the destination is case sensitive.

Publish-Working-Copy Parameter

                <parameter>  
      <name>publish-working-copy</name>  
      <value>true</value>  
   </parameter>
                

It is also possible to publish the working copy of a page in workflow for staging purposes. This can be accomplished by adding a Publish-Working-Copy parameter to the invocation of the Publish trigger in a Workflow Definition with a value of "true". By default (without this parameter) only the non-working copy version of the asset in workflow is published.

Unpublish Parameter

                <parameter>  
      <name>unpublish</name>  
      <value>true</value>  
   </parameter>
                

If the asset is meant to be unpublished, the Unpublish parameter should be used, which accepts boolean values "true" or "false", false being a default value. This parameter works together with other parameters in this trigger so that it is possible to unpublish an asset using a given authorizing user, to unpublish a working copy, and to unpublish only from specified Destinations. This trigger can be useful when moving or renaming an asset through Workflow.

Authorizing-Type Parameter

                <parameter>  
      <name>authorizing-type</name>  
      <value>user</value>  
   </parameter>
                

The authorizing-type parameter is set when calling the trigger on an action. The authorizing-type parameter is used in any trigger that executes to a publish and is used to specify which user is "authorizing" the publish in this step. This will affect permissions/roles checks performed during publish and also to whom the publish report is delivered to. The "system" user is basically a way to bypass any permissions/roles checks but results in the publish report not being sent to anyone.

Authorizing-type can take the following values:

  • current-step-owner - the user assigned to the step that calls the trigger
  • system - the reserved "system" user
  • user - a specified user
Authorizing-User Parameter

                <parameter>  
      <name>authorizing-user</name>  
      <value>johndoe</value>  
   </parameter>
                

This parameter is used if 'user' is selected as the value for the authorizing-type parameter. This parameter's value can be any valid username.

Publish Related Assets Parameter

                <parameter>  
      <name>publish-related-assets</name>  
      <value>true</value>  
   </parameter>
                

Include this parameter to ensure that the asset's publishable relationships are published as well.

Publish Related Publish Set Parameter

                <parameter>  
      <name>publish-related-publishset</name>  
      <value>true</value>  
   </parameter>
                

Include this parameter to ensure that the asset's Content Type Publish Set is published as well.