Hi,

It seems to be more complicated than I thought so please be patient with me.
> What you need to do in DataCollector, if you want to receive each
> Subgraphisomorphism_filter-value as they are produced, is to have it
> specify input port depth 1, with granular depth 0.
The first thing is, is there anywhere a documentation about the granular 
depth stuff? Furthermore I have no idea how to create an input port of 
granular depth 0. For me it is only possible to declare the general port 
depth.
> Alternatively you can set both at depth 1 - in which case it's called
> once. You can then iterate over the incoming list using the reference
> service.
The problem as mentioned before, how do I set the granular depth of 
input ports.
addInput(this.INPUT_PORTS[0], 1, true, null, byte[].class); <-- the only 
method to declare input ports and you can only set the port depth.

> If you request a lower granular depth, Taverna will deliver the
> individual values to you one at the time as they are produced, and
> then finally deliver the parent list (at depth 1) (as in the 1-1 case)
> - in which case you can deliver your output.
How do I get the parent list. The subgraph filter service has only 
normal depths I/O ports.

Is there maybe an example out there or am I the only one who needs this 
approach. (I hope not)

Andreas


Am 01.09.2010 13:08, schrieb Stian Soiland-Reyes:
> On Wed, Sep 1, 2010 at 10:13, Andreas Truszkowski<[email protected]>  wrote:
>> I think you mean that I want to merge an input of depth 1 to depth 0. That
>> is not correct. As the attached picture shows, the previously executed
>> services were invoced several times through the sdf file reader. But I need
>> the filtered data (from the subgraph filter service) in one single step for
>> the reaction enumeration service. So the data collector should catch all
>> data coming from the subgraph filter service and push it forward once. Here
>> is the source of the data collector:
>>
>>      public Map<String, T2Reference>  work(Map<String, T2Reference>  inputs,
>> AsynchronousActivityCallback callback)
>>              throws CDKTavernaException {
>>          Map<String, T2Reference>  outputs = new HashMap<String,
>> T2Reference>();
>>          InvocationContext context = callback.getContext();
>>          ReferenceService referenceService = context.getReferenceService();
>>          List<byte[]>  dataArray = (List<byte[]>)
>> referenceService.renderIdentifier(inputs.get(this.INPUT_PORTS[0]),
>> byte[].class,
>>                  context);
> What you need to do in DataCollector, if you want to receive each
> Subgraphisomorphism_filter-value as they are produced, is to have it
> specify input port depth 1, with granular depth 0.
>
> Alternatively you can set both at depth 1 - in which case it's called
> once. You can then iterate over the incoming list using the reference
> service.
>
> If you request a lower granular depth, Taverna will deliver the
> individual values to you one at the time as they are produced, and
> then finally deliver the parent list (at depth 1) (as in the 1-1 case)
> - in which case you can deliver your output.
>
>
> In your code you only populate the RESULT_PORTS[0] output port in the
> final case - which is not correct  - you always need to provide values
> for all declared output ports.
>
> (That is unless you are also doing granular depth outputs - for
> instance you could have both streaming inputs and outputs, but with an
> additional tidy-up-case for the last item, or a non-streaming output
> port which you populate in the end)
>
>
>


------------------------------------------------------------------------------
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