Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
maxLevel2
minLevel2
absoluteUrltrue
excludeSee Also
typeflat
printablefalse
separatorpipe

...

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 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 workflow looks like

...

Here’s the complete workflow markup for this example including . 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
languagetext
{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|submit=Draft|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=Newsarchived|queue=true|newevent=pagepublished}
        {remotepublish-page:remote2}
    {trigger}
    {trigger:pagepublished|success=true}
        {set-message:style=info}Document 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}
    {trigger:newsstatechanged|state=Newsarchived}
        {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

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)
showLabelsfalse
max100
showSpacefalse
sorttitle
excerptTypesimple
cqllabel = "app-comala-remote-publishing" and label = "macro" and space = currentSpace ( )

...