We can encounter failures while importing content/data in Asta7 for several reasons. So far our approach for handling failures has been to throw an exception and abort the import. But this approach is not user-friendly as most of the failures are recoverable.
We want a tool to handle imports better to ease the mobility of archives between different Asta7 installations and within the same Asta7. The tool should be based on current functionality in Asta5 and adapted to the challenges we have in Asta7.
This tool will be used only for the Single Archive and Excel import from Asta7
Failures and Possible Solutions
Normal Entities
Failure | Solutions | Challenges |
---|---|---|
AMID conflict |
|
|
PK conflict (Single PK only for now) |
|
|
Unique conflict |
| |
FVP Unique conflict (Root entities only for now) |
| |
FK conflict (Not yet supported) |
| |
NULL conflict |
| |
Wrong type |
| |
Wrong length |
|
System Entities
For this section, we need to consider the system root entities like AKTOR, TAG, etc. and ignore AMID/PK
conflicts for all sub-entities. We should add some options for handling AMID/PK/Unique/FVP Unique conflicts for the system root entities.
Failure | Solutions | Challenges |
---|---|---|
AMID/PK/Unique/FVP Unique conflict |
|
|
Implementation
We can divide the implementation into four key steps.
Execute Normal Import
As before we will try to import the data without any changes. In case of an exception, we will analyze the exception to check if it is a resolvable exception (AMID/PK conflict, NULL conflict, etc.). If resolvable then the import job dialog will show a button to start the resolving process.
Clicking the Resolve button will start the 2nd.
Gather Import Conflicts
After clicking the Resolve button a new tab will be opened. The tab will start a background job which will go through the import file and gather all the resolvable conflicts. After gathering all the conflict the 3rd step will begin.
The current limit for gathering conflicts is 1000.
Show Conflicts and Possible Solutions
Once the conflict-gathering job is done the tab will show all the conflicts in a table.
The table contains the following columns
Column | Description |
---|---|
Entity Name | Entity name of the conflicted row |