Proposal - Rules data transformation plugin

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
sepgil's picture

Overview: Rules is a powerful module that is designed to perform action depending on events and/or conditions. This proposal is about extending the rules module for Drupal 7.x by integrating the idea of Transformations into rules: take any data structure, transform and import or export it.

 

Description: The goals of this project is to implement a new rules plugin which adds a "pipeline" component with a Yahoo Pipes like alternative UI probably using JS Plumb(the demos on their site, doesn't support drag & drop of lines. I'll figure out as soon as I can out, if it would be possible to implement such a feature or if there is any alternative). This component would allow to map one data structure into another(XML, CSV and Drupal data be implemented during this project) without any programming knowledge. As an side effect you also could export and import such data, but the main focus lies on transforming data. Since it would be a rules plugin, it also be possible to do such transformations on events or, even depending on conditions.

There would be endless uses cases for such a module:

  • Backup and restore Drupal Data into XML or other available data structures
  • Transform one data into another, for example XML to another XML Schema to another (like kml to gpx)
  • Having actions to invoke web services (which is currently under development at Pro.Karriere) would allow you to transform your data to the required structure
  • Import or export of resume and job data via HR-XML
  • Seamless integration of 3rd party systems (ERP systems, CRM systems, product catalogues,…) and integrate them in a fully fledged workflow process
  • and many more..

Key advantages:

  • All parse-data operations will be available as rules actions, which means that you can use them for standard rules
  • Since it would be a rules plugin, it would it be seamless integrated into rules.
  • Site builders could map between data structure,(like XML to CVS) without any programming knowledge!
  • External systems use different data structures. This project would allow your site to communicate with those system.
  • You can map your data structures as you like! and all without programming knowledge
  • The pipeline rules component would be generally usable as it's not tied to transformations at all

Differences to other module:

  • The main focus lies in mapping data; even an integration with modules like feeds would make sense, but currently there is no Drupal 7 version of it
  • One system for export and import
  • Integrated into rules - thus you can easily automatically trigger any transformation.
  • Thanks to the pipeline concept, you can convert data while transforming; For example you could convert a date from DD-MM-YYYY into MM-DD-YY, while parsing XML to CVS
  • You could insert any other actions in between two parse actions
  • In summary: This module has a more flexible concept and totally builds upon the existing APIs of rules for dealing with data.

Following points would be part of this project:

  • Implementing a rules pipeline component with a Yahoo Pipes like UI using JS Plumb
  • Iimplementing connectors with JSPlumb
  • Coding data structure parsers for XML and CSV(rules intern as actions)
  • Creating some parsers for basic data types as supported by the entity_metadata module
  • Writing a Tutorial how to backup and restore data with XML
  • Coding unit tests for the actions

Pipline outline

About Me

My Name is Sebastian and I'm a student living near Vienna, Austria. In 2009 I got a part time job at Pro.Karriere as Drupal software developer. Until then I actually hadn't really worked with drupal, but had much programming experience with PHP from school. My first project was developing a basic UI for Transformations with jpetso. From him, I learned much about the architecture of drupal as well as coding standards and the developing guidelines. After transformations I started to work on Pageroute 6.x and made a stable version. In my current project I helping fago out with a new UI for Rules 7.x , so I already have much knowledge about the API in drupal 7 and rules.

AttachmentSize
gsoc_skizze.png41.37 KB

Comments

Can you explain the different

dawehner's picture

Can you explain the different to feeds and the proposal of http://groups.drupal.org/node/57223

But sure such a ui would be cool

sorry that it took me to long

sepgil's picture

sorry that it took me to long on answering your post. I rewrote my proposal so that it really points out the differences or advantages of this project:
It focuses on mapping and transformating data, import and export is more like a cool addon. Another advantage is, that you have one system for import and exporting.

I really like this idea!

fago's picture

Initially Sebastian and me were talking about the idea to do a port transformations to D7, building it upon entity metadata and polishing things to make it a flourishing module. However during investigation it quickly turned out that Rules 2.x and Transformations have much more things in common as one might think. Basically both modules have to deal with data in an abstracted way and the concept of operations matches pretty well to actions.

Thus we came up with the idea of taking the concepts of jpetso's great work to rules and implement it as a rules plugin (such as actions, conditions, loops, ORs, RuleSets, ..). That way transformations can build upon the rules type system, which saves lots of code and so dramatically reduces complexity :) Also lots of needed operations are already available as actions. Furthermore, as Sebastian has already described above, operations implemented as actions can be used automatically elsewhere in rules and the pipeline rules component can be used generally to configure sequences of actions! I'm excited whether this UI could be useful in other cases for rules too.

You Vienna guys are doing

amitaibu's picture

You Vienna guys are doing crazy things! -- subscribing :)

I took a look into JSPlumb

sepgil's picture

I took a look into JSPlumb and noticed that it currently doesn't support the drag and drop if the connectors, so I'll need time to implement that. To keep the effort down I I kicked JSON support out of this project.

dragging connectors in jsPlumb

sporritt's picture

Hi - I wrote the jsPlumb plugin and am very pleased you guys are considering using it in Drupal. Let me know if I can help in any way - adding support for selecting/dragging connectors would be a great addition to the plugin.

jsPlumb supports draggable connections now.

sporritt's picture

i just released jsPlumb 1.1.0, which supports draggable connections.

you can find it on the downloads page - http://code.google.com/p/jsplumb/downloads/list.

hopefully it will be useful for you...

very cool, it certainly will

sepgil's picture

very cool, it certainly will be usefull for this project!

Great work..

joaomachado's picture

I can see many applications for this module in my line of work!

Very, very useful...keep up the good work!

rileg's picture

This is a great idea! subscribing...

rileg

nice idea

gokul.muralidharan's picture

Subscribing ...

Google Summer of Code 2010

Group organizers

Group categories

Important Announcement

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: