about processes and engines

Archive for the ‘openwferu’ Category

ruote on rails 2.0

update (2010/04/06) : this is an old post (2008), if you’re looking for ruote on rails, look at (rails3 branch is at


Two years ago I started writing Ruote, an open source workflow (incidentally BPM) engine written in Ruby. The immediate reaction was “how do I integrate that with Rails ? Please send me the code”. So I started writing an example Rails web application, it was initially nicknamed ‘densha’ and then renamed to ‘ruote-web’. There is a visible instance of this web application on a demo server.

But I’m not very good at web development and this was almost my first Ruby on Rails application. Time passed, I worked a lot on Ruote-Rest, a Ruby web application based on Rack (not Rails). Ruote-rest is meant to be consumed by HTTP clients that are not browsers, you could say it’s a RESTful webservice.

It is time for a second take at Ruote-Web. I started with a Rails plugin for easy integration of Ruote into a Rails application, it’s simply called ruote_plugin. It provides at first migration generation (workitem storage mainly, but also engine persistence via ActiveRecord instead of the filesystem if necessary) and then helper scripts for installing the engine and its dependencies under vendor/plugins/ or as gem.

The next step was building ruote-web2 on top of the ruote_plugin. Let’s note that the initial implementation of a “ruote plugin” was done by Tomaso Tosolini (who also wrote the rdbms based persistence for the process engine, Thanks a ton Tomaso !).

Ruote-web2 is way simpler than ruote-web, and it adheres to the resource structure laid by ruote-rest. It adds user and group resources though. For the user resource I didn’t look very far, I used the ultra-classic restful-authentication.

This will be an interesting packaging of Ruote for people of want to “just replace the Ruote logo and place theirs” to benefit immediately from a simple and robust open source workflow engine/suite (I’m quoting someone in the community for the “just replace the logo” thing).

Ruote process definitions can be expressed as XML, Ruby and now even JSON (or YAML if you push). I plan to integrate process definition tinkering into ruote-web2 (as I did in ruote-rest) and maybe more. That should mean edition of process definitions in the process portfolio and edition of definitions of processes in-flight (already implemented in ruote-rest).

The hardest part part of this implementation work is the QA, not only the classical QA but also the QA triggered by this goal : I’d like to have the same (RESTful) interface for ruote-rest and ruote-web2. The “connectedness” aspect deserves a big share of the design (and then QA) work.

Ruote-web2 is more perhaps “ruote-rest on Rails” than “ruote-web take 2”. There is a consequent amount of work left, but I’ll probably be done in three or four weeks.

It’s open source after all, so here are some links to the source of these tools :

And finally to the mailing list :

Written by John Mettraux

September 29, 2008 at 1:38 pm

ruote 0.9.19 released

I just released Ruote (OpenWFEru) 0.9.19. Ruote is an open source Ruby workflow / BPM engine.

This release comes in 4 packages : the ruote gem and three zip files : ruote-web, ruote-rest and ruote-fluo.

The core Ruote engine is a pure ruby workflow engine. It has its own process definition languages which can be expressed as XML or as Ruby code (or simply as a JSON string). I posted yesterday about how it works and there’s a quickstart available.

For a workflow pattern based evaluation of OpenWFE / Ruote process definition language see :

Ruote-web is already known, it’s an integration of Ruote inside of a Rails shell. There’s a demo of it at This new release integrates the latest ruote-fluo for rendering process definitions graphically, on the fly.

This is probably the last release of ruote-web itself. It will be replaced by ruote-web2 which will draw on the experiences and the design of ruote-rest. Ruote-web was written in haste to answer the frequent question “how do I integrate the ruote bpm engine into my rails application”. Now it’s time to get over that initial Rails implementation and do something better, based on Rails 2+, leveraging the lessons learnt in ruote-web and ruote-rest and using more of the tools found in the RubyOnRails ecosystem.

Ruote-rest aims at being a RESTful workflow server. It’s based on Rack and is thus rather light. It exposes 4 resources : processes, workitems, errors and participants. It currently speaks XML and JSON, but I hope that by the end of the year AtomPub will join the mix. It also speaks HTML for the sake of demonstrating its interface.

There’s a fifth resource exposed : expressions. Expressions are process instances atomic pieces. Processes can be updated on the fly over HTTP, get an expression, alter it and put it back. Ruote-rest even includes the editor version of ruote-fluo to facilitate such manipulations directly in the HTML interface. But I think the real value of this resource is when migrating processes ‘en masse’ to a new version via a few HTTP PUT requests.

Ruote-rest exposes a ruote workflow engine plus a simple worklist as a set of web resources. Ruote-rest HTML interface is worth a check as it shows how ruote-rest and ruote work in a direct “… and if I press this button ?” way.

There are already people in the community doing crazy things with ruote-rest. Composability over HTTP.

Ruote-fluo main task is to render process definitions graphically on the fly. It’s now distributed separately because it’s now able to fulfill a second task : editing those process definitions. Well, it’s rather a process tree editor with the result rendered immediately, but I think it’s not that bad.

There is currently one big drawback about ruote-fluo : its rendering is Firefox 3 only ! I think webkit won’t stay behind in this race for displaying text in the canvas. It’s just a matter of time. (Yes, ruote-fluo is written in Javascript).

There is an online demo at

That’s it for this release. I hope to post a bit more about ruote-rest in the following weeks and to start the work on ruote-web2, as well as to enhance ruote-fluo’s editor aspect.

Feedback and participation (fork?) are welcome.

Written by John Mettraux

September 9, 2008 at 10:25 am

Posted in bpm, bpms, openwferu, ruby, ruote, workflow

how does Ruote work ?

(note: this blog post is from 2008, ruote evolved a lot since, for an up-to-date “how does ruote work”, see sample workflow run)

Well, as “ruote” means “wheel”, it just spins…

Ruote being a workflow/BPM engine, interprets process definitions and runs them as process instances. But how does that happen ?

The few graphs I’ll use in this post were meant as “embedded documentation” in the HTML rendition of ruote-rest. But the final result, a mini-slideshow in the /expressions collection wasn’t very convincing.

I’ll walk through those graphs, detailing what’s happening and giving information about the engine, its components and how they cooperate to interpret process definitions and run process instances smoothly.

Let’s consider this very simple process definition, expressed in Ruby for readability :

class MyProcessDef < OpenWFE::ProcessDefinition
  sequence do

A sequence routing work from participant “alpha” to participant “bravo”.

When Ruote is asked to run an instance of that process, usually via an incoming LaunchItem containing the process definition or a pointer to the process definition somewhere off the web, it will first create an initial RawExpression with an expression id of “0” (and some unique process instance id) containing the process definition as a tree of s-expressions.

Read the rest of this entry »

Written by John Mettraux

September 7, 2008 at 2:21 pm

Posted in bpm, dev, openwferu, ruby, ruote, workflow

workflow patterns and open source wfms

Petia Wohed just announced the latest version of Patterns-based Evaluation of Open Source BPM Systems.

Quoting Petia :

This document is a revision and extension of the BPM center report. For those of you, familiar with the earlier report, the technical evaluations has not changed. In the latest version we
have extended the outlook and improved the presentation.

I particularly like the final part of the new document where considerations for users and developers of open source workflow tools are offered.

Congrats to Petia and all the authors, it’s a huge amount of work.

(reminder : Petia just created a Google group about the Workflow Patterns)

Written by John Mettraux

August 8, 2008 at 12:52 pm

fluo as process editor

I took the time to enhance the fluo javascript library used in ruote-web, a demo Ruby on Rails application wrapping OpenWFEru ruote.

The previous version of fluo (as currently used in the online demo of ruote-web) was abusing the browser layout abilities (css float). This new version relies on a unique canvas. It looks nicer (at least for me) and it is not vulnerable to browser layout quirks (people integrating fluo were complaining about it and also about css collisions).

Fluo itself was only meant for rendering graphically ruote process definitions in a browser. My development bench for it slowly turned into some kind of “browser based process editor”. It’s minimalistic for now, but you can already have a look at it.

There is a unique ‘screen’ with a left pane showing the process definition itself and a right pane showing it renderer graphically via fluo. You can edit the process definition, in the browser.

Next things I’ll add : “paste”, better “save as” capability, loading of remote process definitions (URIs), link to documentation, expressions and attributes ‘suggestions’, …

Ruote-fluo source is at
Ruote-fluo online demo is at

Note : this new fluo is Firefox 3 only, as it uses the text drawing capabilities of this fine browser (the previous fluo was using a float div on top of the canvases to add text).

Written by John Mettraux

July 13, 2008 at 1:52 pm

Petia Wohed on YAWL at BPMinna

On Monday 30th of June, we were lucky enough to have a presentation by Petia Wohed of the Information Systems Laboratory of the University of Stockholm (and Royal Institute of Technology).

Petia contacted me last year while she was reviewing OpenWFE[ja] (and other open source workflow systems) in the light of the workflow patterns. I already blogged about the result of this work (see links at the bottom of this post).

Petia is a member of the YAWL project (workflow language and open source project) developed by the research groups of Prof. Wil van der Aalst and Prof. Arthur ter Hofstede. She delivered an excellent talk about this research effort and especially about the advantages of systems based on [Colored] Petri Nets (think Verification).

Before Petia’s presentation and my talk about OpenWFEru ruote, we had a demonstration by Zaky-san of iKnow! a social networking site for learning languages. It’s extremely successful in Japan (where it started) and it’s now expanding to the rest of the world.

Here is Petia’s presentation, it was graciously translated by Wakizaka-san to japanese :

What interested me the most was the worklet and the declarative workflow concepts. I will read carefully the papers they published about those.

Next was my talk about OpenWFEru, the slides are skinny, I rushed through them and then I demoed ruote-web, ruote-rest and the new fluo (process editing / rendering) :

Here are a few links :

(I’m certainly missing some blog reports, sorry)

Many thanks to Wakizaka-san and id:GoTheDistance for organizing those excellent BPMinna meetings (and many thanks as well to Sawada-san for inviting me to those meetings).

Written by John Mettraux

July 6, 2008 at 11:33 am

Posted in bpm, openwferu, oss, ruote, workflow, yawl

restful bpm

Until now I mainly wrote about exposing a workflow/BPM engine as a set of resources. I’ll write a few line about the other side. I could have named this post “RESTful orchestration”, but BPM is shorter and is music related as well.

For orchestration vs choreography, the best quote, via Stefan Tilkov, might be :

In orchestration, there’s someone — the conductor — who tells everybody in the orchestra what to do and makes sure they all play in sync.

One might argue that the conductor is merely a metronome that cares about BPM and that every participant knows where he fits in the ensemble. Would ‘orchestration’ rather refer to the preparation work of the execution ? Arrangements ?

Let’s forget about big words and acronyms, there’s work to do and no time for taking part in an already old argument. Let’s get started with the resources and where they live. I’ll go with a content management example, it’s a just a few steps away (not hardcore ROA).

There is one staging server, one preview server and two production servers. Content is developed on the staging server, pushed on the preview server for approval and then passed to the production servers.

Read the rest of this entry »

Written by John Mettraux

May 27, 2008 at 9:07 am

Posted in bpm, openwferu, rest, ruby, workflow

ruote 0.9.18 released

OpenWFEru (Ruote) is an open source workflow and BPM engine written in Ruby. I just released version 0.9.18.

Why “Ruote” ? “OpenWFEru” is long to spell… The initial nickname was “Rufus”, but as I reused it for the subprojects not related to BPM, I needed another one. Tomaso suggested me “Ruote” and it sounded just right.

“Ruote” means “wheels” in italian, but it has migrated to english as well. Leopard’s dictionary says :

ruote |roōˈōtē|
pasta that resembles small wheels with five spokes radiating from a hub.
ORIGIN Italian, literally ‘wheels’ .

And it’s OK to have a pasta as the nickname of a project that now allows to script spaghetti business processes thanks to the new step expression.

The complete release announcement as addressed to the users mailing list.

OK, back to work, I’d like to improve ruote-rest, I guess I’ll have to improve (finish) the example first before feeling restful.


Written by John Mettraux

May 22, 2008 at 5:33 am

Rails and OpenWFEru in Amsterdam (job)

From time to time I intercept a job offer and “republish” it here.

This time, it comes from Arjan :

The BiD Network Foundation operates the world’s largest international investor matchmaking and business plan competition for SMEs in developing countries.


We are currently creating a workflow system to manage the business plan assessment (based on Rails and OpenWFEru), and a Management Information System (MIS).

Check the full offer : Software engineer / system integrator for “a better world”

Written by John Mettraux

May 20, 2008 at 11:58 pm

xpdl for fun

I took some time to implement a converter from XPDL to OpenWFEru’s process definition language.

Seems like a certain number of graphical process design tools do serialize their BPMN diagrams to XPDL. Pat has been bothering me about such a serialization for while.

I called that “ruote-transition”, it’s available at the GitHub. It’s not much work but it yields good results. I gave a shot a YAWL as well in the same run.

The challenge is about turning a states+transitions set into the “block structured” format OpenWFEru (Ruote) uses.

I already took a look at that in a former post, the trouble ticket. The transformation (from BPMN to OpenWFEru) was manual. The resulting process definition used a “macro” : a subprocess named “step” that handled the XOR outgoing transitions on the activities of the original process.

The “step” is back as a Ruote expression (like ‘sequence’, ‘concurrence’, ‘if’ or ‘participant’), part of the upcoming OpenWFEru 0.9.18. Ruote-transition [ab]uses this new expression a lot.

Ruote-transition has an intermediary representation format that is easy to output to graphviz format (example). I use it for quick verifications.

I call ruote-transition a “compiler”, turning from one language to another, “translator” would perhaps be a better term.

It was lots of fun to implement that (it’s not over). But I still favour OpenWFEru’s process definition language over anything else, I like its conciseness.

Don’t ask me for “round-tripping”.

Written by John Mettraux

May 18, 2008 at 1:04 pm

Posted in bpm, openwferu, workflow, xpdl, yawl