Using Comala Document Management Placeholders
If you're using Comala Document Management to add workflows to your pages, you can use multiple placeholders to refer to specific Comala Workflows status information of your root page or the workflow assigned to it.
Available placeholders for the page status
For the page state the following placeholders are available:
Placeholder | Type | Description |
---|---|---|
$currentState.Name | String | The name of the current state of the page. This placeholder returns the same value as |
$currentState.Description | String | The description of the current state of the page. |
$currentState.ContentVersion | Integer | The page revision that the state refers to. |
$currentState.Published | Boolean | Returns |
$currentState.UserName | String | The name of the user who assigned the current status. |
$currentState.Date | java.util.Date | The timestamp of the date the page got the current state. |
$currentState.Comment | String | The note inserted on the status change. |
The placeholders must be defined in your template using Velocity. For example:
Returns the user name of the Confluence user who assigned the current state to the page
#set($currentState = ${workflowsHelper.stateForPage($page.Id)})
#if ($currentState)
$currentState.UserName
#end
If you want to refer to the last published state, you have to change your variable:
Returns the user name of the Confluence user who assigned the last published state to the page
#set($publishedState = ${workflowsHelper.stateForPage($page.Id, true)})
#if ($publishedState)
$currentState.UserName
#end
If you've defined to only export pages in Comala Workflow status Publish:
Returns the user name of the Confluence user who assigned the state to the last published page
#set($state = ${workflowsHelper.stateForPage($page.Id, $isPublishedOnly)})
#if ($publishedState)
$currentState.UserName
#end
Available placeholders for the workflow
Besides page specific information you can also use workflow specific placeholders:
Placeholder | Type | Description |
---|---|---|
$workflow.Name | String | The name of the current workflow. |
$workflow.Description | String | The description of the current workflow. |
$workflow.LabelName | String | |
$workflow.Active | Boolean | Returns true if the workflow is active. |
The placeholders must be defined in your template using Velocity. For example
Returns the description of the current workflow
#set($workflow = ${workflowsHelper.workflowForPage($pageId)})
#if ($workflow)
$workflow.Description
#end
If you want to refer to the active workflow:
Returns the description of the current active workflow
#set($workflows = ${workflowsHelper.activeWorkflowsForPage($page.Id)})
#foreach($workflow in $workflows)
$workflow.Description
#end