On Wed, Feb 2, 2011 at 13:04, Dennis Neumann <[email protected]> wrote:

> I have a service that has one single-value input and two single-value
> output ports. When I give it a list INPUTS, it gives me the outputs
> OUT1_A and OUT2_A as soon as INPUTS[1] is done, and so on. Now, I want
> to use those values in another service as soon as they are there. The
> idea is that the second service can start before the first one has
> finished for a better performance.
>
> The problem is that there is only one input port in the second service,
> which is of type list. Unfortunatly, if I use a Merge, it waits for the
> first service to finish all the way and gives the whole result lists to
> the second one. But what I'd like to have is OUT1_x and OUT2_x together
> in one list. Is there something like a "dot product" for a merge? Or
> maybe some tweaks in list handlings of the two services?

It sounds like what you need is a 'list maker' shim. I don't believe
we have such a local worker at the moment.

A quick solution would be to create a Beanshell script with two inputs
'in1' and 'in2' (list depth 0), and one output 'out1' (list depth 1).
In the script do:

out1 = new String[]{in1, in2};


You can then set the dot product on this processor as soon as it's
connected up, and it should output tuples for you, one by one as they
are produced upstream.

See http://www.myexperiment.org/workflows/1826.html for an example workflow.


As for using the Merge for this, the only way I can think of would be
to create a nested workflow with two depth 0 inputs, one output, and
just wire it straight to the output port (creating a merge). You would
then again need to use the dot product in the parent workflow after
connecting it up.

Unless you are dealing with large data that you don't want to push
through Beanshell scripts I would not recommend this nested workflow
solution as it would likely confuse other workflow authors.


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

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
taverna-hackers mailing list
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/about/contact-us/
Developers Guide: http://www.taverna.org.uk/developers/

Reply via email to