FS 308744 LFS EPOD-TTM Interface Changes

From Calidus HUB
Revision as of 11:07, 31 July 2013 by Anw (talk | contribs) (v0.2 - Estimate and Test Plan added.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)





Aptean Logo.png







LFS

LFS EPOD-TTM Interface Changes


CALIDUS ePOD

31st July 2013 - 0.2
Reference: FS 308744












































Functional Overview

Client Requirement

GPS Tracking functionality required within TTM.

Also, EPOD-TTM Interface needs to be split into multiple sections:

  • Initial upload only - comprising ORD and TRP messages
  • Tracking Updates only - comprising OIT and ARR messages
  • GPS Tracking Updates - comprising GPS messages
  • Confirmation only - comprising CAN, DEL or SIG messages

Solution Overview

WinMo and Android devices both send through a timed GPS tracking message to the server, in the following format:

<GPS_STATUS_REQUEST ID="0" SITE="L03" USER="nhill" PASSWORD="whatever" DEVICE_ID="whatever" 
  GPS_STAMP="-9.000000,50.000000" DEVICE_OS="Android 4.0.3" DEVICE_TYPE="Samsung I9300">
   <EPL_LOAD_ID>TRIP</EPL_LOAD_ID>
   <EPL_VEHICLE_ID>Trailer</EPL_VEHICLE_ID>
   <REQUEST_TIME_DATE>YYYY-MM-DDTHH:MM:SS</REQUEST_TIME_DATE>
</GPS_STATUS_REQUEST>

This is received and stored on the USER_AUDIT table, with the following columns:

  • EPL_SITE_ID
  • EPL_USER_ID
  • EPL_VEHICLE_ID
  • EPL_LOAD_ID
  • EPL_JOB_ID
  • EPL_MESSAGE_TYPE
  • EPL_GPS_COORD
  • EPL_AUDIT_DATE
  • EPL_AUDIT_TIME
  • EPL_JOB_TYPE
  • EPL_XFER_TTM_FLAG

This information will be used to create a new message to TTM (GPS), which will be imported by the TTM system and saved internally. This information will be used by a new TTM enquiry screen.

Scope

None.

Set-up

Pre-requisites

  • A working CALIDUS ePOD system.
  • A working CALIDUS TTM system, accessible to the CALIDUS ePOD system.

Menu Structure

None

Data

Data is expected to be configured as follows:

Table EPOD_XF_CONFIG:

  • EPL_XF_CONFIG_ID - As assigned to the Site or Job Group
  • EPL_DESCRIPTION - As required
  • EPL_XF_TYPE = "FILE"
  • EPL_XF_DESTINATION = As specified by the TTM system
  • EPL_XF_ID = "TTM"
  • EPL_WEB_USER = ""
  • EPL_WEB_PASSWORD = ""
  • EPL_XF_DIRECTION = "O"
  • EPL_EXPORT_FORMAT = "Image"
  • EPL_FILENAME = ""
  • EPOD_XF_MSG_TYPES = "ARR|OIT|GPS|CAN|DEL"

Functional Description

Database

Table EPOD_XF_CONFIG requires the following modifications:

  • EPOD_XF_MSG_TYPES (New field) - nvarchar(100)

Existing packages will be modified to allow the creating, editing and selecting of the new field, including but not limited to:

  • EPOD_XF_CONFIG_INSERT
  • EPOD_XF_CONFIG_SEARCH
  • EPOD_XF_CONFIG_SELECT
  • EPOD_XF_CONFIG_SELECT_INBOUND
  • EPOD_XF_CONFIG_UPDATE

The existing EPOD_XF_CONFIG DAL object will be changed to:

  • Read the new field
  • Add as a parameter and searchable item

Admin

Add the following new fields to the XF Config Maintenance screen:

  • EPOD_XF_MSG_TYPES - A text field with allowed text entries of pipe-delimited text. This should be enabled for entry for export ID "TTM" only.

Export - GPS Message Type

A new message type will be added to the Auto-Export TTM export, as follows:

  • Type GPS.

This message will be used for the following:

  • GPS Tracking

The message will be sent by finding all EPL_MESSAGE_TYPE of "GPS_REQUEST" on EPOD_USER_AUDIT where the interface flag is "", " " or "N" - a package will be written to do this. This will also check whether the GPS message has been configured.

Only those records with a non-blank GPS co-ordinate will be selected.

The records will be sorted by Site, User, Vehicle and Date/Time

All records found will be sent in one file.

The process will:

  • Start transaction
  • Build EVENT, EVENT_HEADER, EVENT_DETAIL and GPS_TRACKS XML tags for the message.
  • For Each Record Found:
    • Compare to Last Site/User/Vehicle
    • If different:
      • If not the first record, close GPS_POINTS tag
      • Build the GPS_TRACK XML detail information for the record and start GPS_POINTS.
    • Build the GPS_POINT XML detail information for the record.
    • Set the record interface flag to "Y"
    • Store Last Site/User/Vehicle
    • Build/append temporary file with XML information
  • Close GPS_POINTS, GPS_TRACKS, EVENT_DETAIL, EVENT_HEADER and EVENT tags and append to temporary file.
  • Send temporary file to final destination directory and filename
  • Commit transaction

