- Notifications
You must be signed in to change notification settings - Fork0
tsdeng/ruote
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Ruote is a Ruby workflow engine. It’s thus a workflow definition interpreter. If you’re enterprisey, you might say business process definition.
Instances of these definitions are meant to run for a long time, so Ruote is oriented towards persistency / modifiability instead of transience / performance like a regular interpreter is. A Ruote engine may run multiple instances of workflow definitions.
Persistent mostly means that you can stop Ruote and later restart it without losing processes. Modifiability means that you can modify a workflow instance on the fly.
Process definitions are mainly describing how workitems are routed to participants. These participants may represent worklists for users or group of users, pieces of code, …
grab ruote
geminstallruotegeminstallyajl-ruby
Note : the json gem has a serious bug :
http://github.com/flori/json/issues#issue/21
So yajl-ruby is seriously recommended.
Then
require'rubygems'require'ruote'require'ruote/storage/fs_storage'# preparing the engineengine =Ruote::Engine.new(Ruote::Worker.new(Ruote::FsStorage.new('ruote_work')))# registering participantsengine.register_participant:alphado|workitem|workitem.fields['message'] = {'text'=>'hello !','author'=>'Alice' }endengine.register_participant:bravodo|workitem|puts"I received a message from #{workitem.fields['message']['author']}"end# defining a processpdef =Ruote.process_definition:name=>'test'dosequencedoparticipant:alphaparticipant:bravoendend# launching, creating a process instancewfid =engine.launch(pdef)engine.wait_for(wfid)# blocks current thread until our process instance terminates# => 'I received a message from Alice'
seegithub.com/jmettraux/ruote/tree/master/test
MIT
mailing list :groups.google.com/group/openwferu-users
irc : irc.freenode.net #ruote
About
a ruby workflow engine
Resources
License
Stars
Watchers
Forks
Packages0
Languages
- Ruby99.9%
- Shell0.1%