As one more data point, if I comment the two return statements (the
XmlReader and the Json.decode) the call to the subprocess gets parsed and
called. I'm getting a weird exception, though:

#<SyntaxError: unknown regexp options - "dvl". near line 1:
"/Workflow/pdefs/XX-initialize-station.rb">["/home/devel/.gem/jruby/1.8/gems/ruby_parser-2.0.6/lib/ruby_lexer.rb:395:in
`rb_compile_error'",
 "/home/devel/.gem/jruby/1.8/gems/ruby_parser-2.0.6/lib/ruby_lexer.rb:460:in
`regx_options'",
"/home/devel/.gem/jruby/1.8/gems/ruby_parser-2.0.6/lib/ruby_lexer.rb:356:in
`parse_string'",
 "/home/devel/.gem/jruby/1.8/gems/ruby_parser-2.0.6/lib/ruby_lexer.rb:1296:in
`yylex_string'",
"/home/devel/.gem/jruby/1.8/gems/ruby_parser-2.0.6/lib/ruby_lexer.rb:642:in
`yylex'",
"/home/devel/.gem/jruby/1.8/gems/ruby_parser-2.0.6/lib/ruby_lexer.rb:68:in
`advance'",
"/home/devel/.gem/jruby/1.8/gems/ruby_parser-2.0.6/lib/ruby_parser_extras.rb:712:in
`next_token'",
 
"file:/home/devel/.m2/repository/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/1.8/racc/parser.rb:121:in
`_racc_do_parse_rb'",
 "org/jruby/RubyKernel.java:1191:in `rbCatch'",
 
"file:/home/devel/.m2/repository/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/1.8/racc/parser.rb:116:in
`_racc_do_parse_rb'",
 "org/jruby/RubyKernel.java:2047:in `send'",
 
"file:/home/devel/.m2/repository/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.jar!/META-INF/jruby.home/lib/ruby/1.8/racc/parser.rb:99:in
`do_
parse'",
 
"/home/devel/.gem/jruby/1.8/gems/ruby_parser-2.0.6/lib/ruby_parser_extras.rb:749:in
`process'",
 
"/home/devel/.gem/jruby/1.8/gems/rufus-treechecker-1.0.4/lib/rufus/treechecker.rb:524:in
`parse'",
 
"/home/devel/.gem/jruby/1.8/gems/rufus-treechecker-1.0.4/lib/rufus/treechecker.rb:517:in
`parse'",
 
"/home/devel/.gem/jruby/1.8/gems/rufus-treechecker-1.0.4/lib/rufus/treechecker.rb:165:in
`check'",
 
"/home/devel/Workflow/ruote-components/ruote/lib/ruote/svc/treechecker.rb:115:in
`definition_check'",
 "/home/devel/Workflow/ruote-components/ruote/lib/ruote/reader.rb:170:in
`ruby_eval'",
 "/home/devel/Workflow/ruote-components/ruote/lib/ruote/reader.rb:57:in
`read'",
 "/home/devel/Workflow/ruote-components/ruote/lib/ruote/util/subprocess.rb:46:in
`lookup_subprocess'",
 
"/home/devel/Workflow/ruote-components/ruote/lib/ruote/exp/fe_subprocess.rb:184:in
`apply'",
 
"/home/devel/Workflow/ruote-components/ruote/lib/ruote/exp/flowexpression.rb:252:in
`do_apply'",
 "/home/devel/Workflow/ruote-components/ruote/lib/ruote/worker.rb:326:in
`launch'",
 "/home/devel/Workflow/ruote-components/ruote/lib/ruote/worker.rb:243:in
`process'",
 "/home/devel/Workflow/ruote-components/ruote/lib/ruote/worker.rb:173:in
`step'",
 "/home/devel/Workflow/ruote-components/ruote/lib/ruote/worker.rb:75:in
`run'",
 "/home/devel/Workflow/ruote-components/ruote/lib/ruote/worker.rb:87:in
`run_in_thread'",
 "org/jruby/RubyProc.java:268:in `call'",
 "org/jruby/RubyProc.java:232:in `call'"]

I've checked and the letters "dvl" don't appear anywhere in my source. OTOH,
printing out the tree after parsing looks fine...

