...
Before you start
If you haven't already done so, please read different-space publishing and complete the required Comala Publishing space configuration for the local instance of Confluence.
...
Here is the basic markup from the the different-space publishing page.
...
how long does the content take to publish, particularly in cases where where several pages might be published at the same time?
what happens if an error occurs? The publishing app might be mid-upgrade, or the configuration could be invalid, etc.
...
We should probably show an on-screen message during synchronization too, using a a set-message action in the trigger.
...
add buttons to Retry or Ignore – we can achieve that using a customized {approval}
hide the Error state from the the Progress tracker using the
hidefrompath
parameterset the color for the state to be red
...
The last thing we need to do is handle the outcome of the {publish-page}
action – to achieve that we can use the newevent
parameter.
...
Code Block | ||
---|---|---|
| ||
{workflow:name=Different-space Publishing} {state:Editing|submit=Review} {state} {state:Review|approved=Synchronise|rejected=Editing} {approval:Review|assignable=true} {state} {state:Synchronise|hideselection=true|description=Content synchronisation in progress, please wait...} {state} {state:Error|colour=#ff0000|approved=Synchronise|rejected=Published|hidefrompath=true|description=Synchronization failed, what do you want to do?} {approval:Error|approvelabel=Retry|rejectlabel=Ignore} {state} {state:Published|final=true|updated=Editing} {state} {trigger:pageapproved|approval=Review} {set-message} Synchronising content... {set-message} {trigger} {trigger:statechanged|state=Synchronise|queue=true|newevent=AfterSync} {publish-page} {trigger} {trigger:AfterSync|success=true} {set-message:style=success|duration=PT1M} Synchronisation complete, content is published! {set-message} {set-state:Published|comment=Synchronization completed successfully} {trigger} {trigger:AfterSync|success=false} {set-message:style=error} Synchronization failed. @errormessage@ {set-message} {set-state:Error|comment=Synchronization failed} {trigger} {workflow} |