Overview
The {trigger}
macro listens for Events, then, after filtering and confirming any prerequisite requirements, performs the actions contained in the macro body.
Where to use it?
Optional.
One or more {trigger}
macros can be put in a {workflow}
macro.
Must be placed after the {state}
macro(s).
Parameters
Parameter | Required | Default | Notes | Ver |
---|---|---|---|---|
unnamed first parameter |
| The event to listen to – see: Events | ||
macro body | One or more actions to process when the trigger is activated – see: Actions | |||
| Optionally apply further conditions to filter events – see: Conditions | |||
| Required for all events relating to the {approval} macro. Filter to a specific Tip: If you have more than one {approval} with same name, you can also filter to a specific {state} using the
Content by label
There is no content with the specified labels | |||
|
| Only applies to
The primary use of this parameter is to perform one-time initialisation actions for a given piece of content. For example, on the first review of a piece of content you might want to send out additional emails, or set some metadata.
Content by label
There is no content with the specified labels | 3.0.1+ | |
|
| Only applies to The name of the label which was added or removed.
Content by label
There is no content with the specified labels | ||
|
| 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
Content by label
There is no content with the specified labels | ||
parameter |
The name of the parameter to monitor.
Content by label
There is no content with the specified labels | |||
|
| Only applicable to for the following events:
Content by label
There is no content with the specified labels | ||
|
| Should actions be queued?
If there is a chance that actions will take a long time to process, for example when remote publishing content, they should be queued so the end user doesn't have to wait for them to finish before continuing with thier work.
Content by label
There is no content with the specified labels | ||
|
|
Filter to a specific active {state} of the workflow. Note: Only a single state can be specified, and it can't be negated.
Content by label
There is no content with the specified labels | ||
|
| This setting is used to listen for the outcome of a custom event (set by the
Content by label
There is no content with the specified labels | ||
|
| If not specified, the trigger will listen for all tasks rather than a specific task. Filter to a specific
Content by label
There is no content with the specified labels | 3.2.5 |
Example
{workflow:Example trigger} {state:Editing|submit=Review} {state} {state:Review|approved=Published|rejected=Editing} {approval:Review} {state} {state:Published|final=true|updated=Editing} {state} {trigger:pageapproved|approval=Review} {set-message:style=success}This page has been approved!{set-message} {trigger} {trigger:pagerejected|approval=Review} {set-message:style=error}This page was rejected, please make requested changes.{set-message} {trigger} {workflow}
All examples
There is no content with the specified labels