| 2012-11-07 23:06:29 utc | kindjal | If I want to launch a workflow via the REST API provided by ruote-kit, is that API documented somewhere? |
| 2012-11-07 23:43:47 utc | jmettraux | kindjal: hello, it's self documenting |
| 2012-11-07 23:45:42 utc | kindjal | hmm |
| 2012-11-07 23:45:59 utc | kindjal | so I used the built in form with chromes dev tools on and watched what it posted... |
| 2012-11-07 23:46:05 utc | kindjal | then I recreated that with POST and curl... |
| 2012-11-07 23:46:31 utc | kindjal | the only difference I can spot is that each multipart form has Content-Type: octet-stream |
| 2012-11-07 23:46:34 utc | kindjal | not sure that matters... |
| 2012-11-07 23:46:36 utc | kindjal | but it errors |
| 2012-11-07 23:47:22 utc | jmettraux | ok |
| 2012-11-07 23:48:02 utc | jmettraux | what does the error say? |
| 2012-11-07 23:49:54 utc | jmettraux | you're not limited to POST in mutlpart form to rk |
| 2012-11-07 23:49:59 utc | jmettraux | you can post application/json |
| 2012-11-07 23:50:22 utc | jmettraux | https://github.com/kennethkalmer/ruote-kit/blob/master/lib/ruote-kit/resources/processes.rb#L104-123 |
| 2012-11-07 23:50:33 utc | kindjal | that's what I was looking at... |
| 2012-11-07 23:50:47 utc | kindjal | just tried the json version and got... |
| 2012-11-07 23:51:02 utc | kindjal | cannot read process definitions of class NilClass |
| 2012-11-07 23:51:13 utc | jmettraux | great |
| 2012-11-07 23:51:18 utc | kindjal | the first error, was |
| 2012-11-07 23:51:18 utc | kindjal | cannot read process definitions of class Hash |
| 2012-11-07 23:51:27 utc | jmettraux | great too |
| 2012-11-07 23:52:11 utc | kindjal | I'm sorry, I don't follow. |
| 2012-11-07 23:52:58 utc | jmettraux | the error says it all |
| 2012-11-07 23:53:29 utc | jmettraux | for JSON, please pass something of the form { 'definition' => <definition tree> } |
| 2012-11-07 23:54:03 utc | kindjal | my attempt was |
| 2012-11-07 23:54:03 utc | kindjal | "definition": "Ruote.process_definition :name => 'lol really?' do\nconcurrence do\ngrid_submit :command => '/bin/sleep', :arg => ['20']\nend\ngrid_submit :command => '/bin/sleep', :arg => ['20']\nend\n" |
| 2012-11-07 23:54:20 utc | jmettraux | and the error is? |
| 2012-11-07 23:54:27 utc | kindjal | cannot read process definitions of class NilClass |
| 2012-11-07 23:54:45 utc | jmettraux | what does your JSON document exaclty look like? |
| 2012-11-07 23:54:49 utc | kindjal | standby |
| 2012-11-07 23:55:22 utc | kindjal | https://gist.github.com/4035427 |
| 2012-11-07 23:55:44 utc | jmettraux | looks good, let me try |
| 2012-11-07 23:56:28 utc | kindjal | wait… I collapsed it to one line and it may be working... |
| 2012-11-07 23:56:50 utc | kindjal | my engine now says "string not matched"… but that's new |
| 2012-11-07 23:56:52 utc | kindjal | so maybe I'm close |
| 2012-11-07 23:58:35 utc | kindjal | gotta run now… but thanks anyway for talking briefly. |
| 2012-11-07 23:58:44 utc | jmettraux | you're welcome |
| 2012-11-07 23:59:02 utc | jmettraux | escape the json correctly |