#157: Content rules engine
- Contents
- 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.