Versions Compared

Key

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

Overview

One or more trigger actions can be set for a named event in the workflow
Table of Contents
minLevel1
maxLevel6
outlinefalse
typeflat
separatorpipe
printabletrue

Overview

You can use the change-state action in a trigger to change the workflow state automatically. For example, it can be used in an on-reject event trigger to fast-track a single rejected decision when multiple reviewers are assigned to an approval.

When the workflow trigger event occurs, the trigger checks that any required conditions are met, and if they are met, the "change-state" action forces a change of the state.

"change-state"

Excerpt

The trigger action "change-state" causes

a change of

the state to change to the specified state if the provided parameters are valid.

  • action (change-state)

  • state (string) ❗️ State to move into

  • ❗️ indicates a mandatory parameter - the "state" parameter and its
      • state❗️ destination workflow state for the action

        • state must be a state in the workflow

        • state names are case-sensitive


    ❗️ Mandatory parameter

    state parameter

    • state parameter must be included with a valid value for the destination state

    must be added for the trigger action

    Example trigger code

    Code Block
    "triggers":
    [
    	{"event": "on-change-state",
    	"conditions":
    	[
    		{"final":true}
    	],
    	"actions":
    	[
    		{"action": "change-state",
    			"state": "
    Review
    Archive"}
    	]}
    ]
    InfoIf adding the JSON trigger using workflow builder there is no need to include the opening "triggers": JSON markup notation, it is added automatically by workflow builder

    The example trigger listens for the workflow's change of state to the final state and immediately moves the workflow to the Archive state.

     The destination state must be included

    for
  • JSON Triggers

  • JSON Trigger events

  • JSON Trigger conditions

  • Add a JSON trigger using workflow builder

  • JSON Triggers in bundled workflows

  • Multiple JSON Triggers in a custom workflow

    in the "change-state" action.

    Trigger actions

    Child pages (Children Display)
    pageJSON Trigger actions

    Related Pages

    Another use of the trigger action is to move from the workflow Review state, which contains an approval, immediately on a reviewer rejection, to the Editing state. This can be used to fast-track a single rejected decision, for example, when multiple reviewers are assigned to an approval.

    Code Block
    "triggers":
    [
    	{"event": "on-reject",
    	"conditions":
    	[
    		{"state":"Review"}
    	],
    	"actions":
    	[
    		{"action": "change-state",
    			"state": "Editing"}
    	]}
    ]

    Related pages