myexperiment-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Myexperiment-discuss] Re: [Taverna-hackers] Scufl 2 workflow language


From: Paul Gordon
Subject: [Myexperiment-discuss] Re: [Taverna-hackers] Scufl 2 workflow language
Date: Tue, 12 Jan 2010 10:47:42 -0700
User-agent: Thunderbird 2.0.0.9 (X11/20071119)

The gems worked like a charm (so to speak), thanks. In case anyone is interested, here's a minimal CGI Ruby script to generate a T2Flow PNG diagram with no temp files:

#!/usr/local/bin/ruby
# Contents is the output for a T2Flow document (Taverna workflow) visualized
# using myExperiment.org gems and 'dot'.  The workflow should be posted as a parameter called 'workflow'
require 'cgi'
require 'rubygems'
require 't2flow/model.rb'
require 't2flow/parser.rb'
require 't2flow/dot.rb'

# Create an instance of CGI
cgi = CGI.new
print "Content-type: image/png\n\n"

# give dot the input (model) to render
dot = IO.popen("/opt/csw/bin/dot -Tpng", "wb+")
T2Flow::Dot.new.write_dot(dot, T2Flow::Parser.new.parse(cgi['workflow']))

# terminate processing
dot.close_write
dot.each {|l| puts l}
___________________________________________________________
Paul Gordon wrote:
Well, my situation os a follows.  I export a T2Flow workflow from Seahawk, but it would be really nice to be able to preview the workflow that would be generated (as there are few export options available).  So the workflow is transient, and not necessarily public.  A remote workflow image generator based on submission of a T2Flow doc would be ideal, because then Seahawk would not need to ensure dot is locally installed.  Looks like the easiest solution in the absence of an existing idempotent generator in myExperiment is for me to build a simple POST CGI in Ruby myself using the Gems mentioned earlier.

Thanks for the info,

Paul

Stian Soiland-Reyes wrote:
On Mon, Jan 11, 2010 at 17:12, Paul Gordon <address@hidden> wrote:
  
I don't suppose in the interim that there's a way to call the Ruby-based
T2Flow diagram generator of Biocatalogue remotely?

Having a lightweight piece of code to generate the workflow diagrams
(either via a network client or a standalone JAR) is DEFINITELY
something I'd like!
    

If you upload a workflow to myExperiment it should generate a picture for you..

I think that workflow upload also work via the myExperiment REST API -
but I'm not sure if that would generate the preview for you in the
same way that if you use it through the web page..

CCed myExperiment discuss list. :)


  

------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev

_______________________________________________ taverna-hackers mailing list address@hidden Web site: http://www.taverna.org.uk Mailing lists: http://www.taverna.org.uk/taverna-mailing-lists/ Developers Guide: http://www.mygrid.org.uk/tools/developer-information

reply via email to

[Prev in Thread] Current Thread [Next in Thread]