Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Inside a Pipeline you can declare a custom macro using the command macro and reuse it by calling the command macro.run.

Status
colourBlue
titleSINCE VERSION 9.0

Table of Contents

What is a Pipeline Macro?

A Pipeline Macro or just Macro in short is a single Pipeline Expression which can be declared inside a pipeline an automation 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 . It 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.

...

In order to call a macro from another position in the pipeline, you have to first declare it using the command macro and to define a name for the macro unique inside the pipelie using the parameter name.

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:

...