Also, I've created a subclass of RuoteAMQP::Reader that overrides the
decode_workitem method. It finds the process to load based on the message
content and then returns a Hash of the form { 'fields' => {a hash of
fields}, 'definition' => '/the/full/path/to/the/pdef.rb' }. In that case, if
I leave the XmlReader and Json.decode lines in there I get the following:

  20110317-bihawamunu TypeError
  20110317-bihawamunu can't convert String into Integer
  20110317-bihawamunu org/jruby/RubyFixnum.java:982:in `op_aref'
  20110317-bihawamunu
/home/devel/Workflow/ruote-components/ruote/lib/ruote/exp/ro_attributes.rb:56:in
`attribute'
  20110317-bihawamunu
/home/devel/Workflow/ruote-components/ruote/lib/ruote/exp/flowexpression.rb:98:in
`initialize'
  20110317-bihawamunu
/home/devel/Workflow/ruote-components/ruote/lib/ruote/worker.rb:323:in
`launch'
  20110317-bihawamunu
/home/devel/Workflow/ruote-components/ruote/lib/ruote/worker.rb:243:in
`process'
  20110317-bihawamunu
/home/devel/Workflow/ruote-components/ruote/lib/ruote/worker.rb:173:in
`step'
  20110317-bihawamunu
/home/devel/Workflow/ruote-components/ruote/lib/ruote/worker.rb:75:in `run'
  20110317-bihawamunu
/home/devel/Workflow/ruote-components/ruote/lib/ruote/worker.rb:87:in
`run_in_thread'
  20110317-bihawamunu org/jruby/RubyProc.java:268:in `call'
  20110317-bihawamunu org/jruby/RubyProc.java:232:in `call'

Again, by commenting the 2 returns in Ruote::Reader.read (the XmlReader and
Json.decode) I get the same "unknown regexp options - "dvl" " exception but
the workflow is read correctly.

Thanks!
-Mario.

--
I want to change the world but they won't give me the source code.


2011/3/17 Mario Camou <[email protected]>

> Hi Torsten,
>
> Thanks for the quick reply. Ruote.is_tree?(definition) is false.
>
> -Mario.
>
> --
> I want to change the world but they won't give me the source code.
>
>
> 2011/3/17 Torsten Schönebaum <[email protected]>
>
>> Mario Camou wrote:
>> > I am having trouble with calling processes and subprocesses given the
>> > file
>> > name. As an example, here's a call to a subprocess:
>> >
>> > subprocess :ref =>
>> > '/home/devel/Workflow/pdefs/XX-initialize-station.rb'
>> >
>> > I get the following:
>> >
>> > 20110317-besohibutsu RuntimeError
>> >   20110317-besohibutsu no subprocess named
>> > './home/devel/Workflow/pdefs/XX-initialize-station.rb' found
>> >   20110317-besohibutsu
>> >
>> /home/devel/Workflow/ruote-components/ruote/lib/ruote/util/subprocess.rb:58:in
>> > `lookup_subprocess'
>> >   20110317-besohibutsu
>> >
>> /home/devel/Workflow/ruote-components/ruote/lib/ruote/exp/fe_subprocess.rb:184:in
>> > `apply'
>> >   20110317-besohibutsu
>> >
>> /home/devel/Workflow/ruote-components/ruote/lib/ruote/exp/flowexpression.rb:252:in
>> > `do_apply'
>> >   20110317-besohibutsu
>> > /home/devel/Workflow/ruote-components/ruote/lib/ruote/worker.rb:326:in
>> > `launch'
>> >   20110317-besohibutsu
>> > /home/devel/Workflow/ruote-components/ruote/lib/ruote/worker.rb:243:in
>> > `process'
>> >   20110317-besohibutsu
>> > /home/devel/Workflow/ruote-components/ruote/lib/ruote/worker.rb:173:in
>> > `step'
>> >   20110317-besohibutsu
>> > /home/devel/Workflow/ruote-components/ruote/lib/ruote/worker.rb:75:in
>> > `run'
>> >   20110317-besohibutsu
>> > /home/devel/Workflow/ruote-components/ruote/lib/ruote/worker.rb:87:in
>> > `run_in_thread'
>> >   20110317-besohibutsu org/jruby/RubyProc.java:268:in `call'
>> >   20110317-besohibutsu org/jruby/RubyProc.java:232:in `call'
>> >
>> > After tracing through the Ruote code I think the culprit is in
>> > ruote/lib/ruote/reader.rb in the read(definition) method:
>> >
>> >     def read(definition)
>> >
>> >       return definition if Ruote.is_tree?(definition)
>>
>> To what does
>>  Ruote.is_tree?(definition)
>> evaluate?
>>
>> Cheers,
>> Torsten
>>
>>
>> --
>> 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
>>
>
>

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

Reply via email to