About Sequence Numbers

A sequence number is simply a unique identifier for an object. TIBCO iProcess® Engine uses six different types of sequence number, as shown in the following table.

Sequence Number

Stored in table...

Unique identifier for a...

o_reqid

staffo

Work item

casenum

case_information

Case

proc_id

proc_index

Procedure

wait_id

wait

Outstanding Wait

def_id

cdqp_def

CDQP definition

cfg_id

cdqp_cfg

CDQP value

monitor_id

iap_monitor

Procedure that IAP is monitoring

provider_id

eaiws_jms_provider1

JMS provider

destination_id

eaiws_jms_destination2

JMS endpoints for JMS provider

These sequence numbers are generated on an “as required” basis by iProcess Engine, which calls one of the following stored database procedures:

sp_cdqp_cfg_sequence
sp_cdqp_def_sequence
sp_cnum_sequence
sp_procid_sequence
sp_reqid_sequence
sp_waitid_sequence
sp_iap_monitor_id_sequence
sp_eaiws_jms_provider_seq
sp_eaiws_jms_destination_seq

The procedure accesses the sequences table, increments the value of the seq_val column for the appropriate row, identified by the seq_id column, and returns that value. The returned value is then used as the next sequence number in the appropriate table.

Note: For more information about these stored procedures please see the database creation script (init2Kdb2.sql).

However, getting sequence numbers directly from the database in this way can create a performance bottleneck, because while one process is requesting a number it must block any other process from attempting to do so.

To minimize the effect of this bottleneck, you can assign a cache of a block of sequence numbers to a process, by using process attributes. The process gets a sequence number from its cache when it needs one, and only accesses the database to refresh the cache when it has run out of numbers. For more information, see "Sequence Caching" in TIBCO iProcess Engine Administrator's Guide.