Approvals Workflow Configuration

For the impatient
If you are evaluating the plugin, you can just:
  • Install the plugin
  • Assign the Default Theme, Approvals Workflow Plugin ready theme (2.6.x, 2.7.x and 2.8.x), either by selecting it when creating the space, or through Browse Space -> Space Admin -> Themes

The Approvals Workflow Plugin ready themes use the default Confluence layout and include all the required layout changes required for the approvals.

Table of Contents

Upgrade information

If you have 1.1 installed, you need to update the approvals line. See below

Adding the Approvals line

Usually most pages do not require to be subject to an approval process, therefore, you might want to make these changes in those spaces using the plugin. Alternatively, you could make the change globally, but use a different layout in those Spaces where you expect high traffic.

Theme Builder
If you are not able to change the layout, or if you just want to test it, you can use the {workflow-include} macro instead. See below for configuration with the Theme Builder

Go to Look and Feel - Layouts (either from the Space or Global Administration)

If you have never modified the page layout, you'll have to create it:

if you have, then you have to edit it:

Upgrading to 1.1

If you have 1.0.x installed, you have to update the line to include the extra parameter ($mode)

You have to add $!workflow.include($page,$mode) right after the #parse ("/labels/labels-include.vm") line, in the #VIEW section, as described below:

It should look like this:


Alternatively, you can hide either the approvals list or the messages:

$!workflow.include($page,$mode,false,true) To show only the approvals list, but not the workflow messages
$!workflow.include($page,$mode,true,false) To show only the workflow messages, but not the approvals list
Tip: If all users that are responsible for approving content on your wiki are in a special group, for example content-approvers, you can hide the approvals line from regular users to reduce interface clutter:
#if($userAccessor.hasMembership($userAccessor.getGroup("content-approvers"), $remoteUser))
    $!workflow.include($page,$mode,false,true)
#end

Clustering
If you are installing in a cluster environment, you have to repeat this on each node. The change on the template will be there, you just need to save the change.

Adding the Approvals line for blog posts

To add the approvals line in blog posts, you have to follow a similar procedure, but to modify the Blog Post Layout.

You have to add $!workflow.include($blog,$mode) right after the #parse ("/labels/labels-include.vm") line, in the #VIEW section, as described below:

It should look like this:

Theme Builder Configuration

If you are using the Theme Builder You can add the approvals line by adding the {workflow-include} macro in any of the builder's panels. The obvious place would be in the Title panel, right after the {builder-labels} macro:

Links to Page Approvals and Space Approvals

This is what you have to do to add the menu links to the Page Approval and Space Approvals Tabs
Theme builder 2

{menuitem}{menulink:webui|key=space-approvals|location=system.space}Approvals{menulink}{menuitem}
{menuitem}{menulink:webui|key=page-approvals|location=system.page}Approvals{menulink}{menuitem}

Theme builder 3

{compound-menuitem:webui|key=space-approvals|location=system.space|caption=Approvals}
 {compound-menuitem:webui|key=page-approvals|location=system.page|caption=Approvals}

Customizing Published view

The Published View is an alternate page view mode that is enabled when a Page receives an approval that has been defined Final. You can further customize the mode by updating the same page layout.

First you have to include the mode released in the same section of the view mode:

You might want to exclude the editreport as it shows informstion on the latest version not the approved version:

If you don't want the version information shown, you can exclude it:

Enabling disabled-by-default macros

The workflow and a couple of Action macros are disabled by default.

This plugin was intended for a intranet/enterprise trusted environment. However, you still have to be careful when enabling this feature, as not only malicious but also faulty workflows could cause damage to the system. Therefore it is strongly recommended that you enable the workflows only for a trusted group of users You can do so by enabling the plugin for a couple of specific spaces, and the restrict access to those spaces (described below).

To enable the workflow macro, you have to go Configuration - Plugins and selected the Approvals Workflow module:

Then, you have to enable the {workflow} macro:

