On Tue, Feb 9, 2010 at 9:33 PM, John Mettraux <[email protected]> wrote:
> 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.
Hello again Francisco,
your version :
---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
$engine.variables['sync_process'] = Ruote.process_definition :name =>
'sync_process' do
define :sync_http do
sequence do
alpha
end
end
end
wfid = $engine.launch($engine.variables[process], options)
puts "done: #{wfid}"
outcome = $engine.wait_for(wfid)
p outcome
--->8---
gives me :
---8<---
kiko.rb:19: undefined local variable or method `process' for
main:Object (NameError)
--->8---
If I replace process with "sync_process" and options with {} :
---8<---
wfid = $engine.launch($engine.variables['sync_process'], {})
--->8---
It's successful :
---8<---
done: 20100209-bematayuyu
{"wfid"=>"20100209-bematayuyu", "fei"=>{"engine_id"=>"engine",
"wfid"=>"20100209-bematayuyu", "sub_wfid"=>nil, "expid"=>"0"},
"workitem"=>{"fields"=>{}, "fei"=>{"engine_id"=>"engine",
"wfid"=>"20100209-bematayuyu", "sub_wfid"=>nil, "expid"=>"0_0"}},
"type"=>"msgs", "_id"=>"27993-30-1265719104.178000",
"action"=>"terminated", "put_at"=>"2010-02-09 12:38:24.178000 UTC",
"_rev"=>0}
--->8---
(note that you never call the participant alpha with your code).
OK... Let's have a look at your error message :
---8<---
"#\u003CArgumentError: wrong # of arguments(0 for 1)\u003E",
"trace":
"/Users/francisco/realtravel/rtsite/realtravel.com/gems/jruby/1.8/gems/ruote-2.1.5/lib/ruote/exp/fe_participant.rb:204:in
`schedule_timeout'
/Users/francisco/realtravel/rtsite/realtravel.com/gems/jruby/1.8/gems/ruote-2.1.5/lib/ruote/exp/fe_participant.rb:145:in
`apply'
/Users/francisco/realtravel/rtsite/realtravel.com/gems/jruby/1.8/gems/ruote-2.1.5/lib/ruote/exp/flowexpression.rb:197:in
`do_apply'
/Users/francisco/realtravel/rtsite/realtravel.com/gems/jruby/1.8/gems/ruote-2.1.5/lib/ruote/worker.rb:329:in
`launch'
/Users/francisco/realtravel/rtsite/realtravel.com/gems/jruby/1.8/gems/ruote-2.1.5/lib/ruote/worker.rb:227:in
`process'
/Users/francisco/realtravel/rtsite/realtravel.com/gems/jruby/1.8/gems/ruote-2.1.5/lib/ruote/worker.rb:172:in
`step'
--->8---
The errors occurs when the participant alpha is invoked... Since your
participant works
(http://groups.google.com/group/openwferu-users/msg/50d550d215d4554d),
I have to admit I don't know what is wrong with your environment...
Maybe you should clean up your jruby dev environment or try in a new
fresh one...
Sorry not to be more helpful, best regards,
--
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