workflows: added a decorator

* Adds a decorator to pass the atributes of a
  function to its closure.

Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>