Hi all,

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)

      (return XmlReader.read(definition)) rescue nil
      (return Rufus::Json.decode(definition)) rescue nil
      (return ruby_eval(definition)) rescue nil

      if definition.index("\n").nil? && definition.index(' ').nil?

        raise ArgumentError.new(
          "remote process definitions are not allowed"
        ) if Ruote::Reader.remote?(definition) &&
@context['remote_definition_allowed'] != true

        return read(open(definition).read)
      end

      raise ArgumentError.new(
        "doesn't know how to read definition (#{definition.class}) " +
        "or error in process definition")
    end

It's returning the same String passed in. Doing a few pp's, it drops past
the XmlReader but doesn't go past the Rufus::Json.decode (which is weird
because if I call it directly it *DOES* toss an exception). If I do a pp in
subprocess.rb I see that read is returning the same String I passed in.

I have checked and "remote_definitions_allowed" is enabled.

Any ideas?

Thanks!
-Mario.

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

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