Note: This content is specific to NYSDOT clients and environments.

Introduction

This guide is meant for AgileAssets implementation engineers implementing content import for NYSDOT. This guide assumes basic knowledge of AMS system jobs and familiarity with NYSDOT CR-13.

The system job is implemented by class com.agileassetsinc.custom.nysb.InspectionDataContentLibraryImport and may be found in the job schedule as 'Import bridge inspection content'.

Pre-requisite Configuration

This system job is intended for and tested against Oracle Web Content Center (WCC) as the content manager in AMS. Our development is server configured similar to NYSDOT's.

WCC connections: It will try to use 5 concurrent connections to import files

Performance: The memory and disk speed of the WCC server hardware are likely be the biggest factors in import performance.

Directory Parameter

The sole parameter to this import job is the path of the directory that contains BIN directories.

Behavior

File system mapping

Within the BIN directory each folder hierarchy contributes an element of the content meta-data stored in CONTENT_LIBRARY

  1. Bridge Name - the first level of directory identifies a bridge name that must be in IDENT_INV_ELEMENT.INV_ELEM_NAME or an error will be recorded.
  2. Content Type - the second level directory name identifies a content type that corresponds to (is getserted from) SETUP_CONTENT_TYPE.
  3. Content files - each file in content (2) directories is imported with its absolute path, the INV_ELEM_ID, and CONTENT_TYPE_ID associated.

Exceptions: Content Type directories named "InspectionReports" and "StandardPhotos" are excluded from import.

Import technical details

Directories nested below content type (2) directories are simply ignored.

5 concurrent connections are used to execute the file imports and exits with just a log statement after completion.

Idempotent: Successful imports are recorded in CONTENT_LIBRARY_IMPORTS (absolute path, file size, timestamp) so they are not re-imported in case of successive runs.

AgileAssets engineers may query performance and see most recent activity in some detail:

Aggregate import performance
-- bytes/hour:
-- Whole job
SELECT sum(CONTENT_SIZE)/(24*(max(DATE_UPDATE)-min(DATE_UPDATE)))
FROM CONTENT_LIBRARY_IMPORTS;
-- Past hour
SELECT sum(CONTENT_SIZE)/(24*(max(DATE_UPDATE)-min(DATE_UPDATE)))
FROM CONTENT_LIBRARY_IMPORTS
WHERE DATE_UPDATE > (CURRENT_TIMESTAMP-NUMTODSINTERVAL(1, 'HOUR'));
  • No labels