Remote Publishing Workflow
Importing workflows
Find out how to Import Workflows
Remote Publishing workflow | requires v3.0.2+ |
com.comalatech.workflow.repository.categories.label:Â Document Management|Sample | |
- | This workflow allows one-way synchronization of a remote confluence instance. You must set up the private and remote instances - see Workflow and Remote Space. Content that is published to a remote instance can be removed using the Comala Remote Space Publishing app installed in the source instance used together with a workflow trigger
Publishing to another space in the same instance requires the Comala Publishing app. The Comala Publishing app can be used as a standalone publishing app or together with any Comala Document Management workflow (with a final state or a workflow trigger) to publish content to a different space in the same instance. |
Remote Publishing Workflow Markup
{workflow:name=Remote Publishing}
{description}
This workflow allows one-way synchronization of a remote confluence instance. Please visit the [workflow's page|https://wiki.comalatech.com/display/WORKFLOW/Remote+Publishing+Workflow] 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|final=true|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:pagepublished|success=true}
{set-message:style=info}Page Published!{set-message}
{trigger}
{trigger:pagepublished|success=false}
{set-state:For Review}
{set-message:user=<at:var at:name="user" />|style=warning}publishing failed: <at:var at:name="errormessage" />{set-message}
{trigger}
{trigger:statechanged|state=Remove}
{remoteremove-page:remote}
{trigger}
{workflow}
 In later versions of Comala Document Management variable references using the syntax <at:var at:name="errormessage" />
can be replaced by simply using the variable name enclosed in the @ symbols, for example @errormessage@
Workflow and remote space
You must have set up
a remote public target Confluence instance for publishing the approved content
a private source Confluence instance for the approved content that is going to be published
Once remote publishing is set up and content published, content can be removed from the published instance by transitioning the workflow on the in the private source instance space content to the Remove state.Â
Setting up the remote target instance
To set up the remote target instance you are publishing to, you need to enable the Remote API setting in Administration > General Configuration > Feature Settings.
We recommend you set up a user on the remote target instance that only has access to the spaces you are publishing to for security purposes. This also helps to prevent accidental overwrites of other spaces.
Setting up the source instance
To set up the remote instance credentials, you have to set the parameters in the source instance.
Test the settings to make sure that the source instance can connect properly to the remote/public instance.
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.
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.
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.
-Depending on the size of the space, publishing the entire space may take a few minutes.
Once initial publishing of the whole space is completed
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.
Removing content remotely
To remove published page content remotely, all you have to do is to change the state to Remove and the page will be removed in the remote instance.
{trigger:statechanged|state=Remove}
{remoteremove-page:remote}
{trigger}
In this workflow, the transition to the Remove state can only be actioned by an administrator using the administrator state override option (adding either &admin=true
or ?admin=true
to the page URL).
If blog posts need to be removed, a trigger must added for a newsstatechanged
event to the Remove state.
{trigger:newsstatechanged|state=Remove}
{remoteremove-page:remote}
{trigger}
Â