Use a Comala workflow trigger event to publish a page
Overview
You can use Comala Publishing with Comala Document Management for Confluence Cloud to publish a page using a Comala Document Management workflow trigger event.
The Publish Page workflow trigger action gives you granular control over when and how pages are published, providing flexibility in publishing and automating publication at different workflow stages.
The Publish Page action in a workflow trigger lets you publish a page based on a specified event. When one or more Publish Page workflow triggers are added, this
supports flexible publishing, automating publication at different workflow stages
does not disable publishing when transitioning to the final state
To prevent duplicate publishing of the same page version, you should avoid using the Publish Page trigger action on a transition to the final state.
You can make the single-page publishing option inactive in the space to prevent a page editor from publishing the page using the Publish option on the page.
Prerequisites
You need to install
the Comala Publishing app
You must have
added a target space for the published pages in the space settings of the source space
an active Comala Document Management custom workflow on the source page content
added a workflow trigger with the Publish Page trigger action to the active custom workflow
Adding a trigger event to publish a page
You can use a trigger to publish the page at a different point in the documentation process by editing the workflow to add a trigger using the workflow builder visual editor or code editor.
Comala Publishing, by default, publishes a page when an applied workflow reaches the final state in the applied workflow. If you don't want this publishing action to occur, you must edit the workflow and remove the final attribute from the final state.
In the workflow shown in the workflow visual editor, the Published state is the workflow final state.
We can apply this workflow to a page in a source space, and when it transitions to the workflow final state, the Published state, Comala Publishing automatically publishes and syncs the page to the target space.
If you want to publish at another stage of the documentation process, you must edit a custom workflow to add one or more workflow triggers containing the Publish Page trigger action.
You can use the Add Trigger option in the visual editing tool to add a workflow trigger.
The workflow trigger above:
listens for a workflow Event - a change in the workflow state
checks that the Condition for the event are met - the change of state is to the First Publish state
actions the publish and sync of the page using the added Publish Page action
You can also view the added trigger in the Comala Document Management app code editor:
How it works
In our example, the workflow state dialog box on the page with the applied workflow lets you approve the page to initiate the workflow transition to the First-Publish state.
The workflow Page Publish trigger action occurs when the workflow state changes.
The page is published and synced in our target space.
In our workflow, the page is also published and synced when it transitions to the final state, Published.
Adding a workflow trigger with a Publish Page action does not prevent the automatic publishing of a page when the workflow transitions to its final state.
It is recommended that you do not use a Publish Page trigger action on a transition to the final state; this can cause duplicate publishing of the same page version and can cause errors. You can also choose to use a workflow without a defined final state and only publish using one or more added workflow triggers.
Workflow triggers
You can find further information on the available workflow triggers in the Comala Document Management product documentation:
an overview of triggers
a list of trigger events
details of the Publish Page trigger action
You can also find further details on how to add a workflow trigger:
Although the Comala Document Management family of apps can be applied to pages and blog posts, Comala Publishing can only publish page content. The Comala Publishing app ignores any blog post with an applied workflow.
Related Links
Comala Publishing
Comala Document Management
Need support? Create a request with our support team.