'This allows to map names of input files to metadata default values. Example:
<data format="tabular" name="output" label="Tabular output, aggregates data from individual_inputs" >
<actions>
<action name="column_names" type="metadata" default="${\',\'.join([input.name for input in $individual_inputs ])}" />
</actions>
</data>'

def set_metadata_defaults(self, output, dataset, tool, on_text, trans, incoming, history, params, job_params):

    if output.actions:
        for action in output.actions.actions:
            if ((action.tag == 'metadata') and action.default):
                metadata_new_value = fill_template(action.default, context=params).split(',')
                dataset.metadata.__setattr__(str(action.name), metadata_new_value)
