Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A Pipeline Macro or just Macro in short is a single Pipeline Expression which can be declared inside a pipeline using the command macro and then reused at multiple places of the pipeline using the command macro.run. It is similar to a function / method definition and its call, but it is limited to the execution of a Pipeline Expression.

If you need to implement an and reuse more sophisticated logic, consider to call a sub-pipeline by using the command pipeline.run instead.

...

The parameter args defines the (optional) parameters to the macro as name-value pairs.

This These arguments can be directly accessed by their names inside to the macro expression.

...

Info
  • A callable macro must be declared first in the pipeline, before it can be called.

  • It's good practise practice to define callable macros always at the very top of the pipeline.

  • Callable macro names must be unique within a pipeline.

  • A callable macro (= has name parameter) will be ignored by the pipeline flow and must be explicitly called using the command macro.run.

...

As soon as such a macro has a name assigned, it will no longer be executed by the default pipeline flow, but ignored. Now, it can only be executed only by calling the command macro.run.

...

In case you do not define any args in macro.run, the default args will be used. So, the output here would be:

...