FS 310488 Export EPOD docs as Images

From Calidus HUB
Revision as of 10:43, 31 July 2013 by Anw (talk | contribs) (v0.4 - Updated costs)





Aptean Logo.png







Partnerlink

Export EPOD Docs as Images


CALIDUS EPOD

31st July 2013 - 0.4
Reference: FS 310488












































Functional Overview

Client Requirement

The customer requires automatically-produced POD documents to be exported to TIFF Image format, compressed into black and white, and send via FTP to an existing document system, as documented in the appendices.

Solution Overview

The Site or Job Group may be configured through the Admin screens to allow exporting of Completion Documents.

The user will be able to add a new POD Export Configuration to an existing configuration. This will allow the user to specify:

  • How the export will be achieved
  • To where it will be sent
  • What format will be used
  • What image compression will be applied, if required
  • What Job Types should be exported.

The existing Auto-Export process will be modified to complete this change. When this runs, and sites or job groups configured for export will build the report for the completed job in the format requested and send it via the mechanism specified to the destination set up on the Export configuration.

Scope

  • Additional or updated external software will be required:
    • HTML to PDF or Image conversion tools - Latest versions of WkHtmlToX, WkHtmlToPdf and WkHtmlToImage
    • Image conversion/compression tools - ImageMagick
  • No GIF images can be used, as they are not exported correctly by WkHtmlToX tools
  • Although it is seen that this may be used to replace the existing POD Email code, at this time both methods will remain in place.
  • Only proof of delivery documents are required to be sent to fulfil the customer request.
  • Only the Operating Partner will be automatically sent the POD.


Set-up

Pre-requisites

  • A working CALIDUS EPOD system.
  • A link to the Vigo Partnerlink Online system, for testing purposes.

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 = "FTP"
  • EPL_XF_DESTINATION = "ftp://www.partnerlinkonline.com"
  • EPL_XF_ID = "POD"
  • EPL_WEB_USER = Partner Code (EPL_SITE_ID) (lowercase)
  • EPL_WEB_PASSWORD = Partner Code (EPL_SITE_ID) (lowercase)
  • EPL_XF_DIRECTION = "O"
  • EPL_EXPORT_FORMAT = "Image"
  • EPL_IMAGE_TYPE = "TIFF"
  • EPL_TIFF_COMPRESSION = "Fax"
  • EPL_FILENAME = "PAR-<EPL_EXT_REF>-<date>-
  • EPL_EXPORT_JOB_TYPES = "D"


Functional Description

Database

Table EPOD_XF_CONFIG requires the following modifications:

  • EPL_EXPORT_FORMAT (New field) - nvarchar(10)
  • EPL_IMAGE_TYPE (New field) - nvarchar(5)
  • EPL_TIFF_COMPRESSION (New field) - nvarchar(5)
  • EPL_FILENAME (New field) - nvarchar(100), allowed nulls

Existing packages will be modified to allow the creating, editing and selecting of the new fields, 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 fields
  • Add as parameters and searchable items


Table EPOD_JOB requires the following modifications:

  • EPL_XFER_POD_FLAG (New field) - nvarchar(1), default to "N"

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

  • EPOD_JOB_INSERT
  • EPOD_JOB_SEARCH
  • EPOD_JOB_SELECT
  • EPOD_JOB_SELECT_DATE_RANGE
  • EPOD_JOB_UPDATE

The existing EPOD_JOB DAL object will be changed to:

  • Read the new fields
  • Add as parameters and searchable items

An index must be created for EPOD_JOB, containing:

  • EPL_XFER_POD_FLAG
  • EPL_STATUS
  • EPL_JOB_TYPE

Note Note: Indexes MUST be checked and set on the EPOD_JOB table for the SELECT statements used in the Auto-Export process to be efficient - ensure that all required indexes have been created.


A new database procedure EPOD_XFER_SELECT_POD will be written to allow selection of EPOD_JOB records that are:

  • at completed status (EPL_STATUS = "Y").
  • with EPL_XFER_POD_FLAG = "N".

This procedure should link to EPOD_SITE and optionally to EPOD_JOB_GROUP and select all fields from EPOD JOB and EPOD_XF_CONFIG that match the following criteria:

  • ej.EPL_STATUS = 'C'
  • ej.EPL_XFER_POD_FLAG = 'N';

EPOD_XF_CONFIG should be optionally linked to from any configuration set up against the Site or Job Group, using EPL_XF_CONFIG of the appropriate file to link to the table, ensuring that only configurations for EPL_XF_ID of 'POD' are found. Additionally, these links should select only configurations if the Job Type of the job selected is in the configuration's Job Types, ensuring that the configuration will not be selected if the job is of the wrong type.

