REST Integration Specification Medtronic - SST Core Data Cache
REST Integration Specification Medtronic - SST Core Data Cache
REST Integration Specification Medtronic - SST Core Data Cache
Sapient
10 Nov. 2014Medtronic
Table of Contents
Table of Contents
1
Overview 4
1.1 Purpose 4
1.2 Audience
4
1.3 Glossary of Terms
4
SST Core Data Cache Queue
5
2.1 Assumptions
5
2.2 Approach
5
2.3 Process Flow -- POST
5
2.3.1 Process Flow - Request Data (multi-part request: meta data followed by
the Core Data file)
6
2.3.2 Response Data POST Core Data Cache
6
2.4 Process Flow -- GET
7
2.4.1 Process Flow - GET Request Data
7
2.4.1 Response Data GET Core Data Cache
7
2.5 Process Flow Exception Scenario(s)
7
Exception Handling Strategy
8
Document References
MAY 29 2015
9
10
Revision History
Date
Version
Description
Author
28-Oct-2014
0.1
Sapient Nitro
18-Nov-2014
0.2
Draft
RP Nelson - MDT
23-dec-2014
0.3
RP Nelson
03-Feb-2015
0.4
P. Ericksen - MDT
May 29 2015
May 29 2015
Overview
3.1
Purpose
This document captures the REST integration requirement, design and approach for Medtronic
ecommerce platform.
May 29 2015
3.2
Audience
The different groups of audience members to which this document applies to are:
a)
Medtronic IT Team.
b)
c)
May 29 2015
3.3
Glossary of Terms
May 29 2015
This integration is used to POST a Core Data (SQlite database) Cache (file) to the hybris server,
and to GET a Core Data (CD) file from the server. The CD file represents the SQlite database for
a specific user. This end point is intended to be used by Mac Mini workers which will have their
own unique service account in hybris.
The endpoint should be named: <base url>/api/v1/cache. For example, the SST mock services
endpoint is: https://entmobt.medtronic.com/api/v1/cache
May 29 2015
4.1
Assumptions
The following assumptions are applicable:
a)
b)
Mac Mini worker login has Queue Worker group membership in Hybris.
c)
Mac Mini has successfully created a core data file for an active SST user.
May 29 2015
4.2
Approach
a) Use the sync endpoint to GET the full sync file for the user.
b) Use the cache endpoint to POST the core data database back to the server.
c) Use the cache endpoint to GET the core data database from the server.
May 29 2015
4.3
1. A new database will be created for each user at least every 24 hours.
2. External business process identifies that a new core data cache database needs to be built,
for which there is no pre-existing database file or the version is old. This use case includes:
new user created, realigned user, on-demand (ex: expired cache on device due to data
refresh or logout), or manual request (help desk determines user needs full data
refresh/reinstall of application).
3. External process adds a work request to the queue.
4. The hybris server notifies the primary Mac Mini worker (responsible for managing the work
across the Mac Mini group) that new work items are on the queue. If a notification does not
occur within a configurable span of time, then the primary Mac Mini worker will periodically
poll queue to see if there is any work to do.
5. The server needs to change the status of the work items (ex: set to processing) sent to the
worker machines so that it does not resend them.
6. Once the Mac Mini workers know about work items on the work queue, then one of the Mac
Mini workers does a GET to grab the full sync file for that user, using the full sync endpoint
(see Mobile Data Sync ISD) from the Hybris server.
7. The worker processes the data sync file and creates a core data database for the user.
8. The worker compresses the core data database
9. The worker posts the compressed core data database back to the Hybris server (see
ISD_TransactionCoreDataCache).
10. Upon successful save, the server should set the status of the work queue item to completed
or processed (queue item is no longer available).
May 29 2015
3.1.1
Process Flow - Request Data (multi-part request: meta data followed by the
Core Data file)
Request Attribute
Data
Type
Description
sessionToken
String
preferredLanguage
String
id
String
createDateTime
Unix
Date
userId
String
queueId
String
dataBytes
May 29 2015
Bytes
Comments
3.1.2
An HTTP Status code of 200 OK is all that is expected from a successful response.
May 29 2015
May 29 2015
4.4
May 29 2015
3.1.3
Request Attribute
Data
Type
Description
sessionToken
String
preferredLanguage
String
userid
String
May 29 2015
Comments
Request Attribute
Data
Type
Description
dataBytes
Bytes
May 29 2015
Comments
May 29 2015
4.5
See ISD_REST_Response_Exception_Handling.docx
May 29 2015
REST Services exception handling would be based on existing hybris OOB REST exception framework.
The base controller
com.medtronic.b2b.commercewebservices.v1.controller.BaseController shows the exact
usage and need to be enhanced to accommodate BusinessException and
SystemExceptions.
May 29 2015
May 29 2015
Document References
Description
Location
May 29 2015
May 29 2015
May 29 2015