System Value sources provide access to special values passed in from the execution environment.
Environment
This system value source has several sub-sources, each providing different information.
Vars
Returns a map of environment variables. Access individual variables using an expression like:
$$"env"."vars"."<variable-name>"
Java/JVM system properties
Returns a map of Java system properties. Access individual variables using an expression like:
$$"env"."props"."java.version"
Many Java system properties are set automatically, such as java.version, shown above. Some are listed here. Custom system properties can be set from the Java command-line, as shown below. But note that these cannot be passed from the Muse CLI - only mentioned here for the case where Muse tasks are executed by your code running in a JVM.
java -Dcustom1=value1 -Dcustom2=value2 MyAppClass
Home folder
Returns the path to the current users's home folder (as provided by the OS to the JVM). Access using this expression:
$$"env"."props"."user.home"
Username
Returns the current username (as provided by the OS to the JVM). Access using this expression:
$$"env"."username"
Hostname
Returns the hostname of the computer (as determined by the DefaultEnvironmentPropertiesProvider class - see it for details). Access using this expression:
$$"env"."hostname"
Other
Command-line options
Access command-line options by name.
Named options are passed through the Muse CLI like this:
muse -o param1=value1 -o param2=value2 run task1
Access the options like this:
$$"cli"."param1"
ExecutionId
Provide the unique ID assigned to the task execution.
$$"ExecutionId"
Operating System
Provides the name of the operating system (Windows, macOS, Linux, unknown).
$$"opsys"
Project Location
Provides the location of the project storage.
$$"project-location"
Task
Provides access to metadata about the task.
$$"task"."id"