Hello,
I'm currently using ruote-rest and would like to have as much a direct
port to ruote-web2 as possible.  I've created a process definition and
participant and I'm now having trouble getting my command line
restclient hello world to execute the process.

With ruote-rest I had written a client that induced processes through
the restful interface that didn't required authentication.  This
essentially consisted of a request with the following code.

params = {:svn => true}
#params[:login] = 'admin'
#params[:password] = 'admin'

payload = { :pdef => "",
:pdef_url => "public/defs/phases/init_phase.rb"}
payload[:fields] = params.to_json
#payload[:login] = 'admin'
#payload[:password] = 'admin'
puts payload.to_s + ":" + url.to_s

#Post the payload (starts process) to http://<ruote-domain>/processes
site = RestClient::Resource.new("http://localhost:3000";)
res = site['processes'].post payload, :content_type => "form-cli"
doc = Document.new res
doc.root.elements["workflow_instance_id"][0]


On the ruote-web2 server I had the corrisponding process definition in
the location of the request (public/defs/phases/init_phase.rb).
Previously this had worked fine in ruote-rest, but now on ruote-web2
when I create a similiar request I get the following exception.  I
added the name and password parameters for the admin user to both
params and the payload maps and still couldn't get anything working.


Rest-client:
"pdefpdef_urlpublic/defs/phases/init_phase.rbfields{\"password\":
\"admin\",\"svn\":true,\"login\":\"admin\"}:http://localhost:3000";
/var/lib/gems/1.8/gems/rest-client-0.5.1/lib/rest_client.rb:130:in
`process_result': RestClient::RequestFailed
        from /var/lib/gems/1.8/gems/rest-client-0.5.1/lib/
rest_client.rb:108:in `transmit'
        from /usr/lib/ruby/1.8/net/http.rb:543:in `start'
        from /var/lib/gems/1.8/gems/rest-client-0.5.1/lib/
rest_client.rb:107:in `transmit'
        from /var/lib/gems/1.8/gems/rest-client-0.5.1/lib/
rest_client.rb:61:in `execute_inner'
        from /var/lib/gems/1.8/gems/rest-client-0.5.1/lib/
rest_client.rb:53:in `execute'
        from /var/lib/gems/1.8/gems/rest-client-0.5.1/lib/
rest_client.rb:40:in `execute'
        from /var/lib/gems/1.8/gems/rest-client-0.5.1/lib/resource.rb:
38:in `post'
        from ./../lib/cmd_line.rb:202:in `ruote_post'
        from ./../lib/cmd_line.rb:148:in `ruote_exec'
        from ./init.rb:261:in `process_command'
        from ./init.rb:98:in `run'
        from ./init.rb:281


Server:

franci...@francisco-dell:~/realtravel/rtsite/branches/dev/bi/ruote-
web2$ ./script/server -e development
=> Booting Mongrel
=> Rails 2.3.0 application starting on http://0.0.0.0:3000
.. Ruote workflow/BPM engine started (ruote_plugin)
.. found lib/ruote.rb
=> Call with -d to detach
=> Ctrl-C to shutdown server
SQL (0.4ms)   SET client_min_messages TO 'panic'
SQL (0.3ms)   SET client_min_messages TO 'notice'


Processing WorkitemsController#index (for 127.0.0.1 at 2009-02-22
11:26:30) [GET]
Redirected to /session/new
Filter chain halted as [:login_required] rendered_or_redirected.
Completed in 137ms (DB: 1) | 302 Found [http://localhost/]

So any help on what I'm doing wrong?

Can I turn off authentication?

Do I need add the processes to the database or can they remain in the
file system like ruote-rest?




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Ruote (OpenWFEru) users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/openwferu-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to