Friday, June 24, 2016

New Implementations

New cwl-utilities module

CWL Dummy Activity has responsibility of reading the CWL configuration and figure out the depth of the parameters of a cwl tool . CWL Contextual View has responsibility of reading CWL configuration and figure out details describing the CWL tool. In order to make those component simple new module has implemented which handles above task for them. Now CWL Dummy Activity and CWL contextual View both can depend taverna-cwl-utilities module to do that work.
Link: https://github.com/ThilinaManamgoda/incubator-taverna-common-activities/tree/stream/taverna-cwl-utilities

Use Java 8 features


Now reading cwl tools taken new approach. Cwl Provider is implemented using new Java 8 features like Lambdas,Streams. Reading CWL tools using SnakeYaml is done trough Parallel Stream which help to improve the performance when there is large number of tools in the given directory.  Since Stream in Java 8 handle the Multi threading for us implementation is lead to cleaner code. Since process is parallel the Arraylist "result" is removed since it can cause concurrency issues, instead now each CWL description is returned as ArrayList it self.

Link: https://github.com/ThilinaManamgoda/incubator-taverna-common-activities/blob/stream/taverna-cwl-activity-ui/src/main/java/org/apache/taverna/cwl/ui/serviceprovider/CwlServiceProvider.java

New Features in Service Detail Panel

New Features in Service Detail Panel



So previously i have showed that how the CWL service detail panel going to be in the Taverna Workbench. Since then i have made improvements like, adding format, label and change the color.

CWL input/ output parameter is consist of  "format" and "label" tags.  Label is a short human readable description of the parameter and it is optional to have. Since service detail panel is represented using HTML, i have  modified the previous implementation  such that panel is defined as a table and all the configuration of the panel is done through the <table> tag.

 Format is a short description of which formats are allowed for the parameter and it's optional to have. Format can be a String, Expression or  referred to an ontology. So if it's an ontology, it should be mapped to  an URI in the Namespaces defined in CWL Tool. 


 

Friday, June 10, 2016

Adding Service detail panel

                         The task is to  implement the Service detail panel for CWL tool in the Taverna workbench. So CWL tool can have a description about it self. But the problem is that the description could be long and couldn't be shown in a single line with the tool name within the available services.
Also each input/output can have own description about it self. This is very useful when designing workflows. So Service details panel is right place for hold this all information. In Taverna this is known as Contextual view and you can find the tutorial here.
                                                              Although this is the basic idea, i am going to approach HTML based solution, in which the descriptions of the tool is formatted using HTML annotation. If you are interested here how it's done. I changed the way how CWL Dummy Activity figure out inputs and outputs, introduced the class "Port Details" which holds the details of each input/output port (depth,description) .  Following pictures demonstrate how CWl tool with descriptions is going to be appeared in the Taverna Workbench, although actually it isn't the best look, but i am working on it. My implementation can be found here.

Sunday, June 5, 2016

First week

In this week i have tried to implement the part which will read the cwl file and add input ports in the CWLActivicty. This is done inside these two modules,



taverna-cwl-activity module contains the CWL Activity and the CWL Activity Configuration classes. Inside CWL activity, method called "configure" will go through the CWL configuration and add input ports accordingly. I have also modified the example which is in the Tutorial Service discovery plugin    to demonstrate how CWL tools will appear on the Taverna workbench. Inside CWL service provider it will go through the directory which is user entered , and read CWl tool using SnakeYaml library and create CWl configurations. 

This is the exampletool which is provided by taverna and i modified it to show a peak of what i am doing !!


Give the location of the CWL tools
Services are imported


Select the tool and drag into the work space
Right click and select show ports 
Final View