I have a question about resourceLabels. I want to add the sample names as tags to allow us to do some cost tracking in AWS, I have something like this right now:
If you inspect the task object you will see there is no id property, but index. And maybe that’s not what you’re looking for, as it’s not a workflow-wide unique id.
You could use something like: "$task.process:$ifile" where ifile is the sample name, and you still have the process name, in case this input file is provided to other processes too.
There was a typo in the first version of this message. I meant $ifile not $task.ifile.
Thanks Marcel! In this case I actually don’t want a unique id, but rather one that is the same for all processes for the same sample. Basically the question I’m trying to answer is, “how much have we spent on analyzing sample x in AWS?”
Note @johandahlberg, that the sampleId is not a property of task. If the variable is defined as input in the process, it will be available in scope when the closure is evaluated.
With the help of your suggestion I was able to figure it out. This is what I arrived at in the end. We want to attach this to all processes where meta.id is available, so hence the null checking below.