GPS message format:

<?xml version="1.0" encoding="utf-8"?>
<OBS_XML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="file:///P:/OBS%20XML/LOTS%20tripOrder/LOTS-tripOrder%20v1.04.xsd">
 <EVENT>
   <EVENT_HEADER>
     <EVENT_PROCESSED>N</EVENT_PROCESSED>
     <EVENT_SOURCE_TYPE>EPOD</EVENT_SOURCE_TYPE>
     <EVENT_SOURCE_NAME>EPL_SITE_ID</EVENT_SOURCE_NAME>
     <EVENT_DATE>1697-02-01T00:00:00Z(NOW)</EVENT_DATE>
     <EVENT_TYPE>GPS</EVENT_TYPE>
     <EVENT_ACTION>C</EVENT_ACTION>
   </EVENT_HEADER>
   <EVENT_DETAIL>
     <GPS_TRACKS>
       <GPS_TRACK>
         <HAULIER>EPL_SITE_ID</HAULIER>
         <HAULIER_NAME>EPOD_SITE.EPL_DESCRIPTION</HAULIER_NAME>
         <DRIVER>EPL_USER_ID</DRIVER>
         <DRIVER_NAME>EPOD_USER.EPL_USER_NAME</DRIVER_NAME>
         <TRACTOR>EPL_VEHICLE_ID/REG?</TRACTOR>
         <GPS_POINTS>
           <GPS_POINT>
             <GPS_POINT_DATE>1697-02-01T00:00:00Z(EPL_AUDIT_DATE/TIME)</GPS_POINT_DATE>
             <TRACTOR_LAT>EPL_GPS_COORD(1)</TRACTOR_LAT>
             <TRACTOR_LON>EPL_GPS_COORD(2)</TRACTOR_LON>
             <TRIP_ID>EPL_LOAD_ID</TRIP_ID>
           </GPS_POINT>
         </GPS_POINTS>
       </GPS_TRACK>
     </GPS_TRACKS>
   </EVENT_DETAIL>
 </EVENT>
</OBS_XML>

Notes:

  • Field contents are taken from table EPOD_USER_AUDIT unless otherwise specified.
  • TRACTOR_LAT/LON are extracted from EPL_GPS_COORD. The text before the comma is LAT, after is LON.

Configuring TTM Message Types

The EPOD-TTM Interface will be modified to allow different message types to be sent separately:

  • Initial upload only - comprising ORD and TRP messages
  • Tracking Updates only - comprising OIT and ARR messages
  • GPS Tracking Updates - comprising GPS messages
  • Confirmation only - comprising CAN, DEL or SIG messages

This will be completed by adding a field onto EPOD_XF_CONFIG, called EPOD_XF_MSG_TYPES. This will be populated with the message types being sent, delimited by vertical bar, as follows:

  • TRP|ORD|ARR|OIT|GPS|CAN|DEL|SIG

The TTM processes will be modified to check that the individual message types are configured when sending, by checking that the message type being sent is in the string value of EPOD_XF_MSG_TYPES of the EPOD_XF_CONFIG record associated to the Job Group or Site. For example, when sending TRP messages, the configuration against the Site or Job Group should be checked that the message type is configured, or the record will not be sent.

The existing package EPOD_XFER_SELECT_JOB_COMPLETE_TTM will be modified to check the value of EPL_XFER_TTM_FLAG of EPOD_JOB <> 'Y' rather than = "N", as this will allow the interface to operate correctly even if the ORD messages are not being sent.

Improving Efficiency of Messages

Note Note: Please reference the specification under reference 310488 for details of how certain messages have been changed in how they are retrieved through the DAL.

The existing TTM message sending procedures should be modified to be brought into line as per the message sending here.

The changes required are:

  • The existing SELECT packages will be modified to retrieve the EPOD_XF_CONFIG records (from Job Group or Site) with the main record. The packages requiring modification are:
    • EPOD_XFER_SELECT_JOB_COMPLETE_TTM
    • EPOD_XFER_SELECT_LOAD_TTM
    • EPOD_XFER_SELECT_OIT_ARR_TTM
    • EPOD_XFER_SELECT_OIT_TTM
    • EPOD_XFER_SELECT_TTM
  • DAL objects will be created (inherited from the existing objects) if necessary to allow EPOD_XF_CONFIG objects to be declared as part of the returned object. New DAL objects required are:
    • EPOD_JOB_XFCONFIG (already created as part of 310448)
    • EPOD_LOAD_XFCONFIG
    • EPOD_USER_AUDIT_XFCONFIG
  • The existing functions for sending the TTM messages will be simplified to check the values of the XF_CONFIG property of the new DAL objects, rather that retrieve the records again. The functions that require modifications are:
    • EPOD_JOB.GetJobsXferTTM
    • EPOD_LOAD.GetLoadsXferTTM
    • EPOD_USER_AUDIT.GetOITARRXferTTM
    • EPOD_SYS_EXPORT
      • ExportTTM
      • ExportORD
      • ExportCANDEL
      • ExportOIT
      • ExportTRP

