...
Table of Contents | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Overview
Excerpt | ||||
---|---|---|---|---|
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 remote instance can be a Server, Data Center or Cloud instance.
Info |
---|
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.
...
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
| ||
User | The username of the user you created on remote instance
| ||
Password | The password of the user created on the the remote instance - added as User in this configuration
| ||
Space Key | The SPACEKEY of the space to publish in to on the remote Instance |
We recommend you set up a user on the remote instance that only has access to the spaces you are publishing to for security purposes. This will also help to prevent any accidental overwrite of other spaces.
Publishing content
Content will now be published to the public instance when the page transitions to the Published state.
Publishing requires connection and transmitting data to the other instance, and this could take some time.
As we want to minimize any chance of error or session expiration we queue the request by adding the queue=true
parameter to each publishing trigger.
A pending message is shown when the page is submitted for publishing.
...
If a published page is updated in the source space, the workflow status is changed to draft state. This does not affect the remote instance space page. In order to publish any updates to the remote instance space the page would have to be re-approved.
Comala Remote Publishing does not add a publishing status breadcrumb to either the source instance space page or the remote instance space page. Management of the published page is based on the applied workflow state and the action of the workflow remote publishing trigger.
Publishing all pages in the Space
If you want all the existing pages in the space to be published remotely, then you need to set the state of all pages to the Published state.
You can do this through the Initialize states feature available for each workflow in the space tools Document Management dashboard.
...
Tip |
---|
Hierarchy of the source instance space pages is maintained in the published remote instance space but initial publishing action publishes pages to the root of the remote space. Once initial whole space is published, reorder the remote space pages and if necessary edit the home page of the remote space to the published home page from the source space. |
Further publishing of source space instance pages retain the page hierarchy if the parent exists in the target remote instance space.
Workflow markup
The publishing is triggered by an action macro remotepublish-page. This action macro is added to a Comala Document Management workflow 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 page content from the remote instance using the remoteremove-page
macro.
Code Block |
---|
{trigger:statechanged|state=Remove} {remoteremove-page:remote} {trigger} |
Info |
---|
The example workflow below does not include a transition to the Remove state. |
With no configured transition to the Remove state from another state in the workflow, the ability to transition to the Remove state is limited to users with administrator permission who can use the administrator state override option to transition the page to the Remove state from any other state in the workflow.
The workflow is also configured to hide this Remove state from the workflow popup progress tracker when the page or blog post is in any other state in the workflow.
The overall example workflow looks like
...
Here’s the complete workflow markup for this example:. This includes a remote publishing process for blog posts using the newsstatechanged
event, a Newsarchived state and publishing archived blog posts to a different remote instance remote2.
Code Block | ||
---|---|---|
| ||
{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|hideselection=true} {state} {state:Newsarchived|hidefrompath=true|hideselection=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=ArchivedNewsarchived|queue=true|newevent=pagepublished} {remotepublish-page:remote2} {trigger} {trigger:pagepublished|success=true} {set-message:style=info}PageDocument 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} {trigger:newsstatechanged|state=Newsarchived} {remoteremove-page:remote} {trigger} {workflow} |
The workflow triggers publishing content to a remote instance are separate triggers for
pages using the
statechanged
eventblog posts using the
newsstatechanged
event
These triggers also generate a custom event pagepublished
that is used to generate message notifications.
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
Pages and blog posts in the Remove and Newsarchived states can only be transitioned to other workflow states (and hence back into the documentation and publishing process) by a user with administrator permission.
Macros
Filter by label (Content by label) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Workflow Exchange
See also
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|