set-state macro

Overview

The {set-state} macro is used to immediately transition to a designated state – either on the current page, parent page or child pages – regardless of how transition to that state would normally occur.

Where to use it?

Optional.

One {set-state} macro can be put in a {trigger} macro.

Parameters

Parameter

Required

Default

Notes

Ver

unnamed first parameter
or state

(tick)


The state to transition to.

Note: It must be defined in the workflow.


comment



Comment to associate with the state change:

  • plain text
  • can use any character set supported by your Confluence server – except some reserved characters.

page


 current page

If specified, the state will be changed on the parent page or child pages, not the current page:

  • @parent – Change state of parent page
  • @children – Change state of child pages

Obviously, this parameter only works on pages, not blog posts.



(warning) The set-state macro will not work if the page is using also using the K15t Scroll Versions app.

Events

The following Events are associated with state transitions:

  • statechanged
  • pagestatechanged
  • newsstatechanged

Example

In this example, entering state B causes an immediate transition to state C.

{workflow:Instant transition}
   {state:A|submit=B}
   {state}
   {state:B}
   {state}
   {state:C}
   {state}
   {trigger:statechanged|state=B}
      {set-state:C}
   {trigger}
{workflow}

All examples

See also

Workflow Authoring Guide: