Use a Comala workflow trigger event to publish a page

Overview

Comala Publishing integration with Comala Document Management for Cloud publishes a page on the transition to the final state in the applied workflow. However, you can use a workflow trigger event to publish a page.

cpc_publishtrigger_graphic.png

In this instance, you need to have the following installed

You must have

  • added a target space for the published content in the space settings of the draft space

  • an active Comala workflow on the draft page content that includes a workflow trigger that contains the publish-page action

  • view and edit permission for both the draft space and the target space for publishing

The default integration automatically publishes a page when the applied workflow transitions to the workflow’s final state, BUT when a publish trigger is added to the workflow to publish the page on a different workflow event, a transition to the workflow final state (if present) does not publish the page.

A page in any state can also be published using the standalone publishing option.

Adding a trigger event to publish a page

If a user wants to publish using a different workflow event than "when reaching the workflow final state" the user can edit a custom workflow and add a JSON markup for a trigger using workflow builder

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

We can apply this workflow to a page in a draft space Human Resources Draft. Comala Publishing publishes and syncs the document on a workflow transition to the Second-Publish state.

You can edit the workflow to add the following trigger markup. This trigger publishes a page on a transition of the applied workflow to the First-Publish state.

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


The trigger markup can be added to a custom workflow using the Comala Document Management visual editing tool workflow builder.

Once the updated workflow with the trigger is added and applied, the content is published to the target destination space on each occurrence of the trigger event, which is the transition to the First-Publish state.

On the page, the workflow popup allows you to approve the content to action the workflow transition to the First-Publish state.

The workflow publish-page trigger action occurs when the workflow state changes.

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

When a publish-page trigger is added to a workflow, a publish action on the workflow transition to the final state does not occur. In our example, the Second-Publish state is the final state and a transition to the Second-Publish state would not cause the page to be published.

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

Although a Comala Document Management family of apps workflow is applied to pages and blog posts, Comala Publishing only publishes page content. The Comala Publishing app ignores any blog post for publishing.

Related Links