On Sun, Oct 18, 2009 at 12:00, Yoshinobu Kano <[email protected]> wrote: > Does it mean I have to set the granular depth "0" for the input port of my > activity? > I set the depth to 1, but could not find any API to set a *granular depth* > for an *input* port.
It turns out you are unfortunately right, it is not possible to specify granular depth for *input* ports. I am sorry to have mislead you before, I did not remember the API details correctly.. I'm not quite sure why we don't allow such granularity for the input ports, but it might have something to do with the iteration strategies. Perhaps Tom will remember..? We talked about how you can achieve what you need to do, and I believe that you would need to create two activities and have two processors in the workflow, one that receives at depth 0, and a second one who does not receive anything, but has a conditional 'Run after' link to the first processor. You can then run anything you need to do 'after list completion' in the second processor - the problem then is how to pass the state from the first to the second activity - it depends on what you need to do in the second phase what you would need to pass. Another alternative is to accept at depth 1, but just as T2Reference's and do the for-loop internally in the activity, dereferencing one and one value of the list. You would thereby avoid the large memory usage, but that activity would not get called until the whole list is ready. A combination of these two approaches could also be considered.. For instance you can have the second activity receive a list of values, connecting that input port to an output port from the first activity (which would have depth 0). On the second activity's input port you would set that you want T2Reference as the type (instead of say String), and that way you could get rid of the conditional link. (This would also avoid the problem of when you have lists of lists, and you want several invocations of the second activity without waiting for all the lists to be produced) -- Stian Soiland-Reyes, myGrid team School of Computer Science The University of Manchester ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ 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