Once you have enabled the {workflow} macro you have to define in what spaces workflows can be define. You can do this using the Approvals Workflow administration console:

You can configure there in what spaces page approvals and workflows can be defined.

Restricting Page notifications

Restricting notifications of non-approved pages requires installing the plugin manually and restart the servers:
1. Uninstall the plugin
2. Locate the confluence installation directory (CONFLUENCE-BASE)
3. Copy the plugin jar file into CONFLUENCE-BASE/confluence/WEB-INF/lib
4. Make backup copies of the following files

  • CONFLUENCE-BASE/confluence/WEB-INF/classes/plugins/core-listeners.xml
  • CONFLUENCE-BASE/confluence/WEB-INF/classes/eventSubsystemContext.xml

5. Replace the Page Notifications Listener'class with com.comalatech.confluence.workflow.mail.notifications.listeners.FilteredPagedNotificationsListener in CONFLUENCE-BASE/confluence/WEB-INF/classes/plugins/core-listeners.xml

6. Replace the changeNotificationBean class with com.comalatech.confluence.workflow.mail.FilteredChangeDigestNotificationBean in CONFLUENCE-BASE/confluence/WEB-INF/classes/eventSubsystemContext.xml

6. Restart server and make the same changes in the other nodes

Clustering notes

To make sure the changes are properly propagated to the cluster nodes, you are better off restarting the nodes after making any changes on page layout and other changes made in the configuration files.

L10n

See L10n

