Wednesday, February 27, 2013

How To: Send a custom static value from Oracle Document Capture through Oracle Forms Recognition


Disclaimer: This article assumes some knowledge of Oracle Document Capture (ODC) and Oracle Forms Recognition (OFR). Also, dependency on the Oracle AP Solution Accelerator is expected as well.

This blog will provide an example of how to use the provided scan macro to set static values without any customizations to the macro.

This sample will use an ODC variable named 'Organization' to map to the OFR existing 'CompanyCode' header. Finally it will be exported in the OFR export .xml as the 'orgID' element.

Let's take a look at the process:

1.     Start by opening ODC as an admin user

2.     Open the macro management window by clicking System --> ManageMacros
a.      We'll assume the use of an ISIS-driver based scanner for this scenario
b.     Select the category of "Scan for ISIS"

3.     Using the AP Accelerator, there will be an existing macro named "OFR-Scan-ISIS-Macro"
a.      Select this macro, but do not open it
b.     Click on the 'Setup' button



4.     The setup configuration window will appear at this time



5.     Notice the "Default Values" field
a.      This is where we will place our static value
b.     NOTE: The 'Organization' variable must be an existing variable for the related file cabinet
                                                             i.      The file cabinet is associated with the scan profile, which leverages the macro opposed to the macro itself
6.     Enter the following into the Default Values: Organization=204
a.      Note that multiple values may be entered by comma separating the entries

7.     Now, the custom variable must be added to the output; this is done via filename naming syntax
a.      Open the File Cabinets
                                                             i.      The default accelerator file cabinet is "Invoices - OFR"
b.     Select the commit profile for your file cabinet
                                                             i.      The default accelerator commit profile is "OFR Commit"
                                                           ii.      It is a "Commit Text File" driver, which allows for the following configuration options
c.      Click the "Config..." button next to the commit driver
d.     In addition to the default configurations, add the following on the "Document File Naming" tab



e.      Make sure that the Organization is set in the "Selected Fields"
                                                             i.      For our example, we're using the third position
1.     This is needed for OFR input configuration
2.     Also make sure your field delimiter is changed from <space> to '_' as this is what OFR will be expecting by default
8.     At this point, an item run through the scan profile attached to the macro & file cabinet will output with the expected format
a.      e.g., 649_D6F37E2C17AE494D8DA87B991A25186F_204_04122012.tif

9.     Now the OFR configurations will take place
a.      This will consist of updating the .ini file to ensure the input and output options are mapped as expected

10. Configure the Import variable mapping
a.      Open OFR's project .ini file
b.     Locate the block of keys starting with: IMP_VL_
                                                             i.      Note that these are the values that are exposed by default
                                                           ii.      Tokenized values can be assigned to each of the IMP_VL_ keys
                                                        iii.      Again, the delimiter is the '_' field.
1.     Gotcha: You must make sure that no '_' are existing in the values or that could affect the tokenizing and parsing process
c.      Locate the IMP_VL_CompanyCode key
                                                             i.      This is the exposed key for the OFR Company Code variable
                                                           ii.      Update this entry to the following: IMP_VL_CompanyCode=COMPONENT3
1.     Recall that we used position #3 for the ODC Organization
d.     This completes the import mapping

11. Configure the Export variable mapping (.XML)
a.      Again, open the OFR's project .ini file (if not already open)
b.     Locate the block of keys starting with: EXP_VL
                                                             i.      These are the default exposed output variables
                                                           ii.      Values mapped to these keys are exported as xml elements
c.      Locate the EXP_VL_XMLHCCompanyCode key
                                                             i.      This is the exposed key for exporting the Header Company Code
                                                           ii.      Update this entry to the following:
EXP_VL_XMLHCCompanyCode=orgID
                                                        iii.      This will map the OFR Header Company Code to the output XML <orgID> value
12. Configure the Export variable mapping (.txt)
a.      And, again, open the OFR's project .ini file (if not already open)
b.     Locate the block of keys starting with: CSV_VL
                                                             i.      These are the default exposed configurations for create supplemental output files
                                                           ii.      There is a specific line format syntax that is configured to output the values
c.      Locate the CSV_VL_01_FormatLine1 key
                                                             i.      This is the exposed key to set the output syntax for this specific 'CSV' configuration
1.     Tip: CSV configurations do not require the output to be in csv format
                                                           ii.      Using the exposed variable, <%CCO>, will allow for the addition of the Header Company Code into the output.
d.     An example:
CSV_VL_01_FormatLine1=/oracle/<%TNM>|OFR|ManualEntry|<%CCO>|||<%INO>|<%TOT>


This wraps up the walkthrough. Thanks for reading!