Skip to main content
10-Marble
August 30, 2022
Solved

ESI response xml is generated with wrong language specific formats

  • August 30, 2022
  • 2 replies
  • 1815 views

Dear all,

 

when a ESI xml is generated, the number and date formats are always following the language that the user has chosen in the UI. That means e. g.

English : 0.000

German: 0,00 (Comma instead of a dot)

Same for date formats.

This is very annoying because the connected systems are getting the values in the wrong formats and this is then causing errors..

Is there any way to confiqure that behaviour in order to get date and numeric values always in english

format?

 

We are using Version 11.1.

 

Thanks,

Juergen

Best answer by d_graham

@JD_8606834 , hi

 

Are you using the OOTB "Release to Manufacture" workflow or a copy of it?

If yes, take a look at the "Release" expression robot.

You can comment out the existing line below

java.util.Locale lcl = wt.util.LocaleUtilities.makeLocale(locale);

and instead do something like this to always be English or whatever.

java.util.Locale lcl = java.util.Locale.ENGLISH;

 

or, and I like this better, add the following to set the OOTB process String variable "locale" and the Locale to English.

I like this the best as it keeps the String variable and the Locale in synch in the event the variable is used anywhere else in the workflow.  A query of the dB shows locale is not used elsewhere in the OOTB workflow but you might be.

locale = java.util.Locale.ENGLISH.toString();

java.util.Locale lcl = java.util.Locale.forLanguageTag(locale);

 

FYI, I did not test this so please test and let me know if this fixes the issue.

 

David

 

 

 

2 replies

1-Visitor
August 30, 2022
10-Marble
August 31, 2022

Hi Florent,

 

I will have a look, thanks a lot.

 

Best,

Jürgen

d_graham18-OpalAnswer
18-Opal
August 31, 2022

@JD_8606834 , hi

 

Are you using the OOTB "Release to Manufacture" workflow or a copy of it?

If yes, take a look at the "Release" expression robot.

You can comment out the existing line below

java.util.Locale lcl = wt.util.LocaleUtilities.makeLocale(locale);

and instead do something like this to always be English or whatever.

java.util.Locale lcl = java.util.Locale.ENGLISH;

 

or, and I like this better, add the following to set the OOTB process String variable "locale" and the Locale to English.

I like this the best as it keeps the String variable and the Locale in synch in the event the variable is used anywhere else in the workflow.  A query of the dB shows locale is not used elsewhere in the OOTB workflow but you might be.

locale = java.util.Locale.ENGLISH.toString();

java.util.Locale lcl = java.util.Locale.forLanguageTag(locale);

 

FYI, I did not test this so please test and let me know if this fixes the issue.

 

David

 

 

 

10-Marble
September 6, 2022

Hi David,

 

sorry for the late reply, but we were busy and we couldn't implement your solution immediately.

But it seems, that your advice fixed the problem.

We are still testing but it looks good so far.

 

So thank you very much, that saved us a lot of time.

 

Thanks,

Jürgen