wm.b2b.edi.util.formatServices:formatN2 not returning N2 format

Trying to use the formatN2 transformer to transform a value into N2 format. Below are my inputs and outputs:

Service In
value: mapped to a string element in the pipeline. In testing, the element contains the value of “1.408”.
direction: convertToString
validate: true
minLength: left blank. Also tried with a value of “1”.
maxLength: left blank. Also tried with a value of “15”.
FormatInfo: left blank.

Service Out
formattedValue: “1.408”
valueToValidate: no value appears to be returned.

I’m expecting a value of 140 to be returned as the formattedValue. Assuming the value being validated should be coming through in valueToValidate. Any help on troubleshooting this issue appreciated.

under FormatInfo, try to add:
DecimalCharacter = .
you jvm’s default value may not be .

Hi Tong,

Thanks for the suggestion. As input for FormatInfo, I added a row where the Name is “DecimalCharacter” and the associated value is “.”; however, this did not yield a resolution.

Implemented an ad hoc solution in two steps instead. The first step changes the precision of the number to be two decimal places. The second step multiplies the number by “100” to get to the N2 format.

Thanks,

Ken