Purpose
The trigger macro is used to define a set of actions to be executed when a specified event occurs. These actions are defined in the body of the macro using one or more action macros.
Syntax
{trigger:event_name[label=label_name][|approval=approval_name][|state=state_name][task=task_name][|partial=true/false][initial=true/false][|queue=true/false][|newevent=newevent_name][success=true/false][|} <One or more action macros> {trigger}
Parameters
Parameters | Mandatory | Default | Description |
---|---|---|---|
unnamed first parameter | Yes |
| Defines the specific event for which the trigger is activated. See Events for a list of valid events. |
| No |
| The name of the added or removed label for the |
| Yes(1) | The name of the affected approval. | |
| Yes(2) |
| The state to which the page or news/blog-post has changed |
| No(3) |
| The name of the task linked to the task event. |
| No |
| Sets whether or not an event is valid for a partial approval (used only for |
| No |
| When used with |
| No |
| Whether or not to queue the actions. Used when the actions could take a long time to execute (for example, when publishing content). |
| No |
| If this value is set, then a custom event identified by this value will be published when the actions are executed, and will contain a flag |
| No |
| This setting is used to listen for the outcome of a custom event (set by the |
parameter | Yes(4) | The name of the workflow page parameter being updated. | |
No |
| Any other additional conditions for the trigger. | |
Table Notes
|
Events
Events | Description |
---|---|
| Fires when a label is added or removed. |
| Fires when a page is created or updated. |
| Fires when a page is moved. |
| Fires when a news/blog-post is created or updated. |
| Fires when a page is approved or rejected.(1)(2) |
| Fires when a news/blog-post is approved or rejected.(1)(2) |
| Fires when a page's state changes. |
| Fires when a news/blog-post's state changes. |
| Fires each time an attachment is added, updated, or removed on a page or news/blog-post |
| Fires each time an attachment is added on a page or blog-post. |
| Fires each time an attachment is removed on a page or blog-post. |
| Fires each time an attachment is updated on a page or blog-post. |
| Fires when a task is created. |
| Fires when a task is assigned. |
| Fires when a task is completed. |
taskexpired | Fires when a task expires. |
| Fires when a page approval is assigned.(2) |
| Fires when a blog post approval is assigned.(2) |
| Fires when an approval is unassigned.(2) |
| Fires when the specified state expires.(2) |
pageparameterupdate | Fires when a workflow page parameter value is updated(3). (See edit=true option on the workflowparameter macro.) |
Table Notes
|