/
Use a Comala workflow trigger event to publish a page



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 content using a Comala workflow trigger event.

The publish-page trigger gives you granular control over when and how pages are published. The workflow trigger can be linked to a specific workflow event, allowing you to automatically publish a page at a particular point in your workflow.

cpc_publishtrigger_graphic.png

You can add one or more page-publish triggers to a workflow, allowing you to publish a page at several points in your process.

Pages can also be published using a Comala workflow and Comala Publishing when an applied workflow transitions to the final state. Adding a publish-page workflow trigger to a workflow with a final state publishes the page on the publish-page trigger event and 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

You must have

  • added a target space for the published pages in the space settings of the source space

  • an active Comala workflow on the source page content

  • the workflow must include a workflow trigger that contains the publish-page action

Adding a trigger event to publish a page

Comala Publishing, by default, publishes a page when an applied workflow reaches the final state in the applied workflow. 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

If you don't want both publishing actions to occur, you must edit the workflow and remove the final attribute from the final state.

In the workflow below, the Second-Publish state is the workflow final state.

We can apply this workflow to a page in a source space: Human Resources Draft. When it transitions to the workflow final state, the Second-Publish state, Comala Publishing publishes and syncs the page.

If you want to publish at other stages of the documentation process, you must edit a custom workflow to add the workflow trigger containing the publish-page trigger action.

You can use the visual editing tool in the workflow builder to add the workflow trigger.

You can also add the trigger as JSON code using workflow code editor:

[{"event": "on-change-state", "conditions": [ {"state": "First-Publish"} ], "actions": [ {"action": "publish-page"} ] }]

The workflow trigger above:

  • listens for a workflow event - a change in the workflow state

  • checks that the conditions 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 publish-page action

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 publish-page trigger action occurs when the workflow state changes.

The page is published in our configured target space, Human Resources Published.

Details of Comala workflow trigger events and the publish-page trigger action are available in the Comala Document Management product documentation:

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