Sequences
Last updated
Last updated
In some automations, it's necessary to create sequential numbers to send IDs to destination applications. TunnelHub has a sequence mechanism based on the SDK for this situation.
For this, first, you must go to the dashboard in the desired environment and create a sequence with a unique name and an initial value.
Once created, you reference it in the code of your integration using our SDK:
The method getSequenceNextValue increments and returns the new incremented value. There is already a treatment for concurrent requests, an atomic process, which does not allow the creation of the same numbering in parallel calls.
If you need to know the current value only, you can use the code below: