!!!LOAD CANDIDATE INFORMATION
!!Processing Information
The Load Candidate Information (LRCAPSI) screen is another extension of the [LMTD] and was built specifically for a client and is the companion process to [XRAPPSI]. The purpose of these two processes is to extract candidate information to provide to a third party, in this case PSI. PSI performs a background check on the candidate and sends a file back to the client with an indicator of Pass or Fail. The client then loads this file via LRCAPSI into Personality. It is required that when an indicator of "Fail" is found that it set the Applicant Status to "Not Approved", which will also mark all applications to "Rejected".

%%information We do not endorse ''PSI Background Check'' as a third-party background check vendor.  There are many providers of such service.  This functionality was built for a specific client who utilizes this vendor.  The interface and programming is provided as-is and any modifications required to support a different vendor may need to be additionally developed. %%

These two processes are client-specific in the sense that the data provided in the source file must match the standards of PSI as this data is manipulated or used to derive column values that can be imported correctly into a system. Specifically, candidate codes less than 7 digits are left-padded with zeroes to ensure that candidate codes to be loaded are exactly 7 digits. This feature will be made more general in the near future so that other clients may use this.

Processing:
*if STATUS = "Eligible for Hire"
** [Candidate Status|CANDIDATE_STATUS] = "08" (Approved) - New lexicon value
** this is needed to then generate a workflow email to the hiring manager
* if STATUS = "Not Eligible for Hire"
** [Candidate Status|CANDIDATE_STATUS] = "07" (Not Approved)
** for all applications for this candidate:
*** [Application Status|APPLICATION_STATUS] = "80" (rejected)
*** [Application Closed|APPLICATION_CLOSED] = date of processing
* if STATUS = "No Determination Made"
** [Candidate Status|CANDIDATE_STATUS] = "05" (Flagged)
** this is needed to then generate a workflow email to the hiring manager

!Step 1 - Define Interface Format in [IDIF]
The source file layout needs to be defined as an interface format. The interface format is created and modified in the [IDIF] screen. Each line of the source file is read and divided into field values based on the field information table in this screen.

||Field Name||Beg\\Pos||End\\Pos||Notes
|Storeno |1|4| In Personality this would be the Department Code
|SSN |5|15| xxx-xx-xxxx
|First Name| 16|50|
|Last Name| 51|85|
|Status| 86|120| One of three options (see above)
|Prime key| 121|130| Candidate Code


!Step 2 - Define Site Preferences in [IMST]
Within the [IMST] screen, the administrator must define where the Extract and Load files are located and where the load functions are to write the exception files to. These locations are used by the functions to create and retrieve information. The customer can modify these values to represent any directory on their system, which is convenient. 

The extract directory is defined using the [EXTRCT DATA FLDR|EXTRCT DATA FLDR(System_Preference)] preference. The load directory is defined using the [LOAD DATA FLDR|LOAD DATA FLDR(System_Preference)] preference. The [ATTACHMENTS FLDR|ATTACHMENTS FLDR(System_Preference)] must be specified so the load functions know where to write the report exceptions log to.

If the full path is not specified here, then the path used by the HL Application Directory will apply. The user who is running the LRCAPSI must have Read/Write/Create access to this directory on the server.

!Step 3 - Run LRCAPSI to load the file
Launch the LRCAPSI function specifying the appropriate parameters as indicated below. 


!Step 4 - Review Report and Exception File for Results
During the load process, all non-fatal exceptions as well as the number of insertions and updates (by table) are logged in the execution run logs. After the load process completes, a report is written to a text file indicating the number of records read, number of records bypassed, number of records processed, number of records that were bypassed because an identical one already existed in the table, and number of records updated/inserted by table. The report will display all non-fatal business exceptions encountered during the load with a record number indicating for which record the exception occurred. The report will also display the amount of time that was taken for the load process to complete.

There are 2 tiers of exceptions that can be generated during the load process. The first tier involves extracting and building data from the source file and the second involves processing the extracted data. However, there will only be ONE exception for each failed load. Basically, if the record fails to build data correctly, the program will not bother loading it so you will never see 2 exceptions for a single failed record load.

Exceptions generated while extracting and building data from the source file will indicate that the exception occurred while "reading data from file". Exceptions generated while processing the extracted data will indicate that the exception occurred while "loading data into the DB".

When a Null Pointer Exception (NPE) occurs during the load process, the entire stack trace to the NPE is captured and displayed as part of the exception message in the load report.

The report text file will be located in the directory which was specified in the [IMST] preference [LOAD DATA FLDR|LOAD DATA FLDR(System_Preference)].

!Step 5 - Verify Data has been loaded
If there are no exceptions in the report, you should navigate to the table(s) where the data was loaded and verify that the load was done correctly.

----
!!Report Parameters

||Report Parameters||
|File Name| This field is the name of the file that has been placed on the server \\in the directory specified in the [IMST] record [LOAD DATA FLDR|LOAD DATA FLDR(System_Preference)]. \\Mandatory
|Interface Code| The Interface Code that was created in step 1 must be specified. 
|Allow Update| The lexicon values of this field are YES or NO. Selecting "NO" disallows \\the updating of existing records in the database. If there are new records \\in the load file, the program will still perform an insertion of these records \\into the destination table. In short, selecting "NO" for Allow Update does \\not allow you to run the program in trial as it only prevents existing records\\ in the database from being updated. Selecting "YES" will update existing \\records in the database with changes found in the load file.
|Allow Insert| The lexicon values of this field are YES or NO. By selecting "NO" LRCAPSI will\\ not load any new records into the specified table. By selecting "YES" new\\ records found in the load file will be inserted into the specified table.
|Exception Level| The lexicon values of this field are 0 to 9. Allows you to specify the level\\ of trace you wish to see in the report.


----
![Notes|Edit:Internal.LRCAPSI] 	
[{InsertPage page='Internal.LRCAPSI' default='Click to create a new notes page'}]