3 messages in net.sourceforge.lists.taverna-users[Taverna-users] Taverna workflow exec...
FromSent OnAttachments
Anika JoeckerApr 10, 2007 6:01 am 
Stian SoilandApr 11, 2007 2:31 am 
Anika JoeckerApr 11, 2007 5:05 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[Taverna-users] Taverna workflow execution without GuiActions...
From:Anika Joecker (joec@mpiz-koeln.mpg.de)
Date:Apr 10, 2007 6:01:20 am
List:net.sourceforge.lists.taverna-users

Hello,

In my program I integrated Taverna for the execution of workflows without Gui. By updating the classes from Taverna 1.4 to Taverna 1.5.1 I couldn't find the freefluo classes (uk.ac.soton.itinnovation.freefluo.util.xml.XmlUtils). But I found a WorkflowLauncher class in the JavaDoc, which enables executing a workflow without the gui. I tried to use the WorkflowLauncher too, but couldn't find the execute method in 1.5.1. Only a main method, which returns no result. So my question is, how can I easily execute a workflow without using the gui and get a Map in return?

Here is an abstract of my former code:

String workflow = "RPSBlastWorkflowWithParameters.xml"; ScuflModel model = null; EnactorProxy proxy = null;

File workflowXmlFile = new File(workflow); Document jdomDoc;

jdomDoc = XmlUtils.jdomDocumentFromFile(workflowXmlFile);

// create a ScuflModel model = new ScuflModel();

// populate the workflowXml as jdomDoc, the model XScuflParser.populate(jdomDoc, model, null);

// connect to the webservice proxy = FreefluoEnactorProxy.getInstance();

Map inputs = new HashMap(); inputs.put("sequence",DataThingFactory.bake(query.getSequence().toUpperCase())); inputs.put("length", DataThingFactory.bake(new Integer(query.getLength()).toString())); // iterate over all parameters and add each parameter to input Set params = parameters.keySet(); Iterator itparam = params.iterator(); while (itparam.hasNext()) { String key = itparam.next().toString(); inputs.put(key, DataThingFactory.bake(parameters.get(key) .toString())); }

// create a instance of workflowInstance WorkflowInstance workflow = null;

try{ workflow = proxy.compileWorkflow(model, inputs, null); } catch(Exception e){ e.printStackTrace(); } workflow.run(); Map outputs = workflow.getOutput();

Thanks in advance! Best regards, Anika