Bamdad Dashtban


Month: September, 2012

HighCharts for Taverna Workflow Management System

I gave an introduction in my previous post about what Taverna and HighCharts are.

Lets begin…

How to Install Taverna Workbench?

You can download Taverna from the download page of their website. I recommend reading the quick start guide to get general information about it if you are not a Taverna workflow designer yet.

First Step

Now lets create a Beanshell which creates a HTML containing a chart information. I’m going to start with Basic Line chart.
html_data beanshell connected to the a workflow output

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("")+ 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:

import java.awt.Desktop;
java.awt.Desktop desktop = java.awt.Desktop.getDesktop();
File file= new File(file_path);;

My workflow now looks like this :

hard coded basic line chart workflowRefactoring Time!!

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.

The next step is to make workflow to accept data as a list and show it to the workflow.

[This blog post is being edited…]


Friday Hack Night: Adding HighCharts to Taverna Workbnech


For this week Hack night I’m going to implement HighCharts for the Taverna Workbench.


Taverna is a workflow management system which lets the users to drag and drop different service, connect them and compose workflows. It is being usually used in scientific areas for designing in silico scientific experiments.

I’ve seen the hardness of visualizing data in Taverna workflows because of the lack of tools or components which helps workflow designers to visualize the final data.

I selected HighCharts since it has a big set of charts and it supports Themes.

My aim is to create a component family so that designer can easily drag and drop the components to the workbench and visualize the data.

There may be a need to create few adopter services to change the data format into the appropriate format that my components will need to show a chart. I’m not sure about the details now. The component plugin is currently under development and it doesn’t support workflow annotations. So I may need to create workflows separately and create components around them not to loose the annotations.

Wish me luck and don’t forget the #FridayHackNights at Twitter