Home

Paolo Predonzani edited this page Dec 26, 2017 · 3 revisions

Inbox plugin for Alfresco using the Aikau framework

Background

Over the past year, Alfresco has introduced a new framework called Aikau for UI development in Share. While it has just begun to appear in version 4.2.x and in the current 5.0.x, the new framework shows a clear direction: to have a rich set of components that can be composed, extended and overridden to create and customise pages in Share more easily.

Aikau gives developers significant advantages:

  • productivity improvements by the re-use of components from the Alfresco distribution;
  • the ability to integrate and customise more deeply in Share's architecture;
  • last but not least, the facility to create general-purpose plugins that can be further customised down the line by other developers based on more specific requirements.

Enter alfresco-inboxes

Alfresco-inboxes is a plugin for Alfresco versions 4.2.f or 5.0.a. It's hosted on GitHub and licensed under the LGPL. It implements an "inbox view" on top of Alfresco's documents. Here is a screenshot:

alfresco-inboxes for Alfresco Aikau - overall page view

What is in inbox? It's nothing related to emails. Here an inbox is a container of documents that helps a user organise his or her work. An inbox may contain the user's draft documents. Another inbox may contain the documents submitted by others that need the user's approval in the context of a workflow. Another inbox may contain only overdue documents. Yet another one may contain only high priority documents.

Generally documents don't stay in an inbox forever. They stay until the user performs an action – e.g. an approval or a rejection – that moves the document out of the inbox. Inboxes are a great tool to organise workflows: a document appears in an inbox, the user takes an action, the document moves out of the inbox, maybe to re-appear in another user's inbox for a different step of the workflow.

An inbox is not the same as a folder. A folder is part of the repository's tree-like structure. An inbox is more like a view across the repository that can draw from many folder. At its core, an inbox is defined by a CMIS query.

The alfresco-inboxes plugin provides a page to manage inboxes easily. You, as a developer of document management solutions, can customise the inbox definitions based on your content models, workflows and requirements.

Let's see the plugin's features in detail.

A new item in the menu

Starting from the simplest things, the plugin adds a new item to Alfresco's header menu so the inboxes page can be accessed from any other page.

alfresco-inboxes for Alfresco Aikau - menu item

The inboxes

On the left side of the page is the list of inboxes. There can be as many inboxes as required and they can be organised logically into groups. Each inbox has a name and an icon. Also each inbox shows how many documents it currently contains – this is handy to get a quick view of the number of documents that are circulating, that need the user's attention, etc, before even clicking on an inbox.

alfresco-inboxes for Alfresco Aikau - inboxes selection - "For my approval highlighted"

Friendly URLs

As the user selects an inbox, the url changes according. The user can bookmark the URL or send it by email. The browser's back and forward buttons (the navigation history) work correctly, too.

alfresco-inboxes for Alfresco Aikau - url browser bar

Document details and actions

When the user clicks on an inbox, the corresponding documents appear in a list on the right side of the page. Each item shows the document's preview image, title, description, modification date and modification author. Also, hovering on an item, a list of actions is offered. The default actions are approve, reject and download. You can customise this view to show additional metadata or other actions that are more relevant.

alfresco-inboxes for Alfresco Aikau - document's metadata and actions

Translations

The plugin supports internationalisation (i18n). Out of the box, it includes English, Italian, and Brazilian Portuguese. Other languages can be added.

alfresco-inboxes for Alfresco Aikau - i18n example in Italian

Downloading and testing the plugin

If you have an existing Alfresco installation running at http://localhost:8080/ and you are familiar with Maven, the easiest way to test the plugin is to download the source code, uncompress the zip archive, then from a command line run:

$ cd alfresco-inboxes-1.4
$ mvn integration-test -Pamp-to-war -Dmaven.tomcat.port=8081

This will start another tomcat running on port 8081 and a Share application available at http://localhost:8081/share/. You can log in with your usual Share credentials.

Downloading and installing the AMP

To install alfresco-inboxes in an existing Alfresco installation, download the amp package, then from a command line run:

$ cd <your_alfresco_installation_home>
$ java -jar bin/alfresco-mmt.jar install <path_to_downloaded_amp> tomcat/webapps/share.war  -verbose

To check that the amp has been installed:

$ java -jar bin/alfresco-mmt.jar list tomcat/webapps/share.war
Module 'alfresco-inboxes' installed in 'tomcat/webapps/share.war'
   -    Title:        alfresco-inboxes
   -    Version:      1.4.1410141704
   -    Install Date: Tue Oct 14 17:07:54 CEST 2014
   -    Description:   An inbox view for Alfresco implemented using the Aikau framework

If you want to know more about installing amp files, read the Module Management Tool page on the community wiki or the official docs.

Additional resources

Further documentation: