support for accessing cascading metadata from within CompositeCoactor
The CompositeCoactor class extends TypedCompositeActor (and implements Coactor) to provide a mechanism for implementing coactors from SDF sub-workflows of conventional actors. Data is extracted from the read scope using input ports named according to the types of data to be extracted, e.g., a port named 'StringToken' will extract a single string token out of the current read scope and provide it as input to the subworkflow on each firing; a port named 'StringToken+' will provide an array token containing one or more string tokens extracted from the read scope on each firing, etc.
Currently, metadata or annotations applied to the top-level collection in a scope-match can also be extracted by specifying the key for the metadata element required (e.g., by naming a port 'StringToken [key=filename]'). One thing that can't be done is to access metadata applied to collections above the read scope and cascading down to it. This function would be very useful for reusing information across multiple invocations of a composite coactor.
#1 Updated by Timothy McPhillips about 10 years ago
I just committed an alternative version of CompositeCoactor that supports binding to cascading metadata (or annotations) associated directly or indirectly with a single data token bound by the same invocation of the composite. This appears to work as desired.
Before propagating this change to the original source file I want to (a) verify that the other functions of the class still work, (b) make the new feature work for an arbitrary number of bound data tokens, and (c) add support for the '?' qualifier indicating that the metadata is optional (i.e., that the composite should fire even if the metadata does not exist).