Transitions
Transition types
Transitions cause the workflow to move from one state to another state.
state transitions are added to a workflow state and can be content change transitions or user state selection transitions
workflow event trigger transitions can be used to listen for events and action a transition from one state to another
a transition is only from the current state to another state (the destination state)
State transitions are
state selection transitions including the submit (single destination state); the select transition (destination state chosen from one or more states); no selection allowed and All states (select one of any of the states)
state content change transitions including include content review transitions (approved and rejected); content update transition (updated), content expiry transition (expired); tasks completed transition
A state select transition option will be displayed in the workflow popup on the page.
If a content review has been added to the state, the popup will display the Approve and Reject buttons for the approval.
Other state content transitions will be displayed in the workflow builder visual flowchart diagram.
More than one transition type may be added to a state but a state selection transition cannot be used in a state with a content review (approval).
Event trigger transition
An event trigger transition listens for a workflow event (for example pagecreated
, pageapproved
, labeladded
) and uses a macro (for example the state-selection
or approve-page macro
) to action the transition.
Event trigger transitions are displayed as workflow Rules in workflow builder. This transition is not displayed in the workflow builder visual flowchart diagram.
Destination states
For different types of workflow transition the destination state can be selected by a user or added by the workflow.
state selection transitions - user selection of the destination state can be set to be a single state or a choice of one or more of the states in the workflow
content change transitions - the destination state is determined by the workflow and the content change
event trigger transitions - - the destination state is determined by the workflow event trigger
The default transition for a new state is to allow the user to select any other state in the workflow using the workflow popup.
Transition events
When a transition occurs it is viewed by the workflow as an event. The workflow events for transitions include
pagestatechanged
newsstatechanged
statechanged
Adding a state transition to a workflow
Use the markup editor or workflow builder to add a select transition or a content transition for a state.
In workflow builder you can easily add a transition from a workflow state using the transitions editor.
The Approved and Rejected transitions for a content review are only available in the transitions editor after an approval has been added to the state.
The state must have
The Approved and Rejected transitions will only be available in workflow builder if the state has an approval.
Tip: you can view state diagrams using the workflow builder.
Adding an event trigger transition to a workflow
Transitions using an event trigger can also be added to a workflow. The trigger can be set to listen for a specific workflow event. The trigger must be added as markup using either the markup editor or the workflow builder.
In workflow builder, add the trigger by copying and pasting the trigger markup into the workflow editor.
Note that a transition using an event trigger will not be displayed in the workflow builder visual workflow diagram.