workflow-ng, rules

About the Rules Ecosystem @drupalcon Copenhagen!

For anyone interested, here are the slides of the session. I'll also add the link to the video here, once it is available.

Metadata, what for? - Introducing Entity Metadata!

Drupal 7 modules working with entities often face the same problems:

  • How to create/save/delete an entity?
  • How to get referenced entities?
  • Which properties are there and how can they be accessed or modified?

This is, what Entity Metadata tries to solve for Drupal 7. It collects metadata from modules, such that it knows how this things can be done and provides API functions for that purpose. There are API functions for full entity CRUD, for determining access, as well as data wrappers that simplify dealing with entity properties.

Metadata for data properties, why that?

You might think, we have fields. Yes we have, but not everything is a field. There are also entity properties, like the node title and author, the term hierarchy and lots of others. Entity metadata collects information about all that available properties - regardless whether they are fields or not - and makes them accessible the same way. For that you have to provide property info via a hook, e.g. this is the info the module provides for books:

Rules session @Drupalcon Paris

Better late as never, so here are the slides from the rules presentation at the drupalcon. I'm also attaching the two features which were built with rules during the presention:

Reactive rules for drupal have grown-up!

Finally, after over 1 year of development the rules module has reached the 1.0 version! You can download it from the project page.

Reactive rules?
Reactive rules (or ECA-rules) are rules triggered upon a given event. This allows one to conditionally fire actions based on arbitrary events. As modules can provide further conditions, actions and events this enables site builders to automate a lot of things using reactive rules! As of now a lot of popular drupal modules provide already rules integration: CCK, Organic Groups, Token, Flag, Content Profile, Content Access, ViewsBulkOperations and many more.

Features?
The modules comes with a bunch of useful features, e.g. a flexible input evaluation system that allows to use token replacements or even PHP evaluation in your rules. To ease the management of rules the module supports tagging of rules as well as Import/Export. Often used behaviour can be put into Rule-Sets and is easily invoked by provided actions. Not enough, the execution of those Rule-Sets can be scheduled easily with help of the provided action, thus providing a powerful scheduling system, which allows you to schedule arbitrary tasks!

screenshot

It's finally grown-up?
Rules is already stable for quite a time, however I didn't consider it to be complete. During the last months I added missing important features, fixed bugs and translation issues and completed the documentation! While there was quite a bunch of useful developer documentation for a while, now there is also a complete hook reference in the doxygen format.

So it's grown up, but it's not (yet) perfect. So what comes next?

Rules 1.0-rc1 is out!

I've just released the first release candidate for rules 1.0. Read more at groups.drupal.org!

Flag module 6.x-1.0 shipping with rules integration!

Finally the flag module got released - a really useful module and known as the successor of the previous "Views bookmarks" module. The project page says:

Flag is a flexible flagging system that is completely customizable by the administrator. Using this module, the site administrator can provide any number of flags for nodes, comments, or users. Some possibilities include bookmarks, marking important, friends, or flag as offensive. With extensive views integration, you can create custom lists of popular content or keep tabs on important content.

But even better the 1.0 (and 1.1) release is shipping with extensive rules integration. So once you have installed both modules you can create flags and use rules to add some behaviour to them, e.g. you can react once a flag is "flagged" or "unflagged" and send mail to the content node's author, unpublish it, change the content's access settings - or whatever you have actions and conditions for!
Then the module also provides actions for flagging or unflagging flags, checking the flag count in case of global flags and even to "Trim flags", which allows you to restrict the number of flagged items. This way you could even create simple queues. Of course there also conditions to check whether a flag is flagged and again in case of a global flag you can check the flagging count. Amazing!

Also the flag module comes with a bunch of useful settings, so you can configure the flag to have a confirmation form or to just work with an AJAX link. Together with the powerful rules integration one could implement a lot of useful stuff - want a custom link with custom permissions to publish a content node? Just use a flag and an appropriate rule!

Bringing rules to the next level!

While I've been working on the flag module's rules integration and getting the 1.0 release out, I've also fixed the details of my master thesis. I am happy to announce to further enhance rules during my thesis. The main feature I'm going to work on is allowing rules to work with remote sites and content. I'm going build client and server-side web service support, so that several drupal sites can talk to each other. Furthermore I'm going to make it possible to invoke arbitrary SOAP-based web-services out there, maybe also others. Perhaps the right way to do achieve that might be doing rules integration for the service module. You want to invoke a web-service? - Just use the action for it. You want to create a web-service? - Just build a rule set. Apart from that I'm going to build a readable rule export for documentation purposes, work out a basic publishing workflow and research some semantic web research capabilities. Actually I'm thinking about integrating with the RDF-API to get some meta-data about drupal objects, which is important to have in place when dealing with remote content steming from other drupal sites.

Presenting rules at the drupalcamp in Cologne

Today I held a presentation about rules at the drupalcamp in Cologne, Germany. It was really amazing to see how many people are interested into rules!
You can find the slides of my presentation attached to my post. If you are interested, my presentation was also recorded. Hopefully the video is up soon - probably it'll be linked here.

photo of the presentation
Thanks go to criz for taking the photo!

The drupalcamp here in Cologne is a pure success! There are really interesting sessions and it's just amazing how many great people are here! I'm looking forward to the next day tomorrow.

Oh

Greetings from cologne!

XChange - reactive rules for the web...

Last Thursday I had to give a talk as part of a course at the university. I presented the reactive rules language XChange.

Content Profile 1.0 BETA 3 is out!

The BETA 2 is already more than a half year old - so a new BETA release is really long overdue. So I've worked hard during last days to get a next BETA out of the door - finally it's there!

Of course there were a lot of improvements and bug fixes since BETA 2, so let me mention only the most notable ones:

  • added support for an edit tab at the users page: either on the top level or as secondary tab below the "Edit" tab.
  • added an extension module for integration at the registration page
  • made theming with content profile easier and added content profile docs for themers
  • added the possibility for admins to add content profile nodes for other users
  • basic support for translated profiles with the help of the "content translation" module
  • added Views integration
  • added rules integration with support of upgrading from nodeprofile workflow-ng rules.
  • by Gundalo and Michelle: added Panels integration
  • added more usage help and hints to the README

Let's have a closer look at some points of these...

Theming with content profile

When you have a "profile-as-nodes" you probably want to use some profile information stored in your profile content in some of your themes, e.g. to show some additional information about the author of a forum post. To do so, you previously had to manually load the profile node in your theme and output the right data at the right place - yeah and not forget to properly check your data...
This cried for improvements, so I tackled this problem. We need to be able to easily access the data of the created profiles, where it should be already properly prepared for use in a template so you haven't to check it yourself. Yes and we should do that fast.. So just loading all profile data and putting it into $user is really no option.

Syndicate content

Back to top