I gave an introduction in my previous post about what Taverna and HighCharts are.
How to Install Taverna Workbench?
The Beanshell at this point doesn’t have any inputs and it has only 1 output which is HTML data and it is connected to a workflow output. I rename the Beanshell to html_data.
The HTML Script
I’m using JQuery 1.7 for this implementation so I’ve defined the HTML structure and converted that to the Java multiple line format. The source is available in pastebin.
Write to file and open in the browser
For writing the data to file a write_text_file local processor in Taverna is being used. I created a Beanshell which returns the temp directory and a filename appended to it. This is the script for this Beanshell:
file_path= System.getProperty("java.io.tmpdir")+ System.getProperty("file.separator")+ "chart.html";
Now I need to create another Beanshell open the written file it in the default browser. The beanshell script is as below:
java.awt.Desktop desktop = java.awt.Desktop.getDesktop();
File file= new File(file_path);
My workflow now looks like this :
Everything is now hard coded. I should parameterize them .
First, I parameterize the data by using a string constants and then change it to a list (maybe!).
The html_data beanshell now accepts data from its inputs.
[This blog post is being edited...]