Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Parameter

Required

Default

Notes

Ver

unnamed first parameter

(tick)(tick)

 


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:

  • Plain text
  • Can use any character set supported by your Confluence server – except some reserved characters
5.7+

Conditions

 



Optionally apply further conditions to filter events – see: Conditions


approval

(info)(info)


(info) (info) Required for all events relating to the {approval} macro.

Filter to a specific {approval} name.

Tip: If you have more than one {approval} with same name, you can also filter to a specific {state} using the state parameter.

Content by Label
showLabelsfalse
max6
showSpacefalse
sorttitle
cqllabel = "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 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
showLabelsfalse
max6
showSpacefalse
sorttitle
cqllabel = "macro-trigger" and label = "parameter-initial" and label = "example" and space = currentSpace()

3.0.1+

label

 



Only applies to labeladded and labelremoved events.

The name of the label which was added or removed.

Content by Label
showLabelsfalse
max6
showSpacefalse
sorttitle
cqllabel = "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

Content by Label
showLabelsfalse
max6
showSpacefalse
sorttitle
cqllabel = "macro-trigger" and label = "parameter-newevent" and label = "example" and space = currentSpace()


parameter(info)(info) 

(info) (info) Required for the pageparameterupdate event

The name of the parameter to monitor.

Content by Label
showLabelsfalse
max6
showSpacefalse
sorttitle
cqllabel = "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

  • true – process each individual Approve or Reject
  • false – wait until all reviewers agree on either Approve or Reject

Content by Label
showLabelsfalse
max6
showSpacefalse
sorttitle
cqllabel = "macro-trigger" and label = "parameter-partial" and label = "example" and space = currentSpace()


queue


false

Should actions be queued?

  • true – Yes, queue them
  • false – No, run them immediately

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
showLabelsfalse
max6
showSpacefalse
sorttitle
cqllabel = "macro-trigger" and label = "parameter-queue" and label = "example" and space = currentSpace()


state

(info)(info)

 


(info) (info) Required for the following events: pagestatechanged, statechanged or newsstatechanged

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
showLabelsfalse
max6
showSpacefalse
sorttitle
cqllabel = "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 an separate trigger macro). This setting can be used to handle error in actions (for example, failure of remote publishing).

Content by Label
showLabelsfalse
max6
showSpacefalse
sorttitle
cqllabel = "macro-trigger" and label = "parameter-success" and label = "example" and space = currentSpace()


task

(info)(info)

 


(info) (info) If not specified, the trigger will listen for all tasks rather than a specific task.

Filter to a specific {task} name.

Content by Label
showLabelsfalse
max6
showSpacefalse
sorttitle
cqllabel = "macro-trigger" and label = "parameter-task" and label = "example" and space = currentSpace()

3.2.5

Example

The workflow has two triggers. Each trigger is listening for a different approval event for the Content Review approval in the Review state.

  • a pageapproved event trigger
  • a pagerejected event trigger
Code Block
languagetext
themeRDark
{workflow:Example triggerTrigger Workflow}
   {state:Editing|submit=Review}
   {state}
   {state:Review|approved=Published|rejected=Editing}
      {approval:Content Review}
   {state}
   {state:Published|final=true|updated=Editing}
   {state}
   {trigger:pageapproved|approval=Content Review}
      {set-message:style=success}This page has been approved!{set-message}
   {trigger}
   {trigger:pagerejected|approval=Content Review}
      {set-message:style=error}This page was rejected, please make requested changes.{set-message}
   {trigger}
{workflow}


You can view and edit a workflow in workflow builder.

Image Added


In workflow builder, the trigger is added to the workflow using markup.

Image Added


Once added to the workflow each trigger is displayed as a non-editable workflow Rule

Image Added

To change a trigger you must edit the trigger markup.

All examples

Content by Label
showLabelsfalse
max500
showSpacefalse
sorttitle
excerptTypesimple
cqllabel = "macro-trigger" and label = "example" and space = currentSpace()

...

User Guide: