state-selection macro
Overview
The state-selection
macro adds one or more direct state transition buttons to the workflow popup.
Where to use it?
Optional.
One or more state-selection
macros can be added to a state macro
A state-selection cannot be used when the state
includes an approval macro.
Parameters
Parameter | Required | Default | Notes |
---|---|---|---|
|
| Comma-delimited list of states to display in the current state. All states listed must be defined with a Filter by labelThere are no items with the selected labels at this time. | |
|
| Set the conditions that have to be met in order to change the state. If no conditions are set, then any user who has permission to see draft versions can change the state. Filter by labelThere are no items with the selected labels at this time. |
Events
The following Events arise from state transitions:
statechanged
pagestatechanged
newsstatechanged
Example
{workflow:name=Example}
{state:In Progress}
{state-selection:states=Review,Cancelled}
{state}
{state:Cancelled}
{state}
{state:Review}
{state}
{state:Published}
{state}
{workflow}
When using more than one state-selection macro can add each one with a different condition.
{workflow:name=Example}
{state:In Progress}
{state-selection:states=Review,user=user1}
{state-selection:states=Review, Cancelled,user=user2}
{state}
{state:Cancelled}
{state}
{state:Review}
{state}
{state:Published}
{state}
{workflow}
In the example, for the destination state for the transition:
user1
can only select the Review stateuser2
can only select the Review or the Cancelled state
Need support? Create a request with our support team.