Post-Analysis User Exit

The post-analysis user exit provides a way to connect to the Image Compliance service at multiple points during item processing. The user exit:
  • allows the analysis results to be inspected and processed
  • evaluates item characteristics prior to the analysis
  • can be used to determine whether analysis should be performed
  • can be used to set and clear parameters for specific items, where the function is not implemented directly in Image Compliance.
  • overrides the compliance result, review flag, and save results flag
The Image Compliance service calls the post-analysis user exit:
  1. During start job processing. It is called after the cash letter is set up, and prior to processing any of the items from the cash letter. It is called only once for each Image Compliance job.
  2. Just before running TIFF Validation and Image Quality Analysis for an item. It is called for each item in the cash letter.
  3. After completing TIFF Validation and Image Quality Analysis for an item. It is called for each item in the cash letter.
  4. During end job processing. It is called only once for each Image Compliance job.
The post-analysis user exit must implement the UserExitInterface Java™ interface. The UserExitRequest argument passed to the execute method of the user exit has the minimum input parameters shown in Table 1. The user can view the parameters associated with each call to the user exit, and set flags and conditions.
Table 1. Input Parameters for UserExitRequest
Parameter Name Type Description
OPCODE short Operation being performed:
1301
is the start job user exit call
1302
is the user exit call following image analysis
1303
is the user exit end job call
1304
is the user exit call prior to image analysis
(The parameters from analyze item. Refer to Table 1.)   The parameters passed to the analyze item call are also available here
ITEM_IMAGE_INTERFACE ItemImageInterface The image and data for the item (not passed during the start and end jobs)
ANALYZE_RESULT AnalyzeResult The compliance result for the item
USER_ITEM_CONTEXT UserItemContext The context details for the item. An example is the enclosing header and control records.

All parameters passed to the analyze item call are available in the post-analysis user exit, including the pre-analyze and post-analyze calls. Custom parameters, which may be needed for a specific use, can also be passed. The Image Compliance service forwards the custom parameters to the user exit.

The Image Compliance service retrieves the output parameters shown in Table 2, from the UserExitRequest argument and returns them to the analyze item call.
Table 2. Output Parameters for UserExitRequest
Parameter Name Type Description
ANALYZE_RESULT AnalyzeResult The compliance result for the item
USER_ITEM_CONTEXT UserItemContext The context details for the item. An example is the enclosing header and control records.

A sample post-analysis user exit is in the install_directory\check\v409\ImageCompliance\samples\SamplePostAnalysisExit.java file.

When the user exit is called prior to the Image Compliance analyze() function, it can be used to tell Image Compliance the item should not be processed. The user can elect whether to process an item using the TIFF tag verification or the Image Compliance IQA and image integrity functions. An example of this is provided in the SamplePostAnalysisExit.java sample code that is provided with Image Compliance. The user can also evaluate fields from the type 25 record to determine if an item should be processed.

The pre-analysis portion of the user exit also allows the suppression of the individual MICR field integrity analysis tests that are defined by the image validation rule set being used. Information about how to implement this is also in the SamplePostAnalysisExit sample code.

Based on the detailed results, the user exit can determine which images are non-compliant and if the payment is eligible for operator review. For example, the image of an electronic item that has a bad TIFF wrapper may not be correctable by the operator. The user exit marks the item as not requiring operator review. The user exit also determines if the results merit saving. If evaluating potential changes to the compliance criteria, save items that fail the new criteria even though they pass the current production criteria.

The user can override the repairable and reviewable flags directly from the post-analysis user exit. Care should be taken when performing this operation.

A sample Image Compliance user exit that saves results to files is also provided. The user exit is called com.ibm.paydir.izv.samples.SaveAnalysisResults. The sample code uses the start and end job notifications to open and close the files.
Note: For this sample user exit, the user must ensure only one file is processed at a time by setting the maxFileThreads parameter in Gateway to 1. The user exit is not designed for a multiple threading application and could cause errors.
The Image Compliance API parameters that control the user exit are described in Table 3.
Table 3. Image Compliance API Parameters to Control the User Exit
Parameter Name Description
TIFF_VAL_ENABLE Controls writing output to file extensions .tiff.xml and .tiff.ans
IQA_ENABLE Controls writing output to file extensions .iqa.xml and .iqa.ans
USER_PARAMETERS Controls the output folder
SAVE_RESULTS Setting this to all saves the results for all items. Otherwise, only results for non-compliant items are saved
JOB_NAME Used as the base output file name
When the post-analysis user exit is called, the Image Compliance service supplies the parameters shown in Table 4.
Table 4. Compliance Service Post Analysis User Exit
Parameter Name Description
ITEM_IMAGE_INTERFACE The image and data for the item
ANALYZE_RESULT The compliance result for the item