CollectionReader actor throws exception when input file contains Metadata or Parameter elements
The CollectionReader actor reads in an XML representation of the input to a COMAD workflow and translates the Collection, Data, Metadata, Parameter elements etc into tokens that serve as input to the rest of a workflow.
A bug has emerged that prevents these input files from containing Metadata or Parameter elements. The exception thrown for a Parameter element is:
#1 Updated by Timothy McPhillips almost 11 years ago
The problem was that AnnotationSet was trying to record invocation dependencies implied by the addition of annotations or metadata to the set and store this information in the collection containing the annotated item. But this collection is not defined when CollectionReader is importing metadata elements from an input XML file because the class builds up a list of annotations to apply to the next collection or data element and before actually encountering that element in the input file. Simply avoiding the recording of these invocation dependencies when the collection is undefined fixes the problem; because no invocation dependencies are implied by importing elements from an input xml file anyway, this fix should not cause other problems.