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¶
- Caller provides
IMGSYSfield values toclsImgsysorclsIndexBatch. - Generate the TOWID.
clsImgsys.BeforeCreateexecutes SQL-003 to obtain the next value fromtower.TOWER_SEQ.nextval(DUAL);AfterCreatedefaultsIdxfl = "N", setsScandt/Updttsto now, setsCrtrid/Updridfrom the create user (or the data-portal user ID if not supplied), and reads the generatedTOWIDinto the record. - Insert the IMGSYS row.
BeforeInsertexecutes SQL-012 to insert into IMGSYS. - Retrieve a single IMGSYS row.
clsImgsys.BeforeRetrieveexecutes SQL-030 byTOWID. - Retrieve a batch summary.
clsIndexBatch.BeforeRetrieveexecutes SQL-031 to retrieve non-indexed, non-deletedIMGSYSrows grouped by batch ID. - Retrieve the active batch list.
clsIndexBatchCollection.BeforeRetrieveexecutes SQL-032, which excludes indexed (IDXFL <> 'N') rows, deleted (DELCD <> ' ') rows, and any batch whose uppercasedBATIDisAUTOIMPORTorFAXIMPORT(BR-IMG-06). - Update batch fields.
clsIndexBatch.BeforeUpdateexecutes SQL-038 to updateSCANDTandBATIDfor the batch's rows. - Soft-delete a batch.
clsIndexBatch.BeforeDeleteexecutes SQL-044, settingDELCDrather than physically removing theIMGSYSrows. - Verify lifecycle operations.
AfterInsert/AfterUpdateonclsImgsysandclsIndexBatchenforce 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/AfterUpdatemethods onclsImgsysandclsIndexBatchenforce exactly-one-row-affected checks and raise error messages on failure.clsIndexBatch.BeforeDeleteperforms a soft delete (settingDELCD) rather than a physical row removal, so deleted batches remain inIMGSYSbut are excluded from subsequent active-batch queries.clsIndexBatchCollection.BeforeRetrieveexcludes batches withBATIDAUTOIMPORTorFAXIMPORTfrom the manual indexing worklist regardless of their indexed/deleted state otherwise matching (BR-IMG-06).
Related documentation¶
Sources¶
Business\SAIF.Business.Imaging\clsImgsys.vbBusiness\SAIF.Business.Imaging\clsIndexBatch.vbBusiness\SAIF.Business.Imaging\clsIndexBatchCollection.vb