Output Parameters
To produce output parameters from the
mapping, you must add a top-level element in your mapping configuration called
outputParameters
.
This is a map where the key is the name of the parameter and the value is the instructions for how the parameter must be populated. This structure is like how target fields are mapped. By default, they allow you to just specify the name of the source message field as a string.
This example shows a use of output parameter mappings:
outputParameters:
firstOutputParameter: "ChargingDataRequest.multipleUnitUsage.ratingGroup"
As with the field mapping, you can also specify a more complex object, which has more attributes, such as:
- Name of the field value mapper to use during type conversion.
- Default value to use if the mapping does not take place.
- Parameter type.
This example shows a more complex use of output parameter mappings:
outputParameters:
firstOutputParameter: "ChargingDataRequest.multipleUnitUsage.ratingGroup"
secondOutputParameter: {from: "ChargingDataRequest.pDUSessionChargingInformation.pduSessionInformation.ratType", fieldValueMapperName: "rattype", default: 4}
thirdOutputParameter: {from: "ChargingDataRequest.multipleUnitUsage.ratingGroup", type: "bigdecimal", default: "0"}
Like field mappings, the default value does not go through any custom field value mapper defined. The value is mapped directly from string to the output parameter type. This is also a string, unless specified using the type attribute.