You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Legacy Workflows Documentation

Looks like you followed an old link. Comala Workflows is now Comala Document Management.

Please access our latest documentation here Welcome to Comala Document Management

Documentation for other versions of Comala Workflows are available too.

(info) This space is no longer being updated.

Purpose

The state macro is used to define a state in a workflow. Every workflow requires at least one state macro. State macros are used to automatically set tasks and approvals on a page.

Syntax

{state} Syntax
{state:state_name[|approved=approved_state][|rejected=rejected_state][|updated=updated_state][submit=submitted_state][|expired=expired_state][|duedate=ISO8601_duration][|completed=completed state][|final=true/false][|hideselection=true/false][|taskable=true/false][|hidefrompath=true/false]}
   <None or one state-selection macro>
   <None, one or more approval macros>
   <None, one or more task macros>
{state}

Parameters

Parameters

Mandatory

Default

Description

unnamed first parameter
or name

Yes

 

Name of the state. Names must be unique withing a state macro and can use any character set supported by Confluence expect the special characters used by the workflow syntax and Confluence (e.g. {. |}, ,|, etc.).

approved

No

 

The named state if all the defined approvals are approved.

rejected

No

 

The named state if all the defined approvals are rejected.

updated

No

 

The named state if the page is updated (edited).

submit

No

 

The named state if the page is submitted (via the Accept button). Only applicable if there are no approvals in the state.

expired

No

 

The named state, if the page expires based on duedate time range. See duedate.

completed

No

 

The named state, if all the tasks in the state are completed

final

No

false

If set to true, when a page or blog post reaches this state, its version is marked as Published.

description

No

 

The description to be shown in the page's state box.

hideselection

No

false

By default, if rejected, approved, updated, submit, expired or completed parameters are not set, then the engine will allow changing the state to any other state. If this value is set to true then no state selections are allowed. See also state-selection.

taskable

No

false

Whether or not tasks can be manually defined in this state via the Tasks button.

duedate

No

 

Duration of time before the state expires following the ISO 8601 standard for duration. For more details, please see Duedate below.

hidefrompathNofalseIf set to true this state will be hidden from the progress tracker for the workflow.

macro's body

No

 

Can be empty, the state-selection macro, or a combination of task and/or approval macros.

State Transition

A page's state transitions based upon on of the parameters above (for example, approvals given or rejected, tasks completed, expiration date, etc.), or alternatively, be changed in a {trigger} macro using the {set-state} macro.

Duedate

Some examples of duedate parameter values:

Duration

Value to use

1 year

P1Y

1 month

P1M

1 day

P1D

1 hour

PT1H

1 minute

PT1M

These values can be combined to create expiration date of any duration, such as P1DT12H15M for a duration of 1 day, 12 hours and 15 minutes.

Examples

The code below defines a simple four-state workflow with three approvals and creates the following chart:

{workflow}
    {state:Draft|approved=For Review}
         {approval:Author}
    {state}
    {state:For Review|approved=To Publish|rejected=Draft}
         {approval:Reviewer}
    {state}
    {state:To Publish|approved=Published|rejected=For Review|final=true}
         {approval:Editor in Chief}
    {state}
    {state:Published}
    {state}
    {workflowproperties:chart|rankdir=LR|size=8,8}
{workflow}
  • No labels