Converting to a new version not only enables you to add new features to the Knowledge Base, but it is also a great opportunity to make the necessary adjustments to the KB (especially those that have been left behind several times).
The list below shows the steps recommended to convert a KB from GeneXus 9.0 or earlier versions to GeneXus X, X Evolution 1, or X Evolution 2 (from now on referred to as GX X). You may be able to avoid some of these steps or have to perform a deeper analysis of some of them. Feel free to adopt this methodology as you wish. If you have any recommendations from your own experience, let us know!
- Back up the KB
- Clean up the KB
The conversion process to GX X requires that the Knowledge Base be in 9.0 format. If you have a Knowledge Base in a previous version of GeneXus, you need to convert the Knowledge Base to GeneXus 9.0 beforehand.
Since the process is not backwards compatible, it is advisable to back up or copy the Knowledge Base to be converted before starting the process.
Copy at least the following folders:
- KB’s root directory.
- KB's database.
- Images directory.
Image files will be incorporated into the GeneXus X KB as Image objects. Keep in mind these considerations for a proper image conversion
- KBData directory.
This folder contains complementary information about Web Services that you have inspected through WSDL Inspector. In GeneXus X, that information is fully integrated in the KB as an External Object. The old information will be automatically converted during the conversion process. Look at the compatibility section for more information.
If you have to call external programs (.java or .cs files), it will be necessary to keep the application folder (DataNNN) at least with those files. Nevertheless, consider the use of External Object: Native Object.
- Delete unnecessary and backup models.
To achieve a faster conversion, it is recommended to delete all the non-used models and the corresponding backup models, if any.
Besides, if you are converting to the X version, bear in mind that Win Environments Models are not supported, so you could save time by deleting those models. Remember that this GeneXus version only supports Web Environments.
GX X Evolution 1 supports Win Models but does not support Visual Basic generator.
- Delete objects that you know are not being used anymore
- Delete *.ari and *.00? from the KB directory and subfolders
Also, deleting all the non-used objects will let you save work during the conversion. These non-used objects may have programming errors that may prevent their conversion.
- Convert the KB to GX X
- Solve problems in the GX 9.0 KB to avoid a conversion failure
- If necessary, convert it again.
The expected process to convert a Knowledge Base is to open it with the new version instead of exporting and importing on a new one. The main differences between them are as follows:
- Conversion doesn't work on objects that have errors, so the process stops when an error appears, whereas the Import may leave part of the object and continue with the rest.
- Conversion tries to keep all the “model” preferences set by the user in the previous version. Besides, when a default preference value is changed in the new version, the previous value is kept in the converted KB. That does not occur when you are importing objects into a new KB.
In some cases, Export/Import is a better option than Conversion. For instance, if you’re migrating a full web application, Conversion seems to be the best option; on the other hand, if you want to extract some part of the previous KB (because it was a Win model and you want to convert only a Transaction), Export and Import fits best.
When you perform a KB conversion–that is to say, open the KB with GX X–a progress bar will be displayed for each task that needs to be performed.
If you have Workflow objects in the Knowledge Base, GeneXus detects that and gives you the chance to convert the Workflow Diagram during the KB conversion process. Please refer to GXflow XEv1 Conversion or GXflow XEv2 Conversion for more details.
During the conversion to GX X, some errors or warnings could appear. The information will be displayed in the output window and once it finishes, the complete output information will be saved to a file named "conversion.log" located in the Knowledge Base directory. In addition, a file named "conversion.log.err" is created containing only the errors and warnings. This file is useful in case you need to know all the possible errors that could happen during the conversion process.
The conversion is considered successful only when no errors have been found. If some appear during the conversion process, you need to solve them in GX 9.0 KB and convert again.
After a successful conversion, the Knowledge Base is ready to be used with GeneXus X. The original Knowledge Base in a previous version format is saved to a subdirectory named Backup.
Important: Some considerations are assumed during the conversion process. Please take a look at GeneXus X Conversion General Considerations or GeneXus X Evolution 1 and X Evolution 2 General Considerations depending on your target version.
Once the Knowledge Base is ready to use in GeneXus X or higher, the following step is to perform a "Build All", or directly run a main object. Once the process is complete, compare the objects' navigation with the previous version. In this way, you can obtain more information about some changes performed on the current version (new features, bug fixes, etc) and how these differences could affect your application.
Finally, check the Generator compatibility section for specific compatibility information about changes performed in your generator.
Take a look at Enrique's suggestions (Spanish)