@@ -248,6 +248,18 @@ def evaluate(
248248 self .prospective_prov (job )
249249 customised_job = copy_job_order (job , job_order_object )
250250 self .used_artefacts (customised_job , self .workflow_run_uri )
251+ # if CWLPROV['prov'].uri in job_order_object: # maybe move this to another place
252+ # metadata = job_order_object[CWLPROV['prov'].uri] # change uri to CWLPROV['prov'].uri
253+ # for item in metadata:
254+ # # make a new entity with id
255+ # # give it type additionalType value
256+ # # add nested annotations
257+ # # how much of this can we reuse from _add_nested_annotations?
258+ # # how do we identify the correct file to write to? self.workflow_run_uri?
259+ # #
260+ # pass
261+
262+
251263
252264 def record_process_start (
253265 self , process : Process , job : JobsType , process_run_id : Optional [str ] = None
@@ -306,6 +318,9 @@ def _add_nested_annotations(self, annotation_key, annotation_value, e: ProvEntit
306318
307319 if not isinstance (annotation_value , (MutableSequence , MutableMapping )):
308320 e .add_attributes ({annotation_key : str (annotation_value )})
321+ elif isinstance (annotation_value , MutableSequence ):
322+ for item_value in annotation_value :
323+ e = self ._add_nested_annotations (annotation_key , item_value , e )
309324 else :
310325 nested_id = uuid .uuid4 ().urn
311326 nested_entity = self .document .entity (nested_id )
0 commit comments