...
The trigger
macro listens for Events, then, and performs the actions in the macro body after filtering and confirming any prerequisite requirements, performs the actions contained in the macro body.
Where to use it?
Optional.
...
can be added as markup in workflow builder
if added using the markup editor, the trigger(s) 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 | |
description
| | | The description for the trigger: | 5.7+ |
conditions | | | Optionally apply further conditions to filter events – see |
: Required for all events relating to the approval macro. |
Filter to a specific approval name. |
If Tip |
---|
You can filter to a specific state using the state parameter if you have more than one approvalwith the same name but in different states |
|
, you can also filter to a specific state using the state
parameter Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 6 |
---|
showSpace | false |
---|
sort | title |
---|
cql | label = "macro-trigger" and label = "parameter-approval" and label = "example" and space = currentSpace ( ) |
---|
|
| |
initial
| | false
| Only applies to statechanged event, for each page or blog post the workflow is applied to. true – only listen for the first time the workflow transitions to the state specified by the state parameter.
false – listen to every time the workflow transitions to the state specified by the state parameter.
|
The primary use of this This parameter is primarily used to perform one-time |
initialisation initialization 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. Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 6 |
---|
showSpace | false |
---|
sort | title |
---|
cql | label = "macro-trigger" and label = "parameter-initial" and label = "example" and space = currentSpace ( ) |
---|
|
| 3.0.1+ |
label
| | | Only applies to labeladded and labelremoved events. Value is the name of the label that was added or removed. Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 6 |
---|
showSpace | false |
---|
sort | title |
---|
cql | label = "macro-trigger" and label = "parameter-label" and label = "example" and space = currentSpace ( ) |
---|
|
| |
newevent
| | | 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 success set to true or false, depending on the outcome. Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 6 |
---|
showSpace | false |
---|
sort | title |
---|
cql | label = "macro-trigger" and label = "parameter-newevent" and label = "example" and space = currentSpace ( ) |
---|
|
| |
parameter
| | | |
Required for the pageparameterupdate event |
The name of the parameter to monitor. Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 6 |
---|
showSpace | false |
---|
sort | title |
---|
cql | label = "macro-trigger" and label = "parameter-parameter" and label = "example" and space = currentSpace ( ) |
---|
|
| |
partial
| | false
| Only applicable to |
for the following events: pageapproved , pagerejected , newsapproved, and newsrejected Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 6 |
---|
showSpace | false |
---|
sort | title |
---|
cql | label = "macro-trigger" and label = "parameter-partial" and label = "example" and space = currentSpace ( ) |
---|
|
| |
queue
| | false
| Should actions be queued? If |
there is a chance that actions will actions are likely to 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 their work. Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 6 |
---|
showSpace | false |
---|
sort | title |
---|
cql | label = "macro-trigger" and label = "parameter-queue" and label = "example" and space = currentSpace ( ) |
---|
|
| |
state
| | | |
Required for the following events: pagestatechanged
statechanged
newsstatechanged
|
Filter to a specific active state of the workflow. |
Only a single state can be specified |
, it Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 6 |
---|
showSpace | false |
---|
sort | title |
---|
cql | label = "macro-trigger" and label = "parameter-state" and label = "example" and space = currentSpace ( ) |
---|
|
| |
success
| | true
| This setting is used to listen for the outcome of a custom event (set by the newevent parameter in a separate trigger macro). This setting can |
be used to handle an error in an action (for example, failure of remote publishing). Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 6 |
---|
showSpace | false |
---|
sort | title |
---|
cql | label = "macro-trigger" and label = "parameter-success" and label = "example" and space = currentSpace ( ) |
---|
|
| |
task
| |
| Info |
---|
If not specified, the trigger will listen for all tasks rather than a specific task. |
Filter to a specific task name. Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 6 |
---|
showSpace | false |
---|
sort | title |
---|
cql | label = "macro-trigger" and label = "parameter-task" and label = "example" and space = currentSpace ( ) |
---|
|
| |
Example
The workflow has two triggers with , each trigger is listening for a different approval event for the Content Review approval in the Review state.
...
Once added to the workflow, each trigger is displayed as a non-editable workflow Rule.
...
Rules simply displays display the event and event filter for each trigger. To change a trigger, you must edit the trigger markup.
...