On Thu, Jan 19, 2012 at 14:04, Prashant Bandal
<[email protected]> wrote:

> I want to create a workflow programmatically using Taverna 2.3 API.
> I tried following code but I am not able to create a workflow.

Note that using the internal classes of Taverna for this purpose might
or might not be able to save the workflow as valid .t2flow that can be
opened in Taverna. This depend on what kind of runtime system you use
(classloaders, classpath, etc), as when saving the file we add
information about which  plugin the activity came from.

If you are running from a classic Java standalone application with
various Taverna JARs on the classpath, this information will be
missing, and the t2flow file would most probably not open in the
regular Workbench or run with the command line tool.


However if you have followed the tutorial on
http://www.mygrid.org.uk/dev/wiki/display/developer/Tutorial+-+Service+invocation+plugin
you will be running from Eclipse, but within a single-classpath (no
plugins) Workbench. Within this workbench you would be able to open
and run these workflows - but saving from here would have the same
compatibility problem.


If you then proceed to deploy your code as a plugin and import it into
a standard Taverna workbench (or even command line tool) installation,
you will be able to save .t2flow files that work with regular Taverna
installations.


Note that if you are building a workflow which is already open in the
workbench, you should do the edits using the EditManager instead of
calling .doEdit() - this would add it to the undo history and update
diagrams. On the other hand if you simply build it separately, and
finally open it using the FileManager, then everything should be fine
without the edit manager.



Due to these kind of difficulties, and the fact that the classes you
have been manipulating are also very tied into the execution of the
workflow, we have developed a new workflow file format called SCUFL2
[1], which also comes with a standalone Java library for manipulating
and building the workflow structure. (This would avoid these hidden
output ports, edits, etc.).



We are releasing version 0.9 of SCUFL2 this month, and will update the
documentation with a small tutorial before we send out a release note
about this.

However we have not yet built a SCUFL2 loading support for the Taverna
Workbench 2.x (this is primarily done for Taverna 3), so to execute
the workflow you will have to use the alpha-version of the Taverna 3
command line tool, which should be released in February.

We might at a later stage add support for writing compatibility
.t2flow files using the SCUFL2 API (it can already read these), or
develop an update/plugin for Taverna 2.x which allows opening of the
new .wfbundle file format.


[1] http://www.mygrid.org.uk/dev/wiki/display/developer/SCUFL2



Out of interest - what kind of workflows are you generating? :-)


-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
taverna-users mailing list
[email protected]
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/about/contact-us/

Reply via email to