Capsule On-the-Fly

If writing a separate capsule for each script seems to be too much work, we offer another way to embed the encapsulation script directly into the flow description, i.e. inside of the FDL. We call this method "capsules on-the-fly" and is based on the FDL procedure "CAPSULE" to be invoked after the T or the J.

The CAPSULE procedure takes only one argument, the encapsulation script. This script is:
  • evaluated at build time
  • attached to the job as a property
  • evaluated at runtime by the vw wrapper
Example:
T vw ./run.job $block $step
CAPSULE {
    I -links $block.v
    O $block.$step.out.gz
}

If a capsule "on-the-fly" is found, all other capsules that could apply to the job are NOT evaluated.

Recommendations on using Capsules on-the-fly

  • Each capsule on-the-fly is evaluated by vovbuild by the same Tcl interpreter, meaning that there can be cross interference between the capsules. This means that it is important to keep the capsules simple and to try to avoid setting variables without cleaning them up.
  • Avoid changing the values of global arrays like env or make.
  • The command line is available in the variable $argv, without the leading wrapper vw. The variable $argv0 is set to "capsule_on_the_fly".