planet

Workflow-ng 5.x-1.0 beta1 released!

Submitted by fago on Tue, 07/03/2007 - 19:43
I'm happy to announce the 1.0 beta1 release of workflow-ng. Workflow-ng allows one to customize drupal's built in workflows in a very flexible way. In short, it's a rule-based event driven action evaluation system. Read the introduction to see how it works. It is useful for
  • sending customized mails notifying your users about important changes
  • building flexible content publishing workflows
  • creating custom redirections
  • and a lot more....
It builds on the powerful workflow-ng API, which allows contributed modules not only to expose configuration defaults, but also to add additional events, conditions and actions. Users can share their configurations by using the built-in import/export tool. This enables users to easily share their configurations. I've already wrote some documentation including two tutorials, but the developer documentation is still TODO. It'll be completed during the next days...

Workflow-ng API ready...

Submitted by fago on Wed, 05/30/2007 - 22:35
After some hard work, the workflow-ng API is ready. It features
  • actions, which may be configurable
  • conditions, which may also be configurable
  • support for multiple arguments, for actions as well as for conditions
  • condition evaluation with logical operations like OR, AND and NOR
  • events, for which conditions and actions can be configured. They may be contributed by modules.
  • dynamic loading of needed arguments
  • ordered conditions and actions - they are evaluated like they are ordered
  • form API style configuration and processing of conditions and actions
So workflow-ng works event based. (And no, I'm not talking of calendars ;) E.g. workflow-ng defines some basic events for drupal core, like 'node update, 'node insert', 'user update' and so on. So this are the events you can react on by defining conditions and actions for them. What makes workflow-ng powerful is, is it's flexible handling of arguments. Each of these events has to define a list of available arguments. Then any conditions and actions, that can work with these arguments, can be configured for this event. So an action can be used in any situation, where the suitable arguments are available. There is no need for the action, to be coded aware of every event.. :) As modules may define further events, this enables module authors, to easily allow site administrators to customize the behavior by just defining some further events.

Yet another node access module: Content Access

Submitted by fago on Sat, 05/19/2007 - 19:12
Some days ago I needed a node access module for a 5.x site. I didn't want to misuse taxonomy for controlling node access, so I looked out for alternatives. Nothing was really satisfying me, so in the end I wrote a new one...

Content Access

So this module allows you to manage permissions for content types by role and author. It allows you to specify custom view, edit and delete permissions for each content type. Optionally you can also enable per node access settings, so you can customize the access for each node. In particular
  • it comes with sensible defaults, so you need not configure anything and everything stays working
  • it is as flexible as you want. It can work with per content type settings, per node settings as well as with flexible Access Control Lists.
  • it trys to reuse existing functionality instead of reimplementing it. So one can install the ACL module and set per user access control settings per node.
  • it optimizes the written node grants, so that only really necessary grants are written.
So the module is simple to use, but can be configured to provide really fine-grained permissions! Drupal project: http://drupal.org/project/content_access

Node Profile 5.x 1.1 released!

Submitted by fago on Mon, 04/30/2007 - 13:46
Thanks to the great subform element API module, which I wrote originally for pageroute, it was quite easy to implement some great new features for the node profile module, which make building simple node profiles a lot easier. So node profile 1.1 features
  • configurable user edit categories integration - edit a simple nodeprofile like a core profile
  • configurable node profile display integration on the user's (my account) page or - if used - also on the usernode
  • configurable user registration integration
  • easy integration of a nodeprofile in any theme
You can find the settings to this new features in the also new per content type node profile settings - just edit your node profile content type and click on the new "Node Profile" tab.

Subform Element 1.2 released!

Submitted by fago on Sun, 04/08/2007 - 14:07
I'm happy to announce the Subform Element module 1.2. It's intended to make developers life easier. It allows you to reuse existing forms inside your own forms, e.g. just embed a fully working node form. The notable changes since the 1.0 release are some new form element properties, first of all the new data separation feature!

data separation

Without data separation the values of each form will be transmitted as usual in the $_POST array. So if both forms use a field with the same name, e.g. 'title' both will end up in $_POST['title'], so obviously the latter title will overwrite the first one. This was an issue if you tried to put two node forms into one using subform elements. Subform Element 1.2 has #data_separation turned on per default, which let's subform element prefix all the elements name of a subform. So the data ends up in e.g. $_POST[$subform_id]['title'], where $subform_id is the id of your subform. Then the data is separated and you can safely combine forms with overlapping element names. Have a look at this handbook page, it shows how easy it is now to merge two node forms into one.

subform customization

So now it's easy to reuse every form by using the subform element. What's missing is an easy way to customize the subform, without modifying the original form. For this subform element 1.2 comes with two new optional properties:
  • #subform_after_build: An optional array of after_build functions for the subform.
  • #extra_form: An optional array of further form elements that will be added to the subform.
So with an #after_build function for the subform you can easily alter the original subform, e.g. hide some buttons. The #extra_forms property allows you to add some further form elements to the subform.

Next generation workflows: workflow-ng!

Submitted by fago on Mon, 03/05/2007 - 20:05
I'm happy to announce that I start working on the next generation workflow module, called workflow-ng. It's inspired by the existing workflow module, but if things go well it's going to be a lot more powerful. I can use the development as practical work for my study and I will also write my bachelor thesis about this - thanks to the Information & Software Engineering Group of the TU vienna. Furthermore it's great that this all is sponsored by the Austrian company Pro.Karriere! So, what's workflow-ng? Workflow-ng ist the next generation module package for building workflows with Drupal. It allows building configurable state machines, which can be supplied programmatically or through the admin interface. So workflow-ng will be a tool for module developers as well as for site admins. Workflow-ng doesn't work only for content nodes, it will be coded on top of a “drupal entity” - so it will start with support for nodes, comments and users. Furthermore it doesn't urge you to introduce new states for your entities,because it does interpret each saved entity as a new possible state. This allows one to reuse existing information, e.g. reuse the existing „published“ and „moderated“ fields of nodes. Also workflow-ng won't allow one building state-machines only. One will also be able to react on various “events” with configurable actions, which allows site-admins or modules to adapt any default behaviour. E.g. this suits very well for e-mail notifications. Send a thank you message to the author of a certain node type? Just configure the action and workflow-ng will do it for you. Read more about it in the concept I wrote, it's attached to this post.