Excerpt | ||||
---|---|---|---|---|
| ||||
Info |
---|
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 Remote Publishing app installed in the source instance used together with a workflow trigger
|
|
|
|
Workflow and remote space
Anchor | ||||
---|---|---|---|---|
|
You must have set up
a remote public Confluence instance for publishing the approved content
a private Confluence instance for the content that will be published
Both Comala Document Management and Comala Remote Publishing must be installed in the private source instance.
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 instance
To setup the remote instance you are publishing to, you need to enable "Remote API" setting
in Administration > General Configuration > Feature Settings.
You also need to have a user that has access to the general
space.
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 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:
-
Info |
---|
The name of the Remote Configuration must match that of the workflow. In this case make sure you name it |
Test the settings to make sure that the source instance can connect properly to the remote/public instance
.
-
Tip |
---|
One or more remote instance configurations can be added to each space. Publishing to each remote target instance can be configured using a workflow trigger and a |
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.
-
Depending on the size of the space, publishing the entire space
may take a few minutes.
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.
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.
Code Block |
---|
{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 /wiki/spaces/AWPD/pages/6428167968 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.
Code Block |
---|
{trigger:newsstatechanged|state=Remove}
{remoteremove-page:remote}
{trigger} |
Removing a published page from the remote space does not affect the source space instance page. The publishing process is one way - from the source instance. There is no sync based on a change on a published page in the remote instance page.