> Schema  > Products  > SRTransport  > Documentation  > Architecture

 
  Processing Architecture

Understanding SRTransport's processing architecture is important if you want to write effective 4gl customizations. There is a specific sequence of events leading up to the row processing loop and a specific sequence of events once the loop is finished.

When a transport is Run, first a connection is established with the source (if one doesn't already exist). The source is then prepared for reading.

Then a connection is established with the destination, and the destination is prepared for writing.

Next any 4gl code in Run preprocessing is executed.

SRTransport then starts the row processing loop. The processing loop fetches a row, qualifies and validates it and then executes any Row preprocessing 4gl. At any of these points SRTransport can reject the row. If the row is not rejected the Value Expressions are executed and the row is delivered to the destination. At the end of the loop any Row postprocessing 4gl is executed.

Finally, after all of the rows have been processed, Run postprocessing occurs.

 
Data Source
Fetch Row
Qualifying Expression
Validating Expression
Row Preprocessing
Reject?      yes ==>  to .reject
no
|
\/
Value Expressions
Deliver Row
Row Postprocessing
|
\/
Prepare Source
Prepare Destination
Run Preprocessing
         Process All Rows    =====>
Run Postprocessing
|
\/
Data Destination