Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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.



Test URLhttps://aimdev.uconn.edu/api/index?key=[API KEY]&method=LOC_UPDATES&days=7&format=json
Stage URLhttps://aimtest.uconn.edu/api/index?key=[API KEY]&method=LOC_UPDATES&days=7&format=json
Prod URLhttps://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 Data

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

KFS Table Definition

SH_Room_T  

java field Aim fieldDescription
CAMPUS_CDcampusCodeCAMPUS_ID
BLDG_CDbuildingCode BLDG
BLDG_ROOM_NBRbuildingRoomNumberROOM
OBJ_ID    objectID        
if new room, create new OBJ_ID
VER_NBRversioNumber
if new room, set version number to 1
BLDG_ROOM_TYPEbuildingRoomTypeLOC_TYPE_DESCRIPTION
BLDG_ROOM_DEPTbuildingRoomDepartmentLOC_ORG_DESCRIPTION
BLDG_ROOM_DESC buildingRoomDescription  LOC_DEPT_DESCRIPTION
ROW_ACTV_IND  activeIndicator   LOC_STATUSwhen Aim is "DISPOSED", set KFS to "N", otherwise set to "Y"

Requirements

  1. 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.
  2. When the room status in Aim is “DISPOSED”, the set the active indicator in KFS to “N”, otherwise set it to “Y”.
  3. When the room exists in KFS, just update the row with the supplied data, otherwise insert a new row using the supplied data.
  4. 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 ***”.
  5. 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.txtwhere yyyy = year, mm=month, dd=day, hh=hour, MM = minute, SS=seconds, SSS=sequence number

Execution Command


/webapi/updateRoomsFromAim.html

Control-M Schedule and Job




UAT

PRD

 


  • No labels