## Generate a import file

This form will generate a file with the number of records specified.
Generate a duplicate record (forced error)

## Instructions

### Usage 1: Import the file without any errors

Click on Generate a new file and start import job button. This will generate a new file with 10 unique records to be imported. After the file is generated, the import job will start. You will see a table containing information about the task that was just started. You can click on Update jobs list button and verify that the job was completed.

### Usage 2: Import an error file and fix it

Check the Generate a duplicate record checkbox and click on Generate a new file and start import job button. If you click on Update jobs list button, you will see that the job failed with the following Exit Status: Error : org.hibernate.exception.ConstraintViolationException: could not execute statement. This was caused because the job tried to insert a duplicate record at the Database. You will also see `org.h2.jdbc.JdbcSQLException: Unique index or primary key violation` exception stacktraces in the server log. Uncheck the Generate a duplicate record checkbox and click on Generate a new file button. This will generate file without errors. Click on Restart button in the last column for that job instance in the List of Jobs table. If you click on Update jobs list button to verify that the job was completed. Analyze the logs and check that the job started from the last checkpoint.

### Usage 3: Import an error file and do not fix the errors

Check the Generate a duplicate record checkbox and click on Generate a new file and start import job button. If you click on Update jobs list button, you will see that the job failed with the following Exit Status: Error : org.hibernate.exception.ConstraintViolationException: could not execute statement. This was caused because the job tried to insert a duplicate record at the Database. Just click on Restart button again. If you click on Update jobs list button, you will see that the job was marked as ABANDONED this time because it was restarted once. Notice that there's a new parameter: `restartedOnce=true`.

## List of Jobs

Instance Id #{job.jobInstanceId} Execution Id #{job.executionId} Parameters #{job.jobParameters} Start Time End Time Batch status #{job.batchStatus} Exit status #{job.exitStatus} Operation