TTM Changes Required

Note Note: This section is not intended to be a full specification of requirements for TTM modifications, but instead a bullet list of changes required, for specification elsewhere.

  • New GPS interface handler in the Poller
  • New Location Tracking screen within TTM.

Appendix A: TEST PLAN

Test Script / Scenario ReferenceLFS EPOD-TTM Interface ChangesCall Number(s): 308744
Test Script / Scenario DescriptionTest the EPOD-TTM Interface changes made for LFSPASS / ISSUES / FAIL
Menu AccessNone 
Pre-requisitesNoneTested By:
 
Test ObjectiveTo test that: GPS Messages are sent and received between the systems as required; TTM Interface functionality can be split down by individual message type.Date:
 



Step Action Result Remarks P/F
1 TTM Interface Regression Tests      
  Ensure that the system is set up to export all TTM messages except GPS messages.      
1.01 Create 2 delivery Jobs. 2 ORD messages should be sent to TTM in the correct format    
1.02 Assign the jobs to a load. A TRP message should be sent to TTM in the correct format.    
1.03 Start the first Job on a device An OIT message should be sent to TTM in the correct format.    
1.04 Arrive at the Job on a device An ARR message should be sent to TTM in the correct format.    
1.05 Confirm the Job on a device A DEL message should be sent to TTM in the correct format.    
1.06 Cancel the second Job on a device A CAN message should be sent to TTM in the correct format.    


Step Action Result Remarks P/F
2 TTM Interface Configuration Tests      
  Ensure that the system is set up to export all TTM messages except GPS messages.      
2.01 Remove ORD from the TTM configuration. Create 2 delivery Jobs. No ORD messages should be sent to TTM.    
2.02 Remove TRP from the TTM configuration. Assign the Jobs to a new load. No TRP message should be sent to TTM.    
2.03 Remove OIT from the TTM configuration. Start the first Job on a device No OIT message should be sent to TTM.    
2.04 Remove ARR from the TTM configuration. Arrive at the Job on a device No ARR message should be sent to TTM.    
2.05 Remove DEL from the TTM configuration. Confirm the Job on a device No DEL message should be sent to TTM.    
2.06 Remove CAN from the TTM configuration. Cancel the second Job on a device No CAN message should be sent to TTM.    


Step Action Result Remarks P/F
3 TTM Interface GPS message Tests      
  Ensure that the system is set up to export all TTM GPS messages. Ensure GPS messages are enabled on the device.      
3.01 Create a delivery Jobs, assign to a load and start on a device. Start the first job and wait for GPS messages to be generated by the device into the server. GPS messages should be sent to TTM in the correct format.    


Appendix B: Quote & Document References

Cost Details
Activity Estimate
No. of Days
No. of Days Rate per Day (£) Cost (£ Exc. VAT)
Requirements 0.00 0.00 600 £0.00
Change Request Evaluation 0.00 0.00 600 £0.00
Functional Specification 0.00 2.00 600 £1,200.00
Technical Specification 0.00 0.00 600 £0.00
Development 0.00 8.00 600 £4,800.00
Testing and Release 0.00 2.00 600 £1,200.00
Implementation 0.00 0.25 600 £150.00
Project Management First argument to "number_format" must be a number. First argument to "number_format" must be a number. 600 £First argument to "number_format" must be a number.
 
TOTAL First argument to "number_format" must be a number. First argument to "number_format" must be a number.   £First argument to "number_format" must be a number.
Estimate excludes training, release to live and go live support.

B.1 References

Ref NoDocument Title & IDVersionDate
1   


B.2 Glossary

Term Definition
EPOD Electronic Proof of Delivery. The OBS EPOD system is CALIDUS ePOD.
CALIDUS eSERV The OBS mobile system to complete Service functionality in the field. This is part of the CALIDUS ePOD system.
PDA The mobile device on which the C-ePOD system will run in the field. This can be a Phone, EDA or industrial PDA, running Android.
DAL Data Access Layer. A mechanism for accessing data by the system that is removed from the application, allowing for simplified access and providing protection to the data, as only approved DAL methods can be used to modify it.
GPS Global Positioning System. A mechanism of retrieving accurate positioning information in the form of Latitude and Longitude (Lat-Long) co-ordinates from a device.
GPRS, 3G, HSDPA, Data Service All terms referring to mobile device network connectivity, and the speed at which the device connects to the internet.


B.3 Authorised By


Murray Middleton

Project Manager
_____________________________