On Fri, Sep 3, 2010 at 08:41, Andreas Truszkowski <[email protected]> wrote:
> Hi,
>
> Am 01.09.2010 16:02, schrieb Stian Soiland-Reyes:
>
> I'm sorry, it turns out I was wrong. It is only for *output* ports you
> can specify granular depth.
>
> So I'm afraid you will have to decide to receive it as depth 0 or depth 1.
>
> But you cannot return an empty hashmap for iterations you 'skip' - as
> the nested workflow would never finish, it has only received a value
> for position 15 on output ports Reactant_1 (and Reactant_2), but is
> waiting for the previous 14.
>
> You *could* return a dummy value in stead, but it sounds a bit strange.
>
> I have found a solution to handle that problem. Therefor I have developed
> two services, an acceptor and an emitter service.  The former chaches the
> incoming multi step data on the hard disk and invokes the emitter service
> when ready. The emitter service closes all filestreams from the acceptor and
> loads the cached data. Then the downstream workflow is executed as normal.
> (see solution picture)
>
> Furthermore I noticed that iterative executed services invoke the output
> ports. But they won't invoke the attached services. It seems to me to be a
> bug. (see break picture)
>
> If the process is not doing anything CPU/memory intensive it should be
> fine to do it as depth 1.
>
> I try to read a 2GB SDFile so that it could not be done at once.
>
>
> So I annoyed you enough but sadly I have two further questions.
> 1) How is a while loop to be implemented? I have read the taverna technics
> paper and there is described that it was explicitly implemented. An example
> picture for such a loop  I need is attached. ( I like using pictures because
> they describe things easier/betterthen words :-) )

Hi!

To do looping, select a processor you want to loop, go to
Details->Advanced and select 'Add looping'. A dialogue should let you
test the loop condition on one of the output ports. The processor will
be invoked again until the output satisfies the test.

(To avoid the loop going on forever, you should try to do an exclusive
test, rather than a specific, for instance instead of looping while
status!="FINISHED" - loop while status="RUNNING". Or for numeric
values, loop while value<10 instead of until value==10)

It is possible to also tick the 'feedback
If you want to loop over more than one processor, put them in a nested
workflow, and loop over the nested workflow processor in the parent
workflow.

It is possible to also tick the 'feedback matching ports' in which
case the nested workflow can produce (some of) its next input values
by having output ports with the same name as input ports.


Unfortunately the diagram does not currently indicate the loop.


> 2) Is it possible to colour services e.g. in dependency of their
> confuguration state?

It is at list possible to change the icon, but it gets a bit tricky as
you need to trigger it to refresh the colour when the configuration
changes. See
http://www.mygrid.org.uk/dev/wiki/display/developer/6.+Service+icons
for an example.

For the activity colour those are unfortunately static per activity
class, this is done by
net.sf.taverna.t2.workbench.ui.impl.configuration.colour.ColourManager.

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

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
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