on ‎2023 Oct 30 4:46 AM
We wanted to update the order number keygen to something like ABC00000000 and we updated the below properties in P1.
And then we restarted nodes and executed:
But the increments of this pattern are not expected.
We expected increments like ABC00000000. But, what the increments are: ABC000000RS
Can you please help to fix this?
Request clarification before answering.
Go to HAC, scrip type: "groovy" and execute below script:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When we execute spring.getBean("orderCodeGenerator").reset() in Scripting Languages, it will call resetNumberSeries() method. Then it will call resetSeries(key, type, tmp.getCurrentNumber()) method. The method will based on the key to reset "startValue", "Type" and "key", but it will not reset the Template. So when we execute the spring.getBean("orderCodeGenerator").reset() in Scripting Languages, it can not change the value of Template as setting in project.properties or local properties file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. Check the project.properties as below or add below settings to local.properties:
2. Restart server.
3.Check in HAC>>Console>>Flexible Search>>SQL search, execute "select * from numberseries". You will find the Value of the Template is still the 'ABC$'.
4. Go to HAC>>Console>>Scripting Languages, and execute the below groovy script (commit mode):
5.Check in HAC>>Console>>Flexible Search>>SQL search, execute "select * from numberseries". You will find the "order_code" NumberSeries is removed in the table.
6. Go to HAC>>Console>>Scripting Languages, and execute the below groovy script (commit mode):
7.Check in HAC>>Console>>Flexible Search>>SQL search, execute "select * from numberseries". You will find the new value of "Template" as expected: "TEST$".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.