Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Wiki Markup
{repository-workflow:dm.remotepublishing|categories=sample,docmanagement|chart=remotepublishing.png}
{repository-description:name=Remote Publishing Workflow}
{note}Remote publishing requires the [Remote Publishing Plugin|https://plugins.atlassian.com/plugin/details/42115].{note}

This workflow allows one-way synchronization of a remote confluence instance. Please visit the [workflow's page|http://www.adhocworkflows.com/display/WORKFLOW/Remote+Publishing+Workflow] for instructions on how to set up the _private_ and _remote_ instances.
{repository-description}
{workflow-body}
{workflow:name=Remote Publishing}
    {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}
    {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:pagepublished|success=true}
        {set-message:style=info}Page Published!{set-message}
    {trigger}
    {trigger:pagepublished|success=false}
        {set-state:For Review}
        {set-message:user=@user@=<at:var at:name="user" />|style=warning}publishing failed: <at:var at: @errormessage@name="errormessage" />{set-message}
    {trigger}
    {trigger:statechanged|state=Remove}
        {remoteremove-page:remote} 
    {trigger}
{workflow}

{workflow-body}
{repository-workflow}

h3. 

Setting

...

up

...

the

...

public

...

instance

...

The

...

remote

...

API

...

must

...

be

...

enabled

...

in

...

the

...

public

...

instance

...

(go

...

to

...

Administration

...

>

...

General

...

Configuration

...

>

...

Feature

...

Settings

...

to

...

enable

...

it).

...

We

...

need

...

to

...

set

...

up

...

a

...

user,

...

which

...

would

...

have

...

access

...

only

...

to

...

the

...

PUBLIC

...

space.

...

To

...

set

...

up

...

the

...

remote

...

instance

...

credentials,

...

you

...

have

...

to

...

set

...

the

...

parameters

...

in

...

the

...

source

...

instance:

...

Image Added

Info

The name of the Remote Configuration must match that of the workflow. In this case make sure you name it remote as this is the name used in the workflow. You can always change it and even have different configurations

Test the settings to make sure that the source instance can connect properly to the remote/public instance:

Image Added

Publishing content

Content will now be published to the public instance when the page's reaches the Published state.

Publishing requires connection and transmitting data to the other instance, and this could take some time. Because we want to minimize any chance of error or session expiration we queue the request. A pending message is shown when the page is submitted for publishing:

Image Added

If a published page is update, the state is changed to for renew and would have to be re-approved to get it republished.

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 State initialization feature of ad hoc workflows:

Image Added

Depending on the size of the space, publishing the entire space will take a few minutes.

Removing Content

To remove published content remotely, all you have to do is to change the state to Remove and the page will be removed in the remote instance.