Cloud Migration Resources
Planning a Cloud migration? These resources can help you get started:
→ Comala Document Management Cloud features – Review Cloud features and understand key differences between DC and Cloud.
→ Migration support from Appfire – Learn how we can help you migrate smoothly.
Add workflow review information to a header for inclusion in a page export
Overview
In some documentation management systems, you can be required to print documents (the Confluence page) with all details of the workflow approval embedded in the export. This might be part of a compliance need, such as a records retention policy that requires storing PDFs of approved project artifacts. You can use the workflow to add a page header or footer on the page with information from the approval metadata.
Workflow example
This example workflow uses the pagefooter macro to add content to the page.
{pagefooter:visibility=all}
----
h1. Approval status
|| Document Status |{pagestatus}|
|| Approved By |{get-metadata:approvedby}|
|| Approval Date/Time |{get-metadata:approveddate}|
|| Approval Comment |{get-metadata:approvalcomment}
{pagefooter}The workflow state when the page is exported is displayed using the pagestatus macro. Workflow approval information is retrieved using the get-metadata macro and displayed.
The metadata used in the footer can be created using a pageapproved event trigger.
{trigger:pageapproved|approval=Review}
{set-metadata:approvedby}@Review>approvers>wiki-link@{set-metadata}
{set-metadata:approveddate}@datetime@{set-metadata}
{set-metadata:approvalcomment}@approvalcomment@{set-metadata}
{trigger}The trigger uses several set-metadata macros to create the metadata whose values are retrieved and displayed in the page footer.
approvedby
approveddate
approvalcomment
Each set-metadata macro sets the value using a value reference that holds information related to the approval
@Review>approvers>wiki-link@- users who approved the Review approval, displayed as a wiki-link@datetime@- Confluence metadata for date and time of the approval event@approvalcomment@- Comala metadata with the details of the last approver comment
The values are updated each time the workflow approval is completed.
The full example workflow markup is below:
{workflow:name=Approval in Footer}
{pagefooter:visibility=all}
----
h1. Approval status
|| Document Status |{pagestatus}|
|| Approved By |{get-metadata:approvedby}|
|| Approval Date/Time |{get-metadata:approveddate}|
|| Approval Comment |{get-metadata:approvalcomment}
{pagefooter}
{state:In Progress|approved=Approved|taskable=true}
{approval:Review|assignable=true}
{state}
{state:Approved|final=true|updated=In Progress|hideselection=true}
{state}
{trigger:pageapproved|approval=Review}
{set-metadata:approvedby}@Review>approvers>wiki-link@{set-metadata}
{set-metadata:approveddate}@datetime@{set-metadata}
{set-metadata:approvalcomment}@approvalcomment@{set-metadata}
{trigger}
{workflow}If the page is in a draft workflow state when it is exported, the last approval information is included in the footer. However, the current draft workflow state is the displayed value for the Document Status in the footer.
See also
Need support? Create a request with our support team.
