Versions Compared

Key

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

Table of Contents
maxLevel3
minLevel2
absoluteUrltrue
excludeOverview
typeflat
separatorpipe

Overview

Excerpt
hiddentrue

Transitions create the routes between states

Transitions cause the workflow to move from one state to another state. This page summarises the main types of transition.

Tip: You can view state diagrams using the Workflow inspector.

State selection

These transitions are triggered by users selecting a state from a drop-down list in the Workflow Popup.

Eventspagestatechangednewsstatechangedstatechanged – these events occur for all transitions shown on this page

See also: StatesAdministrator state override

All states

By default, each state can transition directly to all other states. Setting any other type of transition disables the default state selection. Options for all other states appear in the Workflow Popup.


Code Block
languagetext
themeRDark
{workflow:name=All states}
  {state:A}
  {state}
  {state:B}
  {state}
  {state:C}
  {state}
{workflow}


Macros{state}

Specific state(s)

The {state-selection} macro lists states which can be transitioned to, and in what order. Options for specified state names, in specified order, appear in the Workflow Popup.


Code Block
languagetext
themeRDark
{workflow:name=Specific state(s)}
  {state:A}
     {state-selection:states=C,B}
  {state}
  {state:B}
  {state}
  {state:C}
  {state}
  {state:D}
  {state}
{workflow}


Macros{state}{state-selection}

One state

The submit parameter limits transition to just one state. Option for the specified state appears in the Workflow Popup.


Code Block
languagetext
themeRDark
{workflow:name=One state}
  {state:A|submit=C}
  {state}
  {state:B}
  {state}
  {state:C}
  {state}
{workflow}


Macros{state}

No state

The hideselection parameter removes the default direct state transitions. No state options shown in the Workflow Popup.


Code Block
languagetext
themeRDark
{workflow:name=No state}
  {state:A|hideselection=true}
  {state}
  {state:B}
  {state}
  {state:C}
  {state}
{workflow}


Macros{state}

Content reviews

Similar to a state selection transition, but the focus is on reviewing content rather than choosing a state (the workflow determines which state to go to depending on outcome of the review).

The user chooses to Approve or Reject, and the workflow transitions to the appropriate state (as defined in the approved and rejected parameters). Approve and Reject buttons in the Workflow Popup.



Code Block
languagetext
themeRDark
{workflow:name=Content review}
  {state:A|approved=C|rejected=B}
     {approval:Review}
  {state}
  {state:B}
  {state}
  {state:C}
  {state}
{workflow}



Macros{state}{approval}{approve-page}{reject-page}{approve-children}{reject-children}

Eventspageapprovednewsapprovedpagerejectednewsrejectedpageapprovalassignednewsapprovalassignedapprovalunassigned

See also: ReviewsContent reviewsCustomise Approval Buttons

Expiry

States can be given an expiry date, after which a transition can occur.

The duedate parameter determines the expiry date, and the expired parameter specifies which state to transition to if the state expires whilst it is active. An expiry indicator appears in the Workflow Popup.



Code Block
languagetext
themeRDark
{workflow:name=State expiry}
  {state:A|duedate=P1W|expired=C}
  {state}
  {state:B}
  {state}
  {state:C}
  {state}
{workflow}




Macros{state}{set-state-expiry}

Eventsstateexpired

See also: Expiry DatesState expiry dateState expiry dates

Update

States can automatically transition should content be updated (edited).

The updated parameter specifies the state to transition to if the content is updated. If used on a state that has final=true parameter, the Workflow Popup will show a message about the publishing process, otherwise it will be empty.



Code Block
languagetext
themeRDark
{workflow:name=Content update}
  {state:A|updated=C}
  {state}
  {state:B}
  {state}
  {state:C}
  {state}
{workflow}



Macros{state}

Eventspageupdatednewsupdatedpagemovedattachmentschangedattachmentaddedattachmentupdatedattachmentremoved,attachmentversionremoved

See also: Publishing

Tasks

States can automatically transition should all workflow tasks be completed.

The completed parameter specifies the state to transition to when all tasks are completed. Tasks are listed in the Tasks popup.



Code Block
languagetext
themeRDark
{workflow:name=Task completion}
  {state:A}
  {state}
  {state:B|completed=C}
    {task:Complete to transition}
  {state}
  {state:C}
  {state}
{workflow}



Macros{task}{complete-task}

Eventstaskcreatedtaskassignedtaskcompletedtaskexpired

See also: TasksTasks PopupMake tasks disable a review

Page parameter - trigger

If using workflow parameters, a transition can be triggered when a user edits their value.

The edit=true parameter must be specified on the {workflowparameter} macro for this to work. The Workflow Popup, in state A, will show a message and button for editing the parameters. Once the parameters are set, the workflow will transition to state B.



Code Block
languagetext
themeRDark
{workflow:name=Parameter edit}
  {workflowparameter:test|edit=true}
    test
  {workflowparameter}
  {state:A}
  {state}
  {state:B}
  {state}
  {trigger:pageparameterupdate|parameter=test}
    {set-state:B}
  {trigger}
{workflow}



Macros{workflowparameter}{trigger}

Eventspageparameterupdate

See also: Value ReferencesWorkflow setup


Page parameter - required

A workflow parameter can be set as a required parameter in a state. This will prompt the end user to set a parameter value when moving into a new state via an approval or state submission selection.

Code Block
languagetext
themeRDark
{state:Reviewed|approved=Prod Review|rejected=Draft|requiredparams=pagefield1}
        {approval:Approval}
    {state}


The parameter must be setup as edit=true so a value can be set on an individual page.

Code Block
languagetext
themeRDark
{workflowparameter:pagefield1|description=Something related to the project|edit=true}



Macros{workflowparameter}{state}


Events

Any event can be used to trigger a {set-state} transition in the same way as the example above.

Content by Label
showLabelsfalse
max6
showSpacefalse
sorttitle
excerptTypesimple
cqllabel = "example" and label = "macro-trigger" and label = "macro-set-state" and label != "concept"

Events: Any event

See also: TriggersActions