Skip to content

Imaging system management

IMGSYS is the low-level table that owns each image's TOWID (tower/image-object reference). clsImgsys manages individual IMGSYS rows, while clsIndexBatch and clsIndexBatchCollection build a batch-oriented worklist view over IMGSYS for the manual document-indexing process, excluding batches created by automated import pipelines.

Field Value
Operation ID OP-IMG-07
Trigger Caller creates a new clsImgsys row, retrieves an IMGSYS row by TOWID (clsImgsys) or a batch summary by batch ID (clsIndexBatch), retrieves the active batch list (clsIndexBatchCollection), or updates/deletes a batch
Inputs IMGSYS field values (BATID, CRTRID, SLEVEL, NPAGES, IFNDS, IFNID, etc.); for batch retrieval, a BATID
Outputs Persisted IMGSYS row (create/update), a populated clsIndexBatch/clsIndexBatchCollection (retrieve), or a soft-deleted batch (delete)
Primary components clsImgsys.BeforeCreate, clsImgsys.BeforeInsert, clsIndexBatch.BeforeRetrieve, clsIndexBatch.BeforeUpdate, clsIndexBatch.BeforeDelete, clsIndexBatchCollection.BeforeRetrieve
Entry point Business\SAIF.Business.Imaging\clsImgsys.vb, Business\SAIF.Business.Imaging\clsIndexBatch.vb, Business\SAIF.Business.Imaging\clsIndexBatchCollection.vb

Steps

  1. Caller provides IMGSYS field values to clsImgsys or clsIndexBatch.
  2. Generate the TOWID. clsImgsys.BeforeCreate executes SQL-003 to obtain the next value from tower.TOWER_SEQ.nextval (DUAL); AfterCreate defaults Idxfl = "N", sets Scandt/Updtts to now, sets Crtrid/Updrid from the create user (or the data-portal user ID if not supplied), and reads the generated TOWID into the record.
  3. Insert the IMGSYS row. BeforeInsert executes SQL-012 to insert into IMGSYS.
  4. Retrieve a single IMGSYS row. clsImgsys.BeforeRetrieve executes SQL-030 by TOWID.
  5. Retrieve a batch summary. clsIndexBatch.BeforeRetrieve executes SQL-031 to retrieve non-indexed, non-deleted IMGSYS rows grouped by batch ID.
  6. Retrieve the active batch list. clsIndexBatchCollection.BeforeRetrieve executes SQL-032, which excludes indexed (IDXFL <> 'N') rows, deleted (DELCD <> ' ') rows, and any batch whose uppercased BATID is AUTOIMPORT or FAXIMPORT (BR-IMG-06).
  7. Update batch fields. clsIndexBatch.BeforeUpdate executes SQL-038 to update SCANDT and BATID for the batch's rows.
  8. Soft-delete a batch. clsIndexBatch.BeforeDelete executes SQL-044, setting DELCD rather than physically removing the IMGSYS rows.
  9. Verify lifecycle operations. AfterInsert/AfterUpdate on clsImgsys and clsIndexBatch enforce exactly-one-row-affected checks and raise error messages on failure, following the same pattern used across the library's other business objects.

Process flow

The following diagram visualizes the imaging system management flow, including the batch worklist exclusion of automated-import batches.

flowchart TD
    Start([Caller provides IMGSYS<br>field values]) --> Which{Which action?}
    Which -->|Create| GenTow[BeforeCreate: generate TOWID]
    GenTow --> Insert[BeforeInsert: INSERT row]
    Insert --> Check{AfterInsert:<br>exactly 1 row?}
    Check -->|No| Error([Error raised])
    Check -->|Yes| DoneI([IMGSYS row created])
    Which -->|Retrieve one| RetrieveOne[BeforeRetrieve by TOWID]
    RetrieveOne --> DoneR([IMGSYS row loaded])
    Which -->|Retrieve batch summary| RetrieveBatch[BeforeRetrieve by BATID]
    RetrieveBatch --> DoneB([Batch summary loaded])
    Which -->|Retrieve active batch list| RetrieveList[BeforeRetrieve: non-indexed,<br>non-deleted, excl. AUTOIMPORT/FAXIMPORT]
    RetrieveList --> DoneL([Active batch list loaded])
    Which -->|Update| Update[BeforeUpdate: update SCANDT/BATID]
    Update --> DoneU([Batch updated])
    Which -->|Delete| SoftDelete[BeforeDelete: set DELCD]
    SoftDelete --> DoneD([Batch soft-deleted])

Failure and edge-case behavior

  • AfterInsert/AfterUpdate methods on clsImgsys and clsIndexBatch enforce exactly-one-row-affected checks and raise error messages on failure.
  • clsIndexBatch.BeforeDelete performs a soft delete (setting DELCD) rather than a physical row removal, so deleted batches remain in IMGSYS but are excluded from subsequent active-batch queries.
  • clsIndexBatchCollection.BeforeRetrieve excludes batches with BATID AUTOIMPORT or FAXIMPORT from the manual indexing worklist regardless of their indexed/deleted state otherwise matching (BR-IMG-06).

Sources

  • Business\SAIF.Business.Imaging\clsImgsys.vb
  • Business\SAIF.Business.Imaging\clsIndexBatch.vb
  • Business\SAIF.Business.Imaging\clsIndexBatchCollection.vb