Usage

This example shows how Gateway Server uses the IQA user exit when processing type 54 records.

If a transmission contains any X9.37 Image Analysis Records (Type 54), the Gateway Server queries the type 54 record to see if it is good or bad. If an item already has an existing type 54 record, which indicates the image is bad, the Gateway Server does not request IQA analysis of the image. Instead, it puts all the type 54 records for the item in an object and calls the convertType54ToSuspect method of the user exit. This method is passed an array of ImageAnalysisRecords objects. The method should create an array of objects that implement the IQASuspectInformation Java™ interface and that has the same length as the array of ImageAnalysisRecords objects that were passed in. The appropriate suspect flags should be set, based on the flags set in the X9.37 Type 54 record.

If an item does not have any X9.37 Image Analysis Records (Type 54) in the transmission already, or the Type 54 records for the item indicate that the image is good, the Gateway Server calls the analyze method of the user exit. This method is passed an array of objects that implement the IQAImageRecord Java interface and an array of objects that implement the IQAImageResults Java interface. Each object of type IQAImageRecord contains the four image segments.

The methods that must be implemented for the IQAImageRecord interface are:
  • getFrontBlackWhite()
  • getFrontGrayScale()
  • getBackBlackWhite()
  • getBackGrayScale()
Each of these methods returns an array of bytes representing the image segment for the view. The corresponding setter methods must also be implemented.
The objects of type IQAImageResults contain the results of calling IQA. The IQAImageResults Java interface requires the implementation of the following methods:
  • getIqrFrontBlackWhite()
  • getIqrBackBlackWhite()
  • getIqrFrontGrayScale()
  • getIqrBackGrayScale()
Each of these methods returns an object that implements the IQAImageQualityResult Java interface. The corresponding setter methods must also be implemented.

Before returning from the analyze method, the user exit should save any suspect information for the image segments. The user exit should allocate an array of objects that implements the IQASuspectInformation Java interface and has the same length as the array of IQAImageResults objects that were passed in. It must then set the appropriate suspect flags. To update the user field in the detail item record prefix, IQA user exit suspect information classes can implement the interface com.ibm.icpcs.gatewayserver.user.UserFieldInterface in addition to IQASuspectInformation.

The endJob method is used to get any summary information from the job and return it to the user. An object that implements the IQAImageSummary interface is passed to the endJob method.