processi

about processes and engines

Archive for the ‘workflow’ Category

new ruote quickstart

picture-11Ruote has a new website, like the one for Rufus, it’s based on the excellent Webby.

I wrote yesterday about renovating the quickstart, I had initially written an example showing a mini todo tool, but this time I switched to a “mechanical turk” like example where a process instance fetches flickr pictures and presents them to human participants for evaluation and choice.

The process definition boils down to :

class PicSelectionProcess < OpenWFE::ProcessDefinition

  sequence do

    get_pictures

    concurrence :merge_type => 'mix' do
      user_alice
      user_bob
      user_charly
    end

    show_results
      # display the pictures chosen by the users
  end
end

the participant for fetching the pictures is called ‘get_pictures’ :

engine.register_participant :get_pictures do |workitem|

feed = Atom::Feed.new(
http://api.flickr.com/services/feeds/photos_public.gne”+
“?tags=#{workitem.tags.join(‘,’)}&format=atom”)
feed.update!
workitem.pictures = feed.entries.inject([]) do |a, entry|
a << [ entry.title, entry.authors.first.name, entry.links.first.href ] end end [/sourcecode] That's it for the quickstart. Now I have to update the tea tasting team example and the japanese website.

Written by John Mettraux

December 16, 2008 at 6:57 am

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

mini todo tool

I’m currently rebuilding the Ruote web site, as I did for the Rufus one.

A quickstart example is important, so I spent some time trying to write a new one, demonstrating the workflow engine in a few lines of code.

I wrote a mini todo tool, a loop that ends when all the tasks in a task template have been performed. The code is there :

http://gist.github.com/35894

I’m not sure if I will keep it as a “quickstart”, it’s fun anyway since its pair process/engine can be stopped/restarted at will.

Written by John Mettraux

December 15, 2008 at 6:29 am

Posted in openwferu, ruby, ruote, workflow

ruote nov2008 status

In a few paragraphs, lots of links about the status of Ruote (OpenWFEru), my/our open source ruby workflow engine.

But at first, a must-read : BPM is not software engineering, excellent post by Keith Swenson. I interpret it as a call for humility.

Diego Moreno Naharro, a PhD student at the Universidad Politechnica de Madrid recently presented about Workflows on Rails (spanish). His presentation takes the broad view, it especially starts by discussing “act_as_a_state_machine” which, along with its descendants, is a great Rails plugin for resource lifecycle handling. The presentation then goes on to show how Diego and his team leveraged AtomPub and Ruote to build their workflow solution.

On the Ruote mailing list, Diego announced that his research group intended to continue this effort and to develop various Flex based editors for their solution. I’m looking forward tracking this work.

I’ve been supporting Kenneth Kalmer as he implemented a JabberParticipant and a JabberListener to connect the Ruote engine to communicate with participants over XMPP.

With the help of Raphael Simon, I’m currently adding stronger error handling capabilities to Ruote. The current error journal mechanism is OK when you want to describe only the “happy path” in your process definition, but relies too much on administrator intervention.

I did a lot of work on making ruote-rest and ruote-web2 converge, especially in the way the present resources over HTTP (lots of linking work). Kenneth helped me with Ruote-rest and its authentication configuration.

I’d like to release 0.9.20 before the end of the year, I hope I can do it.

0.9.20 will be slightly incompatible with 0.9.19, what does it mean ? Simply that process instances started in a 0.9.19 engine cannot be migrated directly to a 0.9.20 engine, I strongly recommend starting new processes on a 0.9.20 engine and letting old 0.9.19 processes finish their lives in their 0.9.19 engine (else make sure to migrate successfully to a 0.9.20 test environment at first).

Many thanks to Diego, Kenneth and Raphael !

Written by John Mettraux

November 28, 2008 at 1:34 am

Posted in bpm, openwferu, ruote, workflow

something about gcal

I had a request for creating events in Google Calendar from some business processes. It gave me the opportunity to play with Google Data; it wasn’t too difficult, especially since it’s based on Atom and AtomPub.

I have thus started working on a new rufus library. It’s very limited for now, but I can have code that looks like that :

require 'rubygems'
require 'rufus/gcal'

calendars = Rufus::Google::Calendar.get_calendars(
  :account => ENV['GUSER'],
  :password => ENV['GPASS'])

#calendars.values.each { |c| p [ c.name, c.href ] }

cal = calendars['gwork']

id = cal.post_quick!(
  'Tennis with John November 13 3pm-4:30pm')

cal.events(:q => 'tennis').each do |e|
  puts
  puts e.to_s
end

Behind the scenes, it relies heavily on the fine atom-tools gem by Brendan Taylor.

The only authentication mechanism used is the ClientLogin. For the other mechanisms, one can look at gdata-ruby.

My next step will be to polish the Event class and to allow for manipulation of Calendar resources. Then I will take a look at other Google Data APIs.

source : http://github.com/jmettraux/rufus-google
mailing-list : http://groups.google.com/group/rufus-ruby

Written by John Mettraux

November 13, 2008 at 12:07 am

Posted in atom, atompub, google, ruby, workflow

Ruote presentation at Stockholm University

I was invited to talk about Ruote at the Information Labs of the Stockholm University (syslab).

My presentation covered the general concepts of Ruote (OpenWFEru) over a few slides. As always, it’s difficult to select the subjects for a rather unknown target audience.

(This time, I was happy to notice that only one person fell asleep. Well, after reflection, I think it was mostly due to the fact it was a lunch presentation, people were eating)

Many thanks to Petia and to the Professor Johannesson for inviting me.

Read the rest of this entry »

Written by John Mettraux

October 15, 2008 at 7:06 am

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 http://github.com/tosch/ruote-on-rails (rails3 branch is at http://github.com/tosch/ruote-on-rails/tree/rails3)

 

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 :

http://github.com/jmettraux/ruote_plugin
http://github.com/jmettraux/ruote-web2

http://github.com/jmettraux/ruote

And finally to the mailing list :

http://groups.google.com/group/openwferu-users

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 : http://eprints.qut.edu.au/archive/00014320/

http://github.com/jmettraux/ruote

Ruote-web is already known, it’s an integration of Ruote inside of a Rails shell. There’s a demo of it at http://difference.openwfe.org:3000. 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.

http://github.com/jmettraux/ruote-web

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.

http://github.com/jmettraux/ruote-rest

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 http://difference.openwfe.org:4567/?pdef=pdef_ttt.xml

http://github.com/jmettraux/ruote-fluo

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
    alpha
    bravo
  end
end

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

Milan BPM coverage by Sandy Kemsley

Excellent live coverage of Milan BPM by Sandy Kemsley in our famous Column 2 blog.

So far, she has written 23 posts about this event. Each post exposes the main idea of the session it covers. In some posts, Sandy took the time to express her point of view.

I guess she will blog something more detailed once the conference is over. I am amazed by the quality of her ‘reports’, I never could blog anything out of the [ruby] conferences I went to so far.

About the attendance, She notes :

Interestingly, a question at the end resulted in a discussion on BPM vendors and how they have the potential to span boundaries between research and practice. The larger vendors with significant research facilities are represented here: apparently almost 40% of the attendees here are from industry, although it appears that most are from deep within the research areas rather than product development or any customer-facing areas.

Looks like a great event with great people.

Thanks for the great coverage work Sandy !

Written by John Mettraux

September 3, 2008 at 12:36 pm

Posted in bpm, 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