This documentation relates to the 4.3 release of Ad hoc Workflows

 Documentation for other versions of Comala Workflows is available too.

Purpose

The remotepublish-page macro is used within a trigger macro to publish (copy) the current page to another Confluence server. This macro requires that the access to the remoter server has been previously configured via the Remote Publishing configuration tab under the Space Admin tab. Also, API access must be enabled on the remote server. See Remote Publishing Workflow for details.

Caution!

Remote publishing requires the Remote Publishing Plugin

Syntax

{remotepublish-page} Syntax
{trigger[|state=state_name][|newevent=newevent_name]}
{remotepublish-page:config_name}
{trigger}

Parameters

Parameters

Mandatory

Default

Description

config_name

Yes

Used to reference a remote publishing configuration. The configuration defines the remote server URL, destination space, user name and password with edit rights on the remote server.

Examples

The following code snippet publishes the current page to the remote server (using the configuration name RemotePublish) when a page reaches the Published state and defines a custom event, pagepublished, for use with other triggers.

{trigger:statechanged|state=Published|newevent=pagepublished}
   {remotepublish-page:RemotePublish}
{trigger}

The custom event can be used to fire additional triggers to improve messaging, send notifications and handle error conditions. The first section sets a message on the page that publishing succeeded, sending an email to the user defined by TechWriter if publishing succeeds. The second section preforms similar tasks if publishing fails and sends the page back to an earlier state, To Publish.

{trigger:pagepublished|success=true}
   {set-message:style=info} 
    *This page has been published.*
    {set-message}        
    {send-email:user=@TechWriter@|subject=Publishing succeeded for @page@}
    Publishing succeeded for @page@.
    {send-email}
{trigger}
    
{trigger:pagepublished|success=false}
    {set-state:To Publish}
    {set-message:style=warning}publishing failed: @errormessage@{set-message}
    {send-email:user=@TechWriter@|subject=Publishing failed for @page@}
    Publishing failed for @page@ with the following error: @errormessage@
    {send-email}
{trigger}
  • No labels