Overview
The state editor in the workflow builder visual editor is used to add or edit a state for a custom workflow.
You can use the state editor in the visual editor workflow panel to:
change the state name
add or edit the state description
set an expiry date for the state
set the state as the
final
state in the workflow
You can also add and edit transitions and approvals for the state using the state editor.
A bundled workflow template must be copied to create an editable custom workflow. The workflow copy is created and saved with a unique new name. An original bundled workflow cannot be overwritten.
Accessing the state editor panel
In the space document management dashboard open the visual editor for a custom workflow.
The bundled workflows cannot be overwritten in the space document management dashboard. A duplicate can be created using the Actions menu option and the copy customized in the space.
In visual builder
choose a state name in the workflow panel (or a state lozenge in the navigator panel)
This displays the state editor for the state in the left-hand workflow panel.
The state editor displays
the state name
the number of Transitions and the number of Approvals for the state
Choose
Transitions to add new transitions or edit the existing transitions from the state.
Approvals to add new approvals or edit the existing approvals for the state.
Any state workflow parameters are also displayed as a lozenge. In our workflow, the Approved state is configured as the final state in the workflow and includes a final lozenge.
Editing a state
Mouse over the state name to display a pencil icon
click on the pencil icon to edit the state
You can also choose the State button in the navigator panel to edit the current state displayed in the left-hand workflow panel.
Use the text boxes to edit the state details.
state Name
state lozenge Colour using the color picker or by adding an appropriate hexadecimal color code
set a Due Date (expiry date) period or specific Due Date using the dropdown options
set the state attribute to define it as the
final
state in the workflow
There should only be one final state in a workflow.
Save any changes to the state by choosing Apply.
When the workflow is applied to a page or blog post
the due date period is only set when a workflow transition occurs into the state on which the expiry has been added
If the state name is changed this may require an initialization of any existing applications of the workflow to transition to the new state, either manually on each individual page using the workflow popup or by a space administrator in the space Document Management dashboard.
Initializing the workflow removes any states that have become confused.
Adding a state
To add a new state to the workflow choose +Add State in the workflow panel (or +State button in the navigator panel).
Use the Add a state dialog box to
add a new named state
configure the new state attributes
A new unique state name must be added to activate the Add button in the Add a state dialog box
After adding the new state name, you can edit attributes for the state.
state Description
state indicator circle and state lozenge Colour
set the state as the
final
state in the workflow
A workflow can only have ONE final
state.
Choose Add to add the state to the workflow in the visual editor.
Choose Save to save the added state to the workflow in the visual editor.
Edits are not saved to the workflow until you choose Save in the visual editor. Exiting the workflow builder visual editor without saving causes your changes to be lost.
You must save a custom workflow with a unique name. An error message is displayed.
Choose the back arrow to the left of the new state name to return to the workflow panel.
Select the current workflow name to open the Edit Workflow panel.
If required, edit the workflow name to create a new unique name.
choose Apply
Due date
The Due Date for the expiry of the content in the state can be set. This can be a period or a fixed date.
the Period can be set as Year(s), Month(s), Day(s), Hour(s), Minute(s) or Second(s) using the dropdown options
if a more complex due date period of time is required then the ISO_8601 format can be used for the duration string e.g. P6M5D is 6 months 5 days
Fixed Date will access a calendar to choose the day of expiry
a Value Reference can also be used to set the due date value. This can be a workflow parameter value
If a period is set, this is calculated from the date and time of transition into the state. It is reset each time a transition occurs to the new state.
Saving changes to the workflow
After adding a new state using the state editor, the new workflow state is
displayed in the visual workflow diagram in the visual editor
added as the last listed state workflow panel
added to the workflow code in the code editor
The new state has the default transition that lets you select any of the other states in the workflow. In this example, the new state Annual Review also has no transitions to it from any other state.
When a new state is added, the new state has no transitions displayed in the workflow builder transitions editor for the state. Use the state editor in workflow builder to add transitions.
Save the workflow in the workflow builder to add the updates to the workflow in the dashboard.
When a page with this applied workflow is viewed, the new state is displayed in the progress tracker in the workflow popup.
Moving a state in the workflow
The order of the states can be changed in the workflow panel by dragging and dropping the state in the workflow panel
Changes in the order are reflected
in a change in the visual workflow diagram displayed in the right-hand navigator panel
in the code editor
Moving a state in the visual editor workflow panel does not change any transitions to or from the state.
Deleting a state
For the state to be removed
open the state editor
choose Delete
An on-screen warning message is displayed.
choose Delete to confirm the state deletion
The state deletion removes
all approvals in the state and transitions from the deleted state
and transitions from other states to the deleted state
Removing the Review state from the copy of the Basic Approval Workflow leaves the workflow with
two states - Rejected and Approved
one transition - the approved transition from Rejected to Approved
Related pages
- Workflow builder navigator panel
- Workflow builder workflow panel
- Edit the workflow in workflow builder
- Edit, add and delete a state in workflow builder
- Add and edit state transitions in workflow builder
- Add and edit approvals in workflow builder