This documentation relates to the 5.2 release of Comala Workflows

 Documentation for other versions of Comala Workflows is available too.

Overview

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.

{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.

{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.

{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.

{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.


{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.


{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.


{workflow:name=Content update}
  {state:A|updated=C}
  {state}
  {state:B}
  {state}
  {state:C}
  {state}
{workflow}


Macros{state}

Eventspageupdatednewsupdatedpagemovedattachmentschangedattachmentaddedattachmentupdatedattachmentremoved

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.


{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

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.


{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

Events

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

Events: Any event

See also: TriggersActions