TEST
Add Multiple Photos to Export.
Requirement:
Since the product development of multiple photo capture within the processing of a job, the export process does not include these any more. The export must be modified to include these in a new structure under EPOD_JOB.
Solution:
A new XML tag will be added to the export - EPOD_PHOTOS. This will contain a collection of EPOD_PHOTO tags. This tag will contain all photos related to the job of any type.
<EPOD_PHOTO> <EPL_PHOTO_ID></EPL_PHOTO_ID> <EPL_DESCRIPTION></EPL_DESCRIPTION> <EPL_PHOTO></EPL_PHOTO> <EPL_LAST_CHANGED_DATE></EPL_LAST_CHANGED_DATE> <EPL_LAST_CHANGED_TIME></EPL_LAST_CHANGED_TIME> <EPL_SITE_ID></EPL_SITE_ID> <EPL_IMAGE_TYPE></EPL_IMAGE_TYPE> <EPL_KEYVAL_1></EPL_KEYVAL_1> <EPL_KEYVAL_2></EPL_KEYVAL_2> <EPL_KEYVAL_3></EPL_KEYVAL_3> <EPL_KEYVAL_4></EPL_KEYVAL_4> <EPL_KEYVAL_5></EPL_KEYVAL_5> </EPOD_PHOTO>
The details are:
- EPL_PHOTO_ID - a unique identifier of the photo.
- EPL_DESCRIPTION - a comment entered against the photo when taken.
- EPL_PHOTO - the photo, in BASE64-encoded JPEG format.
- EPL_LAST_CHANGED_DATE - the date the photo was updated
- EPL_LAST_CHANGED_TIME - the time the photo was updated
- EPL_SITE_ID - the unique site ID.
- EPL_IMAGE_TYPE - the type of image - see later
- EPL_KEYVAL_1 - key values based on the type.
- EPL_KEYVAL_2 - key values based on the type.
- EPL_KEYVAL_3 - key values based on the type.
- EPL_KEYVAL_4 - key values based on the type.
- EPL_KEYVAL_5 - key values based on the type.
Image types and key values are as follows:
EPL_IMAGE_TYPE | Description | EPL_KEYVAL_1 | EPL_KEYVAL_2 | EPL_KEYVAL_3 | EPL_KEYVAL_4 | EPL_KEYVAL_5 |
---|---|---|---|---|---|---|
J | Job Photo. | EPL_JOB_ID | ||||
JU/JU1/JU2/JU3 | Job UDF | EPL_JOB_ID | UDF Item ID | |||
C | Container | EPL_JOB_ID | EPL_CONTAINER_ID | |||
CU | Container UDF | EPL_JOB_ID | EPL_CONTAINER_ID | |||
P | Product | EPL_JOB_ID | EPL_CONTAINER_ID | EPL_PRODUCT_CODE | EPL_SEQUENCE | |
PU | Product UDF | EPL_JOB_ID | EPL_CONTAINER_ID | EPL_PRODUCT_CODE | EPL_SEQUENCE | UDF Item ID |
S | Service Item | EPL_JOB_ID | EPL_SERVICE_ID | |||
SIU | Service Item Info UDF | EPL_JOB_ID | EPL_SERVICE_ID | UDF Item ID | ||
SPR | Service Item Prework UDF | EPL_JOB_ID | EPL_SERVICE_ID | UDF Item ID | ||
SPO | Service Item Postwork UDF | EPL_JOB_ID | EPL_SERVICE_ID | UDF Item ID | ||
SDU | Service Item Diagnosis UDF | EPL_JOB_ID | EPL_SERVICE_ID | UDF Item ID | ||
LSU | Load Start Metrics UDF | EPL_LOAD_ID | UDF Item ID | |||
LEU | Load End Metrics UDF | EPL_LOAD_ID | UDF Item ID | |||
VC | Vehicle Checks | EPL_VEHICLE_ID | EPL_VEHICLE_CHECK_DATE EPL_VEHICLE_CHECK_TIME |
UDF Item ID |
A new Site parameter will control how photos are exported:
- N - Not exported
- Y - Job exported when all photos received.
- P - Job exported when ready and when any photos are received
- K - Job exported with Photo Key values only.
The device application will be modified to send back the key values of the photos for the job within the Job Update Request, as well as sending the photos separately.
<EPOD_PHOTOS> <EPOD_PHOTO> <EPL_DEVICE_PHOTO_ID></EPL_PHOTO_ID> <EPL_DESCRIPTION></EPL_DESCRIPTION> <EPL_SITE_ID></EPL_SITE_ID> <EPL_IMAGE_TYPE></EPL_IMAGE_TYPE> <EPL_KEYVAL_1></EPL_KEYVAL_1> <EPL_KEYVAL_2></EPL_KEYVAL_2> <EPL_KEYVAL_3></EPL_KEYVAL_3> <EPL_KEYVAL_4></EPL_KEYVAL_4> <EPL_KEYVAL_5></EPL_KEYVAL_5> </EPOD_PHOTO> <EPOD_PHOTO> ... </EPOD_PHOTO> </EPOD_PHOTOS>
An EPOD_PHOTO tag will be sent back per EPOD_PHOTO for the EPL_JOB_ID, regardless of type.
The server Job Update request processor will recognise this content and create EPOD_PHOTO records for each EPOD_PHOTO tag, recording the details and marking the photos as not yet received.
The server Photo Request processor will update these records when received from the device. When received and complete, the processor will mark the job as not exported (EPL_XFER_FLAG) if the new Site parameter is set to "P".
The export process will check this flag when building XML for a job to export:
- N - Do not include the EPOD_PHOTOS tag at all.
- Y - Only process the job if all photos for the job have EPL_COMPLETE set to "Y".
- P - Export with all photos with EPL_COMPLETE set to "Y" only.
- K - Job exported with Photo Key values only.