Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This integration is a web service.  It is called via a batch job.  Data will be retrieved from Aim, via a web service.  The data is in JSON format.  The batch job will execute using Spring Batch to retrieve the data, insert or update records in the database, and send an email with a report file attached.


...

Aim Web Service Documentation

Test Aim from local machine

Access/permission to the Aim site is needed.   Contact Aim ITS Administrator for access. Provide IP address and machine name.

Sample JSON Building input

...

[{"CAMPUS_ID":"01",

"CAMPUS_DESCRIPTION":"STORRS CAMPUS",

...

"ASSIGNABLE_SQFT":"3,117.34"}]

Source Code Definition for Aim Building Data

...

JSON formatted
edu.uconn.webapi.model.aim.AimBuilding.java

KFS Table Definition

...

SH_BUILDING_T  

java field Aim fieldDescription
CAMPUS_CDcampusCodeCAMPUS_ID
OBJ_ID    objectID        
if new building, create new OBJ_ID
VER_NBRversioNumber
if new building, set version number to 1
BLDG_CDbuildingCode BLDG
BLDG_NMname  BLDG_DESCRIPTION
BLDG_STR_ADDR streetAddress  BLDG_ADDRESS1
BLDG_ADDR_CTY_NMcityBLDG_CITY 
BLDG_ADDR_ST_CD stateCode BLDG_STATE_CODE
BLDG_ADDR_ZIP_CD   zipCodeBLDG_ZIP
ALTRNT_BLDG_CD alternateBuildingCodeBLDG_OWNED_YN
ROW_ACTV_IND  activeIndicator   BLDG_STATUSwhen Aim is "disposed", set KFS to "N", otherwise set to "Y"
BLDG_CNTRY_CD countryCode
hardcode "US"

Requirements

...

  1. When the building does not exist in KFS, create an object id using java.util.UUID.randomUUID().toString() and set the version number to 1.
  2. When the building status is “DISPOSED”, the set the active indicator to “N”, otherwise set it to “Y”.
  3. Set the country code to “US”.
  4. When the building exists in KFS, just update the row with the supplied data, otherwise insert a new row using the supplied data.
  5. Create a formatted report file to list all transactions.  The first line of the file is a header, the last line of the file is “***End of Report ***”.
  6. Send an email to inventorycontrol@uconn.edu with the input JSON in the body and the formatted report as an attachment.

Names of the files:

...

Location and name of the report file

uconn_configs/webapi/config/batch
roomData_yyyymmdd_hhMMSS_SSS

...

.txtwhere yyyy = year, mm=month, dd=day, hh=hour, MM = minute, SS=seconds, SSS=sequence number

Execution Command

...


/webapi/updateBuildingsFromAim.html 

Control-M Schedule and Job

...




UAT

...



PRD

...