English
Groovy Code Example
About 87 wordsLess than 1 minute
2026-01-09
IncrementNumber rule = IncrementNumber.builder()
.counter('testCounter1') // Counter key, the auto-increment code requires unique keys. Changing the counter will reset the auto-numbering
.condition('MONTH') // Reset by year/month/day: `YEAR` `MONTH` `DAY` `NONE`
.postfix('-postfix') // Code suffix
.prefix('prefix-') // Code prefix
.serialNumber(4) // Number of digits for auto-increment code
.initialValue(1) // Starting value (must be ≥0, defaults to 1)
.steppingNumber(2) // Step increment (defaults to 1, must be ≥1)
.buildRule()
log.info(rule)