This site has moved to the integrated Appfire documentation and information site for our apps.

From February 2024 this site is no longer updated.

Take a look here! If you have any questions please email support@appfire.com

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Overview

Remote-space publishing allows you to edit content on a local Confluence instance, and then publish it to a remote Confluence Cloud, Server or Data Center instance.

The Comala Remote Publishing app is used to publish content in a source space to a completely separate instance.

Whenever content is updated and approved in the source instance using Comala Document Management the Comala Remote Publishing app can automatically update the published content in the remote instance.

The remote instance can be configured to allow anonymous access to share the content with outside users.

The Comala Remote Publishing app for Comala Document Management must be installed on the source instance to enable remote-space publishing.

(info) The Remote Space Publishing app only functions when used with Comala Document Management.

Activating remote-space publishing

Once the Comala Remote Publishing app is installed there are three steps to setting up different-space publishing:

  • set-up the remote Confluence instance

  • set-up the local Confluence instance

  • update your workflow to trigger the publishing process

The publishing action in the workflow is actioned using one of the following remote publishing macros added to a workflow trigger in your updated workflow

Remote instance setup

These steps should be performed on the remote Confluence instance which you plan to publish content to

  • create the space where content will be published to

  • set up a user account with user permissions to view, add, and delete content in the space for the published content

When content is published into this remote space it will appear to be authored and edited by the user you have set up.

The remote instance can be a Server, Data Center or Cloud instance.

If a Cloud instance is used for the remote instance then you will need to configure an API token in the user account Atlassian administration. Make sure the API token needed for the user password field is requested by the user who will appear to publish the articles.

Local setup

For remote publishing to work, the server hosting the local Confluence instance must be able to access the remote instance. These steps should be performed on the local instance where the content is initially created.

The remote space details are configured in the Document Management dashboard In the space that holds the source content.

  • navigate to Space Tools > Document Management > Remote Publishing


  • add the remote space details to configure the remote space publishing

Configuration

Description

Name

The name of this publishing profile

Base URL

The base URL for the remote instance, for example

  • https://www.company.com/confluence/

User

The username of the user you created on remote instance

  • content updates on the remote instance will be carried out by this user account

Password

The password of the user created on the the remote instance - added as User in this configuration

If publishing to a cloud Confluence instance you will need to enter an API token here, not the user's password.  An API token can be generated when logged into an Atlassian account here: https://id.atlassian.com/manage/api-tokens

Space Key

The SPACEKEY of the space to publish in to on the remote Instance

Workflow markup

The publishing is triggered by an action macro remotepublish-page. This action macro is added to a Comala Document Management workflow trigger.

{trigger:statechanged|state=Published|queue=true}
        {remotepublish-page:remote}
{trigger}

The value used in the example for the remotepublish-page macro is the Name for the remote publishing profile added in the Remote Space Publishing Configuration dashboard in the source space - here we have used remote.

In our workflow applied to the source space content we can use a state change event to action the remote publishing - the change of state to the Published state.

When the state changes to Published, we can add a trigger to listen for this event.

When the trigger is activated the remotepublish-page macro instructs the Remote Publishing for Comala Document Management app to send the published content to the remote space.

{trigger:statechanged|state=Published|queue=true|newevent=pagepublished}
        {remotepublish-page:remote}
{trigger}

We have also used this trigger to create a custom event newevent=pagepublished that can be used in other triggers.

Here we have used this custom event to check if the remote publishing was successful using the success=true parameter in the trigger.

  • if the publishing action was successful - the custom event pagepublished - we added a trigger to generate a message confirming success

{trigger:pagepublished|success=true}
        {set-message:style=info}Page Published to remote instance!{set-message}
{trigger}
  • if the publishing action event pagepublished was unsuccessful - success=false - we’ve added a trigger to transition to the content to the Review state and generate a warning message

{trigger:pagepublished|success=false}
        {set-state:For Review}
        {set-message:user=@user@|style=warning}Publishing to the remote instance failed @errormessage@{set-message}
{trigger}

The example markup above is based on the example from same-space publishing, but we've added the trigger at the bottom to include a process to remove content from the remote instance using the remoteremove-page macro.

{trigger:statechanged|state=Remove}
        {remoteremove-page:remote}
{trigger}

Here’s the complete workflow markup for this example:

{workflow:name=Remote Publishing Workflow|key=dm.remotepublishing}
    {description}
        This workflow allows one-way synchronization of a remote confluence instance. Please visit the [workflow's page|https://wiki.comalatech.com/display/CDML/Remote-space+publishing] for instructions on how to set up the _private_ and _remote_ instances.
    {description}
    {state:Draft|submit=For Review}
    {state}
    {state:For Review|approved=Published|rejected=Draft}
        {approval:Publish}
    {state}
    {state:Published|updated=For Review}
    {state}
    {state:Remove|hidefrompath=true}
    {state}
    {trigger:statechanged|state=Published}
        {set-message:type=note}Page publishing pending...{set-message}
    {trigger}
    {trigger:statechanged|state=For Review}
        {set-message}{set-message}
    {trigger}
    {trigger:statechanged|state=Published|queue=true|newevent=pagepublished}
        {remotepublish-page:remote}
    {trigger}
    {trigger:newsstatechanged|state=Published}
        {set-message:type=note}Page publishing pending...{set-message}
    {trigger}
    {trigger:newsstatechanged|state=For Review}
        {set-message}{set-message}
    {trigger}
    {trigger:newsstatechanged|state=Published|queue=true|newevent=pagepublished}
        {remotepublish-page:remote}
    {trigger}
    {trigger:newsstatechanged|state=Archived|queue=true|newevent=pagepublished}
        {remotepublish-page:remote2}
    {trigger}
    {trigger:pagepublished|success=true}
        {set-message:style=info}Page Published to remote instance!{set-message}
    {trigger}
    {trigger:pagepublished|success=false}
        {set-state:For Review}
        {set-message:user=@user@|style=warning}Publishing to the remote instance failed @errormessage@{set-message}
    {trigger}
    {trigger:statechanged|state=Remove}
        {remoteremove-page:remote}
    {trigger}
{workflow}

The final=true parameter for a workflow state is not necessary for remote space publishing action, all the work is done by the remotepublish-page macro added as a workflow trigger action macro

Macros

Examples

Administration

See also



  • No labels