Migration Wizard provides you an IMigratableobject, which allows you to extend your business objects to support the migration process for a new component. There is no need to create separate migration object for the new component.
...
To configure the business object for migration:
Include the header file
#include <library/generic/migratable.h>
To configure the Select method, to load UI and the object:
- Select method has the following parameters:Db, keys, contents
andselectAll
- In general,keys
are used, if notselectAll
is used.
- ForselectAll
, complete the instance, name, long name and these optional fields: description, update date and update source.These values are used only for the available components on loading.
- ForselectAll=
false, based on the keys supplied in the parameter, we need to get the data from the database and fill the contents.To configure Duplicate check:
- For duplicate check, the Migration Manager will pass all the components data.
- The business object needs to set the new instance and status, if any.To configure the Insert method:
- Migration Manager will pass all the components data.
- Before you insert, you need to update the dependent component instance. For example, if the field is dependent on codes, then you need to update the code instance. You can use theetNewId()
function to get the new instance.
- The business object has to update the instance to the data class after the insert.
- Operation will fail if there is no instance or status is set as error.To configure the update method:
- In the case of update, Migration Manager will pass all the components data.
- Before you do update, you need to update the dependent component instance. For example, if the field is dependent on codes, then you need to update the code instance. You can use theGetNewId ()
function to get the new instance.
- Instance needs to be updated to the data class after the update (optional). Otherwise, operation will be failed if status is set as error.On the component export, the EGL file will be generated. The content of the components will be in XML format.
Sample Code
IMigratable Class
|
Register the Business Object
To add the Business Object entry in to the Migration Status table, use the following query format.
SQL
|
Be sure that the script is added to the EDM package.
Oracle
|
For reference implementation, you can refer the following business object: Users, Center Roles, Business Groups and KPI, which uses the above framework for the migration process.
...