On Fri, Mar 5, 2010 at 17:25, Wei Tan <[email protected]> wrote:
> Also, a object-oriented API to query and modify the workflow model is also
> useful when we are not going to build the workflow directly through the GUI.
> For example, we may say, combine the two nested workflows from two workflows
> and make it as a new one.
> Well, in case there is anyone else who has similar requirement ...

That's the kind of level we're talking about. So the API would allow
you to read, inspect and modify a workflow model, and also to
construct one from scratch. However it will not know API-wise about
things like WSDL activities, Beanshell scripts, etc,, these would just
be configured using general properties in a key-value-style - this
non-intrusiveness also means that any plugins like your caTransfer
plugin should also just work with this API.

So if you are concerned about building WSDL activities you would 'just
need to know' that you need to provide 'wsdl' and 'operation'. This
would be possible to discover by looking at an existing workflow in
scufl2 format (or using the scufl2 API), or by looking at aour wiki.
If you want to do copy-paste-like activities like you said above, you
don't need to worry about such details, you would do something like
this (pseudo-code):


wf1 = scufl2.parse(new File("wf1.scufl2");
wf2 = scufl2.parse(new File("wf2.t2flow"); // both old and new file
format supported, also .xml from T1?

newWf = scufl2.newWorkflow();


nested1 = scufl2.getProcessor(wf1, "myNestedWorkflow");
nested2 = scufl2.getProcessor(wf2, "myOtherNested");

newWf.getProcessors().add(nested1);
newWf.getProcessors().add(nested2);

geneIdInput = scufl2.getProcessorInputPort("myOtherNested/inputs/geneId");
geneOutput = scufl2.getProcessorOutputPort("myNestedWorkflow/outputs/gene");

geneIdInput.connection = geneOutput;

scufl2.save(newWf, new File("newWf.scufl2"), scufl2.SCUFL2_FORMAT);


OK, I bet it won't be exactly that straight forward, but along those
lines. No Raven, ClassLoaders or strange for-loops.

The most difficult bit is to cater the API for all the mentioned
purposes.., both read and write in a way. For instance, if we are to
make it easy to use for inspection you should be able to do things
like "geneOutput.getParent()" to get the myNestedWorkflow processor,
or easily climb down to find all nested workflows - but if we allow
this then how to we ensure that works consistently when you can also
build and modify the workflow like above, is the myNestedWorkflow
processor parent wf1 or newWf?  When you add the processor to a new
workflow, what happens to the old connections?

(This can be compared to how the DOM model work, and specially
parenthood can be very 'fun' there.. I remember spending many hours
trying to get one Element to move from one Document to another)


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

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
taverna-hackers mailing list
[email protected]
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