Sorry previous post was saved prematurely.  The following is
essentially the rest client, I'm useing the rest-client gem v 0.6.2.


require 'rest_client'


params = {:svn => true}

payload = { :pdef => "",
:pdef_url => "public/defs/phases/init_phase.rb"}
payload[:fields] = params.to_json


ruote_exec(payload, "init process", nil)

def ruote_exec(payload, name, url)
 url = property('ruote.url') unless url
 #url = 'http://admin:ad...@localhost:3000
 instance = ruote_post(payload, url)
end

def ruote_post(payload, url)
 p payload.to_s + ":" + url.to_s
 site = RestClient::Resource.new(url)
 #post is to http://admin:ad...@localhost:3000/processes
 res = site['processes'].post payload, :content_type => "form-cli"
 doc = Document.new res
 doc.root.elements["workflow_instance_id"][0]
end
--~--~---------~--~----~------------~-------~--~----~
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