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 links
Test URL | https://aimdev.uconn.edu/api/index?key=[API KEY]&method=LOC_UPDATES&days=7&format=json |
Stage URL | https://aimtest.uconn.edu/api/index?key=[API KEY]&method=LOC_UPDATES&days=7&format=json |
Prod URL | https://aim.uconn.edu/api/index?key=[API KEY]&method=LOC_UPDATES&days=7&format=json |
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 Room input
[{"CAMPUS_ID":"01",
"CAMPUS_DESCRIPTION":"STORRS CAMPUS",
"BLDG":"0185",
"BLDG_DESCRIPTION":"MANSFIELD APTS BLDG 09 (4 UNITS)",
"FLOOR":"01",
"ROOM":"APT93",
"ROOM_DESCRIPTION":"Apartment",
"LOC_TYPE":"950",
"LOC_TYPE_DESCRIPTION":"Apartment",
"LOC_STATUS":"IN SERVICE",
"LOC_COMPANY":"UCONN",
"LOC_DEPT":"1000",
"LOC_DEPT_DESCRIPTION":"President",
"LOC_ORG":"1665",
"LOC_ORG_DESCRIPTION":"Residential Life",
"LOC_SPACE_TYPE":"ASSIGNABLE",
"LOC_CAPACITY":"0",
"LOC_PRI_USAGE":"AX",
"LOC_PRI_USAGE_DESCRIPTION":"Auxiliary",
"LOC_ASSIGNMENT_ID":null,
"LOC_GROSS_SQFT":"452.8800",
"LOC_USEABLE_SQFT":"452.8800",
"LOC_ASSIGNABLE_SQFT":"452.8800",
"LOC_NONASSIGNABLE_SQFT":"0",
"LOC_PLOYLINE_SQFT":"452.8800",
"LOC_SURVEY_ROLLUP_SQFT":"0"}}
Source Code Definition for Aim Room Data
JSON formatted |
---|
edu.uconn.webapi.model.aim.AimRoom.java |
KFS Table Definition
SH_Room_T | java field | Aim field | Description |
---|---|---|---|
CAMPUS_CD | campusCode | CAMPUS_ID | |
BLDG_CD | buildingCode | BLDG | |
BLDG_ROOM_NBR | buildingRoomNumber | ROOM | |
OBJ_ID | objectID | if new room, create new OBJ_ID | |
VER_NBR | versioNumber | if new room, set version number to 1 | |
BLDG_ROOM_TYPE | buildingRoomType | LOC_TYPE_DESCRIPTION | |
BLDG_ROOM_DEPT | buildingRoomDepartment | LOC_ORG_DESCRIPTION | |
BLDG_ROOM_DESC | buildingRoomDescription | LOC_DEPT_DESCRIPTION | |
ROW_ACTV_IND | activeIndicator | LOC_STATUS | when Aim is "DISPOSED", set KFS to "N", otherwise set to "Y" |
Requirements
- When the room does not exist in KFS, create an object id in KFS using java.util.UUID.randomUUID().toString() and set the version number to 1.
- When the room status in Aim is “DISPOSED”, the set the active indicator in KFS to “N”, otherwise set it to “Y”.
- When the room exists in KFS, just update the row with the supplied data, otherwise insert a new row using the supplied data.
- Create a formatted report file to list all transactions. The first line of the file is contains the process date and report title, the second line contains the column headings, and the last line of the file is “***End of Report ***”.
- Send an email to inventorycontrol@uconn.edu with the input JSON in the body and the formatted report as an attachment.
Location and name of the report file
uconn_configs/webapi/config/batch | |
---|---|
roomData_yyyymmdd_hhMMSS_SSS.txt | where yyyy = year, mm=month, dd=day, hh=hour, MM = minute, SS=seconds, SSS=sequence number |
Sample Report
(Use Notepad++ to view)
roomData_20200507_105737_319.txt
Execution Command
/webapi/updateRoomsFromAim.html |
Control-M Schedule and Job
UAT | ||
PRD |