Environment Variables
The Dynamic Message Mapper can reference environment variables when setting the default values for fields or output parameters by using the #env prefix.
The following example uses the value of the LOGNAME environment variable when setting the
default value for the firstOutputParameter
output parameter.
The example shows how to use an environment variables as the default value of the output
parameter called outputParameters
:
firstOutputParameter: {from: "ChargingDataRequest.multipleUnitUsage.ratingGroup", default: "#env.LOGNAME"}
The following example shows how to set the value of a LOGNAME environment variable as the
default value for the targetFieldOne
field mapping.
In the example, an environment variable is used for the default value of a field mapping called
fieldMappings
:
targetFieldOne: {from: "sourceMsg.sourceFieldOne", default: "#env.LOGNAME"}