Great, i think its working. I have tested it from a REST client in chrome and i receieved the 201 status code and the structure of the workflow. Find here attached a screenshot of the post request. Next up, i will be incorporating that into the app.
cheers 2015-06-30 6:39 GMT-05:00 Larry Akah <[email protected]>: > Ok, thanks. > When i try that, i will send my feedback. > > Cheers > > 2015-06-30 6:35 GMT-05:00 Ian Dunlop <[email protected]>: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Hello, >> >> I think the workflow can just be sent as it is. The request is JSON >> formatted but the things inside the request don't have to be. The >> t2flow/xml can be sent base64 encoded as they are. >> >> Cheers, >> >> Ian >> >> On 30/06/15 12:32, Larry Akah wrote: >> > Hello, The workflows we get from myexperiment are formatted as xml >> > or t2flow files. Do these absolutely need to be converted in json >> > before posting or they can be sent as is? >> > >> > Cheers >> > >> > 2015-06-30 5:11 GMT-05:00 Ian Dunlop >> > <[email protected]>: >> > >> > Hello, >> > >> > I've had a chat with the taverna player developer and you need to >> > send a request as follows: >> > >> > POST to /workflows.json >> > >> > {"workflow" : { "document" : >> > "data:application/octet-stream;base64,BASE64 ENCODED WORKFLOW GOES >> > HERE"}} >> > >> > using HTTP basic auth with username:password base64 encoded in the >> > Authorization header in the request e.g. Authorization: Basic >> > QWxhZGRpbjpvcGVuIHNlc2FtZQ==. You have to specify .json because >> > the content type is not being respected for some reason. >> > >> > >> > Here's an example using curl: curl -u your_username -X POST -H >> > "Content-Type: application/json" [email protected] >> > http://taverna-player-server/workflows.json >> > >> > where wf.json is the workflow file, this would then prompt for a >> > passwor d. Hope this helps, please let us know how you get on. >> > >> > Cheers, >> > >> > Ian >> > >> > On 29/06/15 19:23, Larry Akah wrote: >> >>>> I need some help with uploading a workflow to the player. The >> >>>> API doesn't make it seem possible currently. How is it done? >> >>>> >> >>>> cheers >> >>>> >> >>>> 2015-06-29 16:55 GMT+01:00 Larry Akah <[email protected]>: >> >>>> >> >>>>> Yes, its not yet ready. i still need to adjust that because >> >>>>> at first , i was using the player to fetch workflows and >> >>>>> derived a run skeleton to use for creating workflows. There >> >>>>> is still some stuff that needs to be fixed there. >> >>>>> >> >>>>> Cheers >> >>>>> >> >>>>> 2015-06-29 16:34 GMT+01:00 Ian Dunlop >> >>>>> <[email protected]>: >> >>>>> >> >>>>>> Hello, >> >>>>>> >> >>>>>> I got a ‘fatal’ error which the emulator reported when >> >>>>>> clicking on ‘create run’: >> >>>>>> >> >>>>>> 06-29 15:25:39.554 >> >>>>>> 8216-8216/mobile.taverna.apache.org.tavernamobile >> >>>>>> E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: >> >>>>>> mobile.taverna.apache.org.tavernamobile, PID: 8216 >> >>>>>> java.lang.NullPointerException: Attempt to invoke >> >>>>>> virtual method 'void android.app.AlertDialog.show()' on a >> >>>>>> null object reference at >> >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflowdetai >> lFr >> > >> >>>>>> >> agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:407) >> >>>>>> >> >>>>>> >> > at >> >>>>>> org.apache.taverna.mobile.fragments.workflowdetails.Workflowdetai >> lFr >> > >> >>>>>> >> agment$WorkflowRunTask.onPostExecute(WorkflowdetailFragment.java:289) >> >>>>>> >> >>>>>> >> > at android.os.AsyncTask.finish(AsyncTask.java:636) >> >>>>>> at android.os.AsyncTask.access$500(AsyncTask.java:177) >> >>>>>> at >> >>>>>> android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java >> :65 >> > >> >>>>>> >> 3) >> >>>>>> >> >>>>>> >> > at android.os.Handler.dispatchMessage(Handler.java:102) >> >>>>>> at android.os.Looper.loop(Looper.java:135) at >> >>>>>> android.app.ActivityThread.main(ActivityThread.java:5257) >> >>>>>> at java.lang.reflect.Method.invoke(Native Method) at >> >>>>>> java.lang.reflect.Method.invoke(Method.java:372) at >> >>>>>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(Zygote >> Ini >> > >> >>>>>> >> t.java:903) >> >>>>>> >> >>>>>> >> > at >> >>>>>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) >> >>>>>> >> >>>>>> >> >>>>>> >> The device reported that the app had stopped running but in >> >>>>>> fact it returned it to the workflows view but all the >> >>>>>> workflows had disappeared from the view. I guess it’s >> >>>>>> probably because this functionality is not ready yet but >> >>>>>> I figured I should report it anyway. >> >>>>>> >> >>>>>> Cheers, >> >>>>>> >> >>>>>> Ian >> >>>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> -- *Akah Larry N.H* >> >>>>> >> >>>>> *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc* >> >>>>> *www.iceteck.com* >> >>>>> >> >>>>> Developing technologies for emergence and sustainable >> >>>>> development. >> >>>>> >> >>>>> >> >>>> >> >>>> >> >> >> > >> > >> > >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v1 >> >> iQEcBAEBAgAGBQJVkn8TAAoJEPK45GBX+Cy5iC0IAJ9YpVLfGxgdd+LHyo3eOMfY >> SO4sL23TS/htyvAU/61BQh85g8TEmUOvo/19tGkc7ExXf97rTtGc9/KMkHeyeqp+ >> rnz4OCLHujtsuRgy8P2AZeCibjtb3tqxBuIXmk4fcGyF9IiokHMtHksI0FMcERl8 >> xYJKacZ4j8XGC7m3oskpLwgF936UbuZTtUsP0rE9JkZgjJU39rjbmGh5ibgHGF35 >> iYuyO2kb7XQMM3evZHqRkelAK8yraFi6/J+qeVadBGrxPk+8QcyCO21833MXYP1X >> wZnLkSfribveFAq8bVLZgbZTmdt9Txwa+5sKBaCVG34voPIRFisg6u7lxgm5Wbs= >> =RrFl >> -----END PGP SIGNATURE----- >> > > > > -- > *Akah Larry N.H* > > *Lead Software Engineer @ GiftedMom* > *Founder IceTeck Inc* > *www.iceteck.com* > > Developing technologies for emergence and sustainable development. > > -- *Akah Larry N.H* *Lead Software Engineer @ GiftedMom* *Founder IceTeck Inc* *www.iceteck.com* Developing technologies for emergence and sustainable development.