The fields reported in the query should be those of the Job Group configuration, if there is one, otherwise the Site configuration.

A prototype of the SQL SELECT statement is available.

DAL

A new DAL object will be written, EPOD_JOB_XFCONFIG, that will extend the existing EPOD_JOB object. The extended items will be:

  • A new property of type EPOD_XF_CONFIG.
  • A new constructor.
  • A new public procedure to populate a list of EPOD_JOB_XFCONFIG objects from the new database procedure. This will be called GetJobsXferPOD, based on the existing similar procedures.

The purpose of this DAL object is to return Job and XF Config constructs in one object, to allow for more efficient processing through the database.

The new constructor will accept all parameters of the most complete of the original EPOD_JOB constructors, plus all the fields from EPOD_XF_CONFIG. Note that these fields should be preceded with XFC rather than EPL, to indicate that they belong to EPOD_XF_CONFIG.

The new constructor will call the most complete of the original EPOD_JOB constructors, specifying the parameter Hierarchy as passed in to the new EPOD_JOB_XFCONFIG constructor. Note that this procedure should NOT check the database again for the existence of the record - the record will already exist.

Additionally, if the parameter XFC_XF_CONFIG_ID is not null, the constructor will populate the new EPOD_JOB_XFCONFIG property EPOD_XF_CONFIG with a new call to the EPOD_XF_CONFIG constructor, passing in all the XFC fields from the new EPOD_JOB_XFCONFIG constructor.

The new procedure GetJobsXferPOD will receive a database connection parameter, and will call the new database procedure to retrieve EPOD_JOB and EPOD_XF_CONFIG records. This will then populate a List of new EPOD_JOB_XFCONFIG objects from each record returned, and return this.

Admin

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

  • EPL_XF_ID - the new value "POD" should be added to the options of the existing DDL.

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

  • EPL_EXPORT_JOB_TYPES - A text field with allowed entries of C/D/S or any combination of these values together. This should be enabled for entry for export IDs "JOB" and "POD" only.
  • EPL_EXPORT_FORMAT (new field) - A DDL with the following values: Image/PDF/HTML. This should be enabled to be entered only for Export ID "POD" only.
  • EPL_IMAGE_TYPE (New field) - A DDL with the following values: JPG/PNG/TIFF. This should be enabled to be entered only for Export Format "Image" only.
  • EPL_TIFF_COMPRESSION (New field) - A DDL with the following values: Fax/Zip/None. This should be enabled to be entered only for Image Type "TIFF" only.
  • EPL_FILENAME (New Field) - text field to store the filename with replacement strings.

Note Note: All DDLs should be created with data-definable options.

Reports

Remove all GIF image files and replace them with PNG image files in all reports.

Signature Processing

The new EPOD_Export_Images_To_FS module must be modified to ensure that no GIF images are created.

The existing code calling EPOD_UTILS.Base64toImage will be used in all cases to create a .NET System Image file, which will then be saved as type JPG, through the overloaded Save method, specifying image format (System::Drawing::Imaging::ImageFormat::Jpg).

Export Processing

The Export process (ePOD_AutoExport.AutoExport.RunAutoExport) will be modified to add a new section for Exporting PODs. This will be a new procedure in EPOD_SYS_EXPORT called ExportAllPOD.


