Unpublish and Delete Trigger
Often, within the context of a workflow process, there is a need to un-publish an asset before removing it from the system.
The DeleteAndUnpublish trigger can be used in place of the previous Delete trigger. When the asset in the workflow is not a publishable asset (template, symlink, stylesheet, block, reference), this new trigger performs a standard delete. However, when the asset is a "publishable" asset (file, page, folder) and has publishable destinations, the trigger attempts to un-publish the asset (and all child assets if it's a folder) from all destinations prior to removing it from the system.
Implementation
Declaration
Usage
Parameters
There are two parameters that can be set when calling the trigger on an action: authorizing-user and authorizing-type.
Authorizing-Type 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.
If authorizing-type is not set, the default value will be workflow owner (the user that started the workflow).
**Note - the Unpublish and Delete trigger cannot use the "system" user options, as the trigger requires a real username to be used to authorize deletion that occurs before unpublish.
Authorizing-type can take a value of "current-step-owner," "system," or "user."
- current-step-owner - the user assigned to the step that calls the trigger
- user - a specified user
Authorizing-User Parameter
This parameter is used if 'user' is selected as the authorizing-type (in the parameter above). This parameter value can be any valid user name.
**Note - Authorizing-user will only be used if the authorizing-type parameter is set to the value of "user," rather than "current-step-owner."
If you were to use both the "authorizing-type" and "authorizing-user" parameters, your xml would look like this:
The following is the default Delete workflow distributed with the software with the DeleteAndUnpublish trigger used in place of the Delete trigger.

