Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
forked fromjmettraux/ruote

a ruby workflow engine

License

NotificationsYou must be signed in to change notification settings

tsdeng/ruote

 
 

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, …

usage

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'

test suite

seegithub.com/jmettraux/ruote/tree/master/test

license

MIT

links

feedback

About

a ruby workflow engine

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby99.9%
  • Shell0.1%

[8]ページ先頭

©2009-2025 Movatter.jp