The new ExportAllPOD process will get a list of all Jobs at completed status where the POD has not yet been sent (through the new EPOD_JOB_XFCONFIG.GetJobsXferPOD procedure.

For each object in the list:

  • If the EPOD_JOB_XFCONFIG.EPOD_XF_CONFIG object is not populated, the job does not require POD Export processing and so it can be marked as processed - the field EPOD_JOB_XFCONFIG.EPL_XFER_POD_FLAG should be set to "Y" and the record saved.
  • If the EPOD_JOB_XFCONFIG.EPOD_XF_CONFIG object is populated, the job requires POD Export processing - call a new procedure EPOD_SYS_EXPORT.ExportPOD to process this object, passing in the Connection, EPOD_JOB_XFCONFIG object and a counter. If this is successful, the field EPOD_JOB_XFCONFIG.EPL_XFER_POD_FLAG should be set to "Y" and the record saved. If any failure is received, the status should be set to Error instead.


The new ExportPOD procedure will:

  • Export the HTML as a page (input)
  • Check the format:
    • If PDF, run the input through the WkHtmlToPdf process to a temporary file (output)
    • If Image:
      • Run the input through the WkHtmlToImage process to a temporary file (output), passing the image type as a parameter.
      • If TIFF format and Compression is required, run the output file through the compression process.
    • If HTML, set the temporary file (output) to input directly.
  • Call the existing SendFile procedure, passing:
    • EPOD_JOB_XFCONFIG.EPOD_XF_CONFIG
    • "POD"
    • EPOD_JOB_XFCONFIG
    • output
    • counter
    • a response object (out)


The existing SendFile process will be modified to use the new EPL_XF_FILENAME parameter, if populated.

If the new field is populated, the filename in strExportFile should be populated as follows:

  • search the string for tags (pattern-matched as "\<.*\>").
  • replace tags found as follows:
    • "date" - the current date, formatted as "YYYYMMDD".
    • "time" - the current time, formatted as "HHMMSS".
    • "uid" - the sequence, formatted as "0000".
    • Any other uppercase tag should be taken from the EPOD_JOB record, using the tag name as the property to be found. So, for example, if a tag <EPL_EXT_REF> is found, this should be replaced with the data value of EPOD_JOB.EPL_EXT_REF.
  • The extension should be removed from the filename (along with the period).

A new strExportFileExt string should be created, pre-populated with "XML". This will be set to the extension from the new EPL_XF_FILENAME parameter, if populated.

The existing FTP export procedure SendExportAsFTP will be called as now, populating the parameters as:

  • strExportFilePath. Note Note: The existing code that uses "C:\tempFileForFTP" as a temporary holding area for the file should be modified to ensure that a configurable parameter is used instead of hard-coding.
  • strExportFile - as populated above
  • EPOD_XF_CONFIG.EPL_XF_DESTINATION, as now
  • ExportContent, as now
  • strExportFileExt.
  • All remaining parameters as now.


Appendix A: TEST PLAN

Test Script / Scenario ReferenceExport EPOD Docs as ImagesCall Number(s): 310488
Test Script / Scenario DescriptionTest the export of PODsPASS / ISSUES / FAIL
Menu AccessNone 
Pre-requisitesNoneTested By:
 
Test ObjectiveTo test that: Exporting of POD documents through Auto Export works as described; Files exported are acceptible to the existing external document system; Existing CALIDUS EPOD Export functionality is unaffected.Date:
 



Step Action Result Remarks P/F
1 Admin      
  None      
1.01 Create a new POD configuration All expected fields are prompted for, as described in the specification.    
1.02 Edit an existing POD configuration All expected fields can be modified, or are made available to be modified, as described in the specification.    


Step Action Result Remarks P/F
2 Auto-Export      
  Configure the site as described in the specification. For safety and speed, ensure that there is no other configuration active, and that all non-test jobs have all XFER flags marked as Y, to ensure that no unexpected jobs are caught in the test. Ensure that the Vigo system administrator is informed of incoming test files. Create multiple Delivery jobs, and a single Collection and Service job.      
2.01 Complete the non-delivery jobs. Run the auto-export. No POD documents are exported.    
2.02 Complete a Delivery job. Run Auto-Export. The POD document is exported to the PartnerlinkOnline FTP site. The report is in TIFF/fax format. The file is named correctly.    
2.03 Change the configuration to a different or no compression. Complete a Delivery job. Run Auto-Export. The POD document is exported to the PartnerlinkOnline FTP site. The report is in TIFF format with the correct compression. The file is named correctly.    
2.04 Change the destination configuration to any local OBS FTP Server. Change the Image format to PNG. Complete a Delivery job. Run Auto-Export. The POD document is exported to the changed FTP site. The report is in PNG format. The file is named correctly.    
2.05 Change the configuration to export as PDF. Change the filename configuration. Complete a Delivery job. Run Auto-Export. The POD document is exported to the FTP site. The report is in PDF format. The file is named correctly.    
2.06 Change the configuration to export as HTML. Complete a Delivery job. Run Auto-Export. The POD document is exported to the FTP site. The report is in HTML format. The file is named correctly.    


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 0 £0.00
Change Request Evaluation 0.00 0.00 0 £0.00
Functional Specification 0.00 2.00 0 £0.00
Technical Specification 0.00 0.00 0 £0.00
Development 0.00 7.00 0 £0.00
Testing and Release 0.00 2.00 0 £0.00
Implementation 0.00 0.25 0 £0.00
Project Management First argument to "number_format" must be a number. First argument to "number_format" must be a number. 0 £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
1Partnerlink POD Solution - Image and barcode Format.pdfN/A10/02/2012


B.2 Glossary

Term or Acronym Meaning
Ad Hoc A task instigated on the device (spec. Ad Hoc Pallet Move), rather than a task instigated from the WMS and Stock Control.
Advice Note Number An external reference linked to a Goods Receipt.
Aisle A component of a location; usually a space through rows of racking or storage locations; a collection of locations;
Anchor Point A starting location for a search for a suitable storage location; auto-putaway location suggestion start point.
Area A collection of aisles; an area in the warehouse for a particular purpose.
Batch A production batch of a product; a quantity of product that is considered to have the same characteristics;
Bay (Warehouse) A physical loading or unloading point for the warehouse.
Bay A component of a location; usually a space between uprights in racking, comprising several levels (horizontal beams).
Block Stack A stable stack of pallets.
Bulk Bulk storage; Usually full-pallet storage areas, racked or stacked.
Cancellation The facility to cancel a task due to some problem, identified by the user when performing the task.
Check Digit A short code, usually randomly generated and stored against a location, used to help identify that a user is at the right location before they proceed with a warehouse task.
CSV Character-separated values; a text file with multiple rows and values, usually separated with commas.
C-WCS CALIDUS WCS, the name of the OBS Logistics Warehouse Control system
C-WMS CALIDUS WMS, the name of the OBS Logistics Warehouse Management system
Dead Leg A movement of a truck without a pallet; wasted resource.
Despatch The final physical stage of an order; handover of goods to the haulier.
Drive-In A drive-in location, typically multi-level, multi-deep location.
Dual Cycling Processes utilizing P&D locations for interleaving tasks in and out of specific areas, reducing dead leg movements.
Exchange Specifically Pick Exchange or Task Exchange. The process of allowing a user to select a different pallet in a multi-pallet location and exchanging the expected pallet for this one. If the pallet is planned for another task, task exchange will complete this task instead of the expected one first. If the pallet is not planned, pallet exchange will swap the pallet (if suitable).
GR; GRN Goods Receipt; Goods Receipt Number or Note
High Bay Typically tall (greater than 5 level) racking, usually full pallet storage, usually Narrow Aisle.
JIT Just In Time; processes designed to trigger at the last instant.
KPI Key Performance Indicator.
Level A component of a location; usually the vertical compartments of an area, delineated by horizontal beams.
Loading The act of loading pallets onto a vehicle.
Location A uniquely identified space in the warehouse for storage of product. There are many types, most commonly Floor locations (for example, Marshalling, Inbound), Racking or Bulk Storage Locations and Pick faces.
Manifest The contents of a vehicle or container.
Marshalling The act of bringing pallets for an order or load together; an area to do so.
Multi-deep A location with 2 or more pallets stored sequentially i.e. only one can be accessed at a time.
NA Narrow Aisle; usually any area in the warehouse that is restricted access due to space limitations, Narrow Aisles have associate P&D locations.
P&D Pick-up and Drop-off locations; locations used to control the handover of pallets between distinct areas, for example between chambers and the wider area of the warehouse.
PI; Perpetual Inventory The act of continuously checking locations in a warehouse, identifying and correcting product quantity issues. Usually used in Bulk environments rather than Pick Faces. In pick faces, this process is called is called Residual Stock Balance and usually takes place after picking from a pick face.
Pick Face A location designed for picking part of a pallet of stock. Usually a low- or ground-level location.
Pick List (order) The instructions to pick pallets or cases from locations; the paper report associated to this; the stage of preparing these instructions; the sending of these instructions to WCS.
PO Purchase Order.
Pre-advice; Goods Receipt Pre-advice An advanced notification of what is being received. Part of a manifest. Pre-advices can be stock and quantity, or individual pallet level.
Putaway The physical move of a pallet to a storage location as a result of receiving it into the warehouse.
RAG Acronym for Red/Amber/Green, a traffic light colouration system depicting (in sequence) Errors, Warnings or Informational messages. Usually used in operational monitoring to effectively display when certain processes are not working as expected.
RDT Radio Data Terminal.
Replen; Replenishment The act of moving product (usually a pallet) from bulk storage to a pick face.
Reposition The facility to change the location of a movement or putaway when at the final destination, sue to some issue discovered when performing the task.
RF Radio Frequency; An RF device is an RDT, typically used by CALIDUS WCS for executing warehouse tasks.
SCR; CR Software Change Request.
Short Pick The process of not fulfilling an order due to failure to identify sufficient product when picking. May also be used as a term to indicate Short Allocation.
SO Sales Order.
Truck Types Plants, Mechanical Handling Equipment. For example, Reach trucks, Counter-balance trucks, pallet riders, etc.
UOM Unit of Measure.
WA Wide Area; usually any area in the warehouse that is not restricted access due to space limitations, for example, floor areas, not Narrow Aisle.
WCS Warehouse Control System
WMS Warehouse Management System


B.3 Authorised By


Phil Harding

Project Manager
_____________________________