“Broken” output after I did a copy and paste of your code. I think that I am going to have to speak to a developer and find a way to force the “.” when doubles are converted to strings.
It does not happen when I use a “number to string” node so it must be something in this particular snippet.
You can force a specific locale during conversion, to ensure consistent results, by setting it explicitly in your code, like in this example from stackoverflow:
DecimalFormat df2 = new DecimalFormat("#.##");
df2.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ENGLISH));
I agree with @gab1one , this kind of behaviour is usually because of the region setting. For example, I know that comma is used instead of dot in French.
@TigerCole I think the setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ENGLISH)) suggested by @gab1one should work as it looks like it will force the Locale to English.
My apologies for the delayed response to the comments. I am not sure why, but for some reason having my computers regional settings set to “South Africa” seemed to be the problem. I changed to UK and configured it to work for me and “voila” my workflow works.
I have spoken to our developers who are really experienced Java developers and they could not figure out why South African regional setting caused a problem. It may be that Java is reading the default for region and not picking up the changes in my local configuration.
Thanks for all the support. It is much appreciated.