How to avoid generating duplicate sequence number?

377 views Asked by At

I need help with an issue I am facing in generating sequence numbers. I am generating sequence number during payment approval rule. However, every time I complete a payment, I get a validation/warning message from check wizard 3rd step. If I try to complete the payment again, the sequence util generates another sequence number. This is causing duplication and confusion. How can I prevent this from happening? I want the sequence util to stop generating new sequence numbers if there are any validation/warning messages.

2

There are 2 answers

0
Uday Mulinti On

Sequence Util guarantees unique numbers and does not generate duplicate numbers. The scenario described above may result in unused sequence numbers if called multiple times during a single flow but do not generate duplicates.

Please verify if you can delay the invocation of Sequence Util until all validations are passed to avoid unused sequence numbers.

0
SteveDrippsCentricConsulting On

I am assuming you are trying to create a check from the Check Wizard in ClaimCenter. Please let me know if this is correct.

When a new sequence number is generated from the DB, that number cannot be re-used even if the check payment is abandoned because of some error. You will probably want to find the root cause of the error that is causing the payment to fail. The sequence number util is behaving as designed. Once a check number (or any other number is generated) that number should not be able to be used again.