[MOBY-dev] empty collections

Jason Reilly jdr0887 at renci.org
Tue Dec 12 16:18:21 UTC 2006


Hi all,

I have encountered an issue and want to get some feedback.  The issue is 
concerning empty collections.  Say, for example, I have a Taverna 
workflow where a Moby service takes a collection that passes *optional* 
parameters to the service.  In the case I am using, I wrote a blast 
service where it takes a few parameters like 'database' and 'blastType' 
(required), as well as a collection of parameters (optional) to be 
passed to the blast service.  When I run the workflow from Taverna and I 
leave the input for the collection empty/null, I get an NPE in the 
generated moby skeleton when it tries to synchronize.  If I just create 
a collection, but don't populate anything in it, Taverna throws a 
ServiceFailure ("At least one mobySimple object is needed to build the 
moby collection") .

I would propose just wrapping the synchronize block in a not null check, 
but it would be very easy to create another service....one with  
parameters and one without.  What is the intent of not allowing empty 
collections?  Is this a feature or a bug?







More information about the MOBY-dev mailing list