Personal tools
You are here: Home Products Plone Roadmap #157: Content rules engine
Document Actions

#157: Content rules engine

Contents
  1. Motivation
  2. Proposal
  3. Implementation
by Martin Aspeli last modified January 3, 2007 - 06:33
With the introduction of Zope 3 events, it becomes possible to react to events such as "object added" or "object modified". Plone should enable site administrators to set up rules that are invoked when these events occur under certain conditions. For example, it could be possible to move all Events added to a particular folder to the /events folder automatically.
Proposed by
Martin Aspeli
Seconded by
Markus Fuhrer
Proposal type
Architecture
Assigned to release
Repository branch
plip157-contentrules
State
completed

Motivation

Consider a general "drop-box" folder. When a News Item is added here, via the web interface, FTP or WebDAV, a pre-configured rule is fired. This rule looks at the date of the news item and discovers it's dated in January 2006. The news item is automatically moved to /news/2006/january and submitted for review.

Rules such as these could be buit from a set of primitives, chained together in a manner similar to how Outlook has wizards for creating mail filtering rules, for example. They would be a powerful extension to Plone that would enable site administrators to achieve advanced tasks without having to wite any code.

Oh, and Alfresco already has something like this. ;-)

Proposal

  • Build a generic, pure Zope 3 framework for managing rules
  • This lets the user combine rule conditions and actions into a sequence of operations that are invoked upon some event.
  • Add a Plone UI for building these rules
  • Make it simple for third party developers to plug in new types of rule conditions and actions

Implementation

This work as the subject of Markus Fuhrer's Summer of Code 2006 project, and is mostly complete. The biggest missing pieces are:

  • The UI is rudimentary
  • The set of actions and conditions is limited (but adding new ones should be relatively easy)
  • There are no integration tests yet at the plone.app.contentrules level (there are decent tests at the fundamental plone.contentrules level, however).

Check out the bundle, and put install plone.contentrules and plone.app.contentrules to lib/python.

Make sure you put a slug in etc/package-includes like plone.app.portlets-configure.zcml, containing:

  <include package="plone.app.contentrules" />

To test, go to a regular Folder in Plone, and append @@manage-content-rules to the URL, e.g. http://localhost:8080/Plone/my-folder/@@manage-content-rules.

Output frm the logger action should appear in stderr, so run zope with zopectl fg.


For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by