Delete a temporary file created in a workflow


(Samuel Thiriot) #1

Hello !

I’ve a workflow in Openmole which chains a few tasks:
(1) generate a network using R/igraph and write it into a file,
(2) run a netlogo task which loads the network.
(3) aggregate the results using a standard aggregateCSV hook

I would like to add a step (4) to delete the file created in (1) and used in (2).

As far as I understand, I might either:

  • create a ScalaTask which takes the filename as an input and deletes the file.
  • create a hook which acts as a CopyFileHook but which deletes it instead. I guess it might be of use in other cases.

What do you think is the best option?

Tks !

Sam.