The functions described here are packaged in the System module. The module is included with the Mule runtime, but you must import it to your DataWeave code by adding the line import dw::System
to your header.
Example
1
2
3
4
%dw 2.0
import dw::System
---
System::envVar("SYS_PSWD")
This module contains functions that allow you to interact with the underlying system.
Functions
envVar
envVar(String): String | Null
Returns an environment variable with the specified name, or null
if it’s not defined.
Example
1
2
3
4
5
%dw 2.0
import dw::System
output application/json
---
System::envVar("SYS_PSWD")
envVars
envVars(): Dictionary<String>
Returns all of the environment variables defined in the hosted System.
Example
1
2
3
4
5
%dw 2.0
import dw::System
output application/json
---
System::envVars().SYS_PSWD