On Tue, Feb 9, 2010 at 6:46 PM, kiko <[email protected]> wrote:
> Mac, Snow Leopard with JRuby 1.4, Everything works find with Ruby.
>
> I create participants like this:
>
> $engine =
> Ruote::Engine.new(Ruote::Worker.new(Ruote::FsStorage.new('work')))
> $engine.register_participant :alpha do |workitem|
> workitem.fields['message'] = { 'text' => 'hello !', 'author' =>
> 'Alice' }
> end
>
> and create processes like this:
>
> $engine.variables['sync_process'] = Ruote.process_definition :name =>
> 'sync_process' do
> define :sync_http do
> sequence do
> alpha
> end
> end
> end
>
> and execute:
>
> wfid = $engine.launch($engine.variables[process], options)
> puts "done: #{wfid}"
> outcome = $engine.wait_for(wfid)
Hello Franciso,
maybe this is better :
---8<---
require 'rubygems'
require 'ruote'
require 'ruote/storage/fs_storage'
$engine = Ruote::Engine.new(Ruote::Worker.new(Ruote::FsStorage.new('work')))
$engine.register_participant :alpha do |workitem|
workitem.fields['message'] = { 'text' => 'hello !', 'author' => 'Alice' }
end
pdef = Ruote.process_definition :name => 'sync_process' do
alpha
end
wfid = $engine.launch(pdef)
p $engine.wait_for(wfid)
--->8---
and it works.
Trying with your version now. Stay tuned.
--
John Mettraux - http://jmettraux.wordpress.com
--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en