Unpublish and Delete Trigger

Overview

This trigger will unpublish the asset in workflow before deleting it. This ensures that an orphaned file is not left on the web server.

If the asset in the workflow is not a publishable asset (such as a Template or External Link), this trigger performs a standard delete. If the asset is a publishable asset (File or Page), the trigger attempts to unpublish the asset from all enabled Destinations prior to deleting it.

Note - After the UnpublishAndDelete trigger is called, there is no longer an asset in workflow and the workflow is effectively over. Any asset-based triggers called after this will be ignored.

Declaration


                <trigger class="com.cms.workflow.function.DeleteAndUnpublish" name="UnpublishAndDelete"/>
                

Usage


                <trigger name="UnpublishAndDelete"/>
                

Parameters

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
  • user - a specified user
Note - The Unpublish and Delete trigger cannot use the "system" authorizing-type value, as the trigger requires a real username to be used to authorize deletion that occurs before unpublish.
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.