Overview
In addition to standalone publishing of content using Comala Publishing you can allow your editors to publish a single page or blog post from a source space using a Comala Document Management custom workflow with an added workflow trigger.
The workflow trigger listens for a workflow event, for example, a change of workflow state; a page approval or an expiry of a state. On this event, the publish-page action macro in the workflow trigger publishes the page or blog post.
Requirements
In the instance to set up different space publishing using a Comala workflow you need
the Comala Publishing app installed and enabled
the Comala Document Management app
You must have
added a target space for the published content in the space settings of the source draft space
an active Comala Document Management workflow on the content
added a trigger with the publish-page action macro to the applied workflow
view and edit permission for both the source draft space and the target space for publishing
A space administrator can also configure the publishing dashboard to only publish the latest approved workflow final state version of a page or blog post with an applied workflow when publishing the whole space using the space publishing dashboard Publish option.
Workflow trigger
The publish-page trigger can be configured to listen to a workflow event.
This event can be a state transition - the statechanged
event. Events can be filtered to be constrained to a specific occurrence of the event - the statechanged
can be filtered to a specific destination state. For example, in a workflow with a Published state, state=Published
.
{trigger:statechanged|state=Published} {publish-page} {trigger}
The transition to the Published state can be configured to the destination state for an approved transition for a workflow approval. Approving the page or blog post using Approve button in the workflow popup transitions the workflow and publishes the document to the target space. In this example, the Published state is the workflow final state.
If the Published state is set as the workflow final state, this allows your page editors to publish the latest approved final state version and be used together with configuring whole space publishing to use the workflow final state version.
You may want to disable the option to Publish a single page for the space when using a Comala workflow to publish a page.
Adding a trigger to a workflow
A trigger can be added to a custom workflow as markup in either the Comala Document Management markup editor or the visual editing tool workflow builderr.
The trigger can be set to listen for one workflow event. These events include
statechanged
pageapproved
stateexpired
The You can add separate triggers when you need to update page metadata, such as the page label, and include it on the published page: The order in which triggers for the same workflow event are added to the workflow determines the order in which they are executed. The label is added on the state change to Published in the first trigger. The page is then published using the second trigger. Here’s a simple example if you want to publish documents to a different space at several stages in your documentation process to stage the release of content: Both triggers in the example publish the page in the same Confluence target space. You cannot publish to different spaces unless you manually reconfigure the Comala Publishing app. However, you can configure the second publishing action to publish to a remote space using the Comala Remote Publishing app and the remotepublish-page action macro. For more details, see Remote-space Publishing.Basic examples
{workflow:name=Different-space publishing}
{state:Editing|submit=Review}
{state}
{state:Review|approved=Published|rejected=Editing}
{approval:Review}
{state}
{state:Published|update=Editing|final=true}
{state}
{trigger:statechanged|state=Published}
{publish-page}
{trigger}
{workflow}
final=true
parameter on the Published state is not required for different-space publishing using the publish-page
macro, however it helps to clarify which versions of content are published from the source space.{workflow:name=Different-space publishing}
{state:Editing|submit=Review}
{state}
{state:Review|approved=Published|rejected=Editing}
{approval:Review}
{state}
{state:Published|update=Editing|final=true}
{state}
{trigger:statechanged|state=Published}
{set-label:published}
{trigger}
{trigger:statechanged|state=Published}
{publish-page}
{trigger}
{workflow}
{workflow:name=Different-space publishing}
{state:Editing|submit=Review}
{state}
{state:Review|approved=First Publishing|rejected=Editing}
{approval:Review}
{state}
{state:First Publishing|approved=Second Publishing|rejected=Editing}
{approval:Final Review}
{state}
{state:Second Publishing|update=Editing|final=true}
{state}
{trigger:statechanged|state=First Publishing}
{set-label:first}
{trigger}
{trigger:statechanged|state=First Publishing}
{publish-page}
{trigger}
{trigger:statechanged|state=Second Publishing}
{set-label:second}
{trigger}
{trigger:statechanged|state=Second Publishing}
{publish-page}
{trigger}
{workflow}
An advanced Comala Document Management workflow can be created to manage the publishing process, for example, to include checking the success of queued publishing actions, setting and using trigger custom events, and error handling.
Related pages
Atlassian Marketplace