cogSimple publication workflow implementation that allows to push a document through various validation states until it is published.
Developed by

Anca Luca, Thomas Delafosse, Raluca Stavro

Active Installs97
2 Votes
LicenseGNU Lesser General Public License 2.1
Installable with the Extension Manager


Note that this extension only has a French version, you need to add your own translations and mail templates if you need to implement a different language.

This extension uses 2 important concepts:

  • the draft document
  • the published document (the target document, from the point of view of a draft),
    and functions in the following way: the contributors edit the draft document, demand moderation and validation on it, and once it's published it is copied to the published document. So there are always 2 documents, the draft and the published document. When a workflow is initiated on a document, the current document will be the draft and the user will need to fill in the target document. The published documents should never be edited directly, only published from a draft document.

In order to use this extension, add the PublicationWorkflow.PublicationWorkflowPanel to the spaces of your choice (should be the space where the draft documents reside and the space where the published documents reside, so that the draft can be accessed from the published document and edited) and use tbe commands available in this panel. The same UI can be achieved by using the {{publicationworkflow /}} macro in the context of the draft and published document.


The workflow "New Workflow" has been created using the template provider on the PublicationWorkflow space (the groups for contributors, moderators and publishers have been created using the wiki administration).
In order to define a workflow, just create a new document using the  PublicationWorkflowConfigTemplate template (which has a template provider available in the space PublicationWorkflow, see the first image above) and fill in the 3 groups: contributors, moderators and publishers (webmasters). By default workflows work with 2 levels of validation: the contributors start the workflow and edit the documents then submit to moderation. Moderators can edit further and then submit of validation or refuse and send the doc back to contribution. Then, the publishers can edit further and validate and publish or refuse and send back to moderation. If, in the configuration, the moderators group is missing then there will only be one level of moderation, done by the publishers. Once published, a document can be archived (passed to hidden) or unpublished (the published document is removed and the content is copied to the draft).

The panel PublicationWorkflow.PublicationWorkflowPanel has been added on the left column for the Draft space in the example above (using the space administration section).

We have created a new document inside the Draft space and we would like to publish it in the Main space using the "New Workflow" workflow.

The button "Start workflow" will send the document to the "Draft" status (draft).

The button "Submit to moderation" will send the document to the "In moderation" status (moderation).

The button "Validate" will send the document to the "Validation" status. The document can be either validated or refused by the a member of the publishers group (webmasters).

The button "Publish" will open a modal box to confirm the publishing of the document. In this state,the document can be validated without being published or refused.

The user needs to confirm if the document is published.

The published document is copied to the "Main" space which was initially selected.

Note that on the draft document the rights are handled automatically by the workflow application (between contributors, moderators and publishers) but for the published documents the rights fall in the responsibility of the wiki administrator, which should make sure that no one can edit the published documents directly (usually it means setting the rights on a space).

Mails are being sent in the following cases:

  • when a document is submitted to moderation - mail is sent to the moderators
  • when a document is submitted to validation - mail is sent to publishers
  • when a document is refused by moderators - mail is sent to the contributors
  • when a document is refused by publishers - mail is sent to contributors
  • when a published document is unpublished - mail is sent to publishers

The list of drafts documents is available on the page PublicationWorkflow.Overview:


Tested on

This extension has been tested with the following configurations.

Extension VersionXWiki FlavorNotes
1.1XWiki Enterprise 4.1.4, 4.3.1, 5.2.1
1.7XWiki Enterprise 9.1.2
1.7XWiki 9.8.1


1.8.1XWiki 10.8.3
1.8.1XWiki 10.11.2
1.8.1XWiki 11.1
1.9XWiki 11.3, 11.5, 11.3.3, 11.3.4

Important issues found:,

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

Note: if this extension is installed on a version of XWiki lower than 4.3, mailsender plugin needs to be replaced with the 4.3 version, so that workflow notification mails are sent.

Release Notes


  • Closed XAWORKFLOW-66 Overview bulk actions might act on different pages than displayed
  • Closed XAWORKFLOW-65 Cannot start an workflow on pages other than children pages of the chosen Drafts page
  • Closed XAWORKFLOW-64 Ensure consistency in Publication Workflow Config Template
  • Closed XAWORKFLOW-60 xwiki 11.5 - Failed to execute the [velocity] macro
  • Closed XAWORKFLOW-55 Add an option to the workflow which prevents hiding draft pages
  • Closed XAWORKFLOW-3 Store information about who published a document


  • Closed XAWORKFLOW-62 Rotate the translation versions so that English is the default
  • Closed XAWORKFLOW-54 Translate the title of the "Overview" page
  • Closed XAWORKFLOW-49 Allow moving the target in the tree of documents
  • Closed XAWORKFLOW-48 Simplify the workflow initialization form
  • Closed XAWORKFLOW-44 Allow placing the target in a tree of documents as non-terminal or terminal document
  • Closed XAWORKFLOW-43 Replace the list of documents displayed on the Overview page with a dynamic table
  • Closed XAWORKFLOW-36 Circular group inclusion generates error on the PublicationWorkflowPanel
  • Closed XAWORKFLOW-9 Missing "valid" documents to the Overview


  • Closed XAWORKFLOW-52 Draft Documents created in Subwikis are published to the main wiki


  • Closed XAWORKFLOW-51 The home page PublicationWorkflow.WebHome should not be orphaned
  • Closed XAWORKFLOW-50 Replace deprecated calls to XWiki.getSpaces and XContext.getLanguage
  • Closed XAWORKFLOW-42 Version Comment should include the person who validated/published the document
  • Closed XAWORKFLOW-41 When unpublishing a document, the notification mail is not sent to validators
  • Closed XAWORKFLOW-39 Published document are created as terminal pages
  • Closed XAWORKFLOW-37 Links in Nested Pages should point to the published version after publishing
  • Closed XAWORKFLOW-35 The "PublicationWorkflow.Overview" Page should not be hidden by default
  • Closed XAWORKFLOW-33 Add viewer and commenters groups to Workflow
  • Closed XAWORKFLOW-32 Null pointer exception when trying to start workflow as target (from script)
  • Closed XAWORKFLOW-22 Improve the icon and description of Workflow template provider
  • Closed XAWORKFLOW-21 Create an Application Entry for Workflow app
  • Closed XAWORKFLOW-20 Adapt application to NS/ND



Dependencies for this extension (org.xwiki.contrib.workflow-publication:xwiki-workflow-publication-application 1.9.1):

  • org.xwiki.contrib.workflow-publication:xwiki-workflow-publication-api 1.9.1
Tags: workflow
Created by Anca Luca on 2013/08/20 11:00

Get Connected