Versions Compared

Key

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

Overview

Use the on-approve event in a workflow trigger to listen for an approval approve event and execute one or more trigger actions.

By including a trigger condition, the approve event in a workflow trigger can be constrained to listen for the approval approve event in a named state in the workflow, the workflow final state, or the initial state.

Example “on-approve" event

Excerpt
Code Block
"triggers":
[
	{"event": "on-approve",
	"conditions":
	[
		{"state":"Review"}
	],
	"actions":
	[
		{"action":"change-state",
			"state":"Published"}
	]}
]
Info
If adding the JSON trigger using workflow builder visual builder there is no need to include the opening "triggers": JSON markup notation, it is added automatically by workflow builder.

The trigger action causes a change of state to the Published state.

  • "actions":[{ "action":"change-state", "state": "Published"}],

The trigger action occurs on the approve event but ONLY if the current state is the Review state

  • "conditions":[{"state":"Review"}],

If a JSON condition is present this can include one or more conditions but only ONE state condition can be used for each event

This example fast-tracks a change of workflow state when a single reviewer approve decision is made in the Review state.

Trigger events

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "jsontriggerevent" and space = currentSpace ( )