BuildMaster Documentation

BuildMaster - Invoke Module

  • Last Modified: 2020-06-26

This is generated from the built-in components of BuildMaster 6.2.13, and may be different than what you have installed (especially if you have extensions); go to [User Icon] > Documentation within your BuildMaster instance to see exactly what operations are available.

Invoke Module

Executes an OtterScript module stored in BuildMaster.

Script usage:

Invoke-Module(
	Module: <text>,
	[Arguments: <%(key1: value1, ...)>],
	[CaptureOutputArguments: <@(text)>]
);

This operation may be prefixed with BuildMaster::, although this is a built-in namespace and isn't really necessary.

Arguments:

Name Format Script Usage Usage Notes
Module (default)
text
Module
This argument is required.
Arguments
%(key1: value1, ...)
Arguments
Specify arguments to pass in to the module using a map. If any required values are not supplied, a runtime error will be raised. For example: %(arg1: value, arg2: @(list,of,items))
Capture output arguments
@(text)
CaptureOutputArguments
Specify output arguments to capture and set in the calling scope as variables using a list. For example: @(filePath,errorMessage)

Note: Runtime variables you've defined before executing an Invoke operation will not be visible to the invoked script, and variables that you set within the invoked script will not be available.

Example:

# This will call the global "MyModule" module and pass in an argument called $name with value "Steve"
Invoke-Module global::MyModule
(
    AdditionalArguments: %(name: Steve)
);

Is this documentation incorrect or incomplete? Help us by contributing!

This documentation is licensed under CC-BY-SA-4.0 and stored in GitHub.

Generated from commit ced119d5 on master