This participant was born out of a suggestion from Jan Topiński in

This participant is a gateway to code placed in a directory.

              engine.register do
                toto, Ruote::RevParticipant, :dir => 'participants/toto/'

Then in the participants/toto/ dir :

  1. participant toto, workflow ‘my_workflow’ with revision ‘0.1’
  2. participant toto, workflow ‘my_workflow’ any revision
  3. participant toto with rev ‘0.6’, any workflow
  4. participant toto, any rev, any workflow

The scheme goes like :


The files themselves look like :

              def consume(workitem)
                workitem.fields['kilroy'] = 'was here'

The file directly contains the classical participant methods defined at the
top level. #cancel, #accept?, #on_reply and of course #consume are OK.

Maybe, look at the tests for more clues :


Note : It’s probably not the best participant in a distributed context, it
grabs the code to execute from a directory. If you use it in a distributed
context, you’ll have to make sure to synchronize the directory to each host
running a worker.

Warning : this participant trusts the code it deals with, there is no
security check.