Labels

 
(None)
  1. Jul 24, 2007

    Peter R. says:

    Any suggestions on how to work around this, which happens when I click "Layouts"...

    Any suggestions on how to work around this, which happens when I click "Layouts" as instructed in the first step:

    "You can not customise the site look and feel while a theme is active. You must first disable currently configured theme."

    1. Jul 24, 2007

      Roberto Dominguez says:

      Looks like indeed themes are not customizable... let me look at it to see if I f...

      Looks like indeed themes are not customizable... let me look at it to see if I find a workaround (other than having to re-build the theme to include the aforementioned change)

      On the meantime, what I'd do is create a test space, then set the theme for it to the default and proceed with the changes.

    2. Aug 09, 2007

      Roberto Dominguez says:

      The {{\{workflowinclude\}}} workflowinclude macro can now be used to add the app...

      The {workflow-include} can now be used to add the approvals line, so you can get it to work with themes. See Approvals Workflow Configuration for more details.

  2. Nov 12, 2007

    Kenny Tong says:

    After I've added $workflow.include($page,$mode) and enabled all related modules,...

    After I've added $workflow.include($page,$mode) and enabled all related modules, I've got a "$workflow.include($page,$mode)" text (instead of a approval bar) showing in the View tab, anything that I've missed? Remark : I used Confluence 2.6.0 and the latest workflow plugin.

    1. Nov 15, 2007

      Roberto Dominguez says:

      Can you see of the modules of the plugin? The {{Workflow helper class}} module m...

      Can you see of the modules of the plugin? The Workflow helper class module must be enabled.

      Also, can you see the "Approvals" tab in the browse space section? and the Space Approvals link in the space admin section?

      Note that 1.1.* is not officially supported on 2.6.0 but you should be able to see the approvals line.

      1. Nov 27, 2007

        Kenny Tong says:

        I know what happens now.  Using the Plugin Repository to install the module...

        I know what happens now.  Using the Plugin Repository to install the module will install the 1.0 version.  I've manually uploaded the jar and succeed now.  Thanks.

  3. Dec 17, 2007

    David Dembo says:

    FYI, I recommend a slight variation on the approvals line example above....

    FYI, I recommend a slight variation on the approvals line example above. For some reason Firefox doesn't like it being added directly after the #parse statement and will flip the favourites & watchlist icons from horizontal to vertical if you try to click one of them.

    However, if you add the approvals line as a whole new row in that table, the problem is solved and there is basically no visible difference. Add the following code right before the </table> tag (just above the #if ($helper.isHistoricalVersion()) line):

    <tr>
        <td align="left" valign="top" colspan="2" class="smalltext">
            $!workflow.include($page,$mode)
        </td>
    </tr>
    
  4. Jan 08

    Vitalijs Akbijevs says:

    Roberto, We have problems with Confluence 2.4.3 and plugin version 1.0 and 1.0....

    Roberto,

    We have problems with Confluence 2.4.3 and plugin version 1.0 and 1.0.1 after installation via plugin repository.
    1) Page layout updated and looks OK,
    2) Workflow module enabled without errors,
    3) Approvals Workflow administration console configures for Test space
    but in Space Admin page we can't see Approvals tabs and a collection of approvals can't be defined by Space Administrators because Edit approvals link not available in Space operation section.

    Any ideas?

    1. Jan 08

      Roberto Dominguez says:

      Vitalijs, Spaces Approvals and the Approvals tab was introduced in version 1.1 ...

      Vitalijs,

      Spaces Approvals and the Approvals tab was introduced in version 1.1 of the plugin, with works only on Confluence version 2.5 and newer. So you would have to upgrade Confluence first to get it going.

      Regards,

      Roberto

  5. Mar 03

    Simon Wheatley says:

    There are some issues with Theme Builder 3 when displaying Space Approvals or ev...

    There are some issues with Theme Builder 3 when displaying Space Approvals or even linking to the Page Approvals. Please watch this page for updates on work-arounds

    Can you let us know what these issues with Theme Builder 3 are, please? I'm hoping to use Approvals and Builder, and need to work out how much of an issue this is likely to be.

    1. Mar 03

      Roberto Dominguez says:

      The issues I was referring to were on earlier beta versions of Theme Builder 3, ...

      The issues I was referring to were on earlier beta versions of Theme Builder 3, but thing seems stable now.

      I know of at least one Client that is using Theme Builder 3 and the Approvals Workflow plugin without a problem now.

      Let me know if you have any problems.

      1. Mar 04

        Simon Wheatley says:

        Seems fine to me, I was just keen to avoid nasty surprises. :)

        Seems fine to me, I was just keen to avoid nasty surprises.

  6. Apr 30

    Matt Bovett says:

    So I figured out that I could make a menu option take you to the latest approved...

    So I figured out that I could make a menu option take you to the latest approved page:

    {menuitem}{menulink:webui|key=released|location=system.page}View Latest Approved Version{menulink}{menuitem}

    The problem I'm having is that we're making it so when an approved page is edited, the wiki adds restrictions to the page. I thought users would be able to use this option to see the previously approved page, which I thought wouldn't have restrictions on it. But apparently it inherits the restrictions of the latest un-approved version? I'm assuming because it's technically the same page, just a different version?

    Is there any way to achieve my goal of making it so everybody can view the latest approved version even after a page is edited and gets restrictions, but only the author, modifier and the editor team can see the version with the new edits?

  7. Jul 03

    Joe Van Quakebeke says:

    I am trying to use this plugin in 2.8.1.&nbsp; I have it installed and on config...

    I am trying to use this plug-in in 2.8.1.  I have it installed and on configured in the admin and when I go to the wworkspace where I defined the workflow, I see the approval line on pre-existing pages but not new pages.  New pages just tell me "Error getting approvals" and then shows the meta-data I configured in the workflow.  I used the exact same workflow as in the setup tutorial.  I just cut-n-pasted it and added my name.  On the pages where the approvals do show up, Nothing happens when I as the author tries to approve the page. Can someone expalin what I am doing wrong.  As far as I can tell I did all the steps in the tutorial, but it is not working.

    Joe

    1. Jul 03

      Roberto Dominguez says:

      Joe, Could you submit an issue on

      Joe,

      Could you submit an issue on http://developer.atlassian.com/jira/browse/APRV

      Please provide as much information as possible: server logs and system information (Administration -> System information)

      Roberto