Epsilon analyzes four aspects of a macro to expand it at runtime:
Properties: When a user runs a workflow that contains macros, the properties of the user are checked for any property that might bear the same name as the macro. If a property of the same name is found, the macro is replaced with the value of that property.
For example: If a task has a property BACKUP=bkdir
, the @@BACKUP@@
macro is replaced with the string bkdir, and the script cp daily.log /var/@@BACKUP@@/
changes to cp daily.log /var/bkdir/
. This allows generic scripts to be used by multiple users or groups.
Workflow Arguments: Epsilon workflows can define runtime arguments. You can enter these runtime arguments on the Workflow run screen.
For example: A workflow contains BACKUP as a runtime argument. When a user starts this workflow, Epsilon prompts the user to enter a value for BACKUP. Any script in this workflow that contains the @@BACKUP@@
macro will expand the macro to the value that you enter at runtime.
Builtin macros: Epsilon supports a large number of built-in macros. You do not have to set properties or workflow arguments for the macros to be expanded. See the exhaustive list of builtin macros supported in Epsilon.
Eval tasks: In an advanced usage scenario, the output of an eval task is used to dynamically update the values of properties associated with a workflow. Because macros are expanded after analyzing properties, eval tasks can be used to compute values for macros at runtime. See additional information about eval tasks in the Epsilon Cluster Workflow Developers guide.
The Epsilon Cluster Workflow Developers guide contains a chapter on using Macros.