Importing .Model Files to AB Suite Model Database

The Import wizard enables you to import .model files created by the Export Wizard.

Importing Via the Model Importer Wizard

To import .model files, perform the following:

  1. On the Start menu, expand Agile Business Suite 7.0, and then click Model Importer.

    The Import Wizard window appears.

  2. Choose the Destination Server and Destination Model. You can enter or select the name of the AB Suite model database as the Destination Model into which you want to import the model file. Select the Create Database option if this is a new database.

  3. Click Add in the Source File field to click the .. button automatically placed in the files list. Click the .. button to browse for the .model file you want to import. You can add more than one file to the source file list.

    If you choose the wrong file, highlight the chosen file and click Remove. You can then add the correct file.

  4. Select the Rollback on Unrecoverable Error, Create Database and Validate After Import options as desired. Click Help for more information on these options.

  5. Select the Advanced Settings page to choose options for dealing with conflicts (if you are importing into an existing model), creating new identifiers, and accessing your model database in exclusive mode. Click Help for more information on these options.

    Note: You can refer to the subsection, Importing - Advanced Settings in the subsequent subsections in which the Advanced Setting options are explained in detail.

  6. Select the Logging Settings page to choose options for writing messages to a log file and viewing messages in the output window. Click Help for more information on these options.

  7. Click OK. The Load Progress dialog box appears. Click View/Hide to show or hide the details of the migration in the message log.

  8. Click OK when the model is successfully imported. Make note of any/all errors and warnings that appears in the Message Log.

Note: Errors and warnings are included in the log file, <modelname>.log located in the same folder as the model.

Logic Validation after Import

On the Model Importer screen, there is an option to "Validate after import". This means that immediately after importing the model, System Modeler validates all logic in the imported model.

This option is cleared by default simply because the validation process can take a long time, particularly for larger applications. It is not necessary for the logic to be validated immediately upon import. If you prefer to save time and not validate, you can choose to keep this option clear.

If you choose not to automatically validate logic after import, you must validate the logic manually before building the application.

To validate the application manually, perform the following:

  1. On the View menu, click Class View.

  2. Right-click the top element in the Class View.

  3. Select Validate.

Once the validation process is complete, the message, “Validate Complete” is displayed.

Importing Via the Command Line

It is far easier to import the model using the Model Importer wizard provided with Agile Business Suite. Only experienced users should attempt to import an existing model from EAE 3.3 Developer using the command line interface.

To Import Via the Command Line Interface:

Invoke the import process using the following command syntax:

Import [-cs|-ci|-ce|-cm] [-q] [-v] [-x] [-c] [-a] [-ni] [-l LogFileName] [-r]
[-s DatabaseInstance] [-n NewOwner] -m ModelName FileName1 FileName2 ...

where:

Syntax

Description

[]

Denotes an optional argument

/cs or -cs

Enables option, substitute conflict resolution.

This is the default for the Import, however this option is provided to handle the situation when the default value changes.

/ci or -ci

Enables option, skip conflict resolution

/ce or -ce

Enables option, replace conflict resolution

/cm or -cm

Enables option, manual conflict resolution. For every clash found, you are asked how to proceed.

/q or -q

Specifies that the Import should be silent. That is, it should not show the progress dialog box.

All required parameters must be given if it is running in silent mode. Import exits with an error code if any required parameters are not defined.

This is appropriate when a file is imported in a batch script, where it is intended to run unattended.

/v or -v

Specifies that validation is performed following the import.

/x or -x

Specifies that exclusive mode should be used during the import. Provides increased performance during the import.

/c or -c

Specifies that the model database should be created if it is not currently present.

/a or -a

Specifies that the log entries should be appended to the end of the log file rather than replacing the existing contents.

/ni or -ni

Specifies that new unique identifiers should be generated for all imported elements.

-l LogFileName or /l LogFileName

Specifies a different log file name to be used rather than the default.

/r or -r

Specifies that if an error prevents completion or the import is cancelled, the model database should be rolled back to the state at which it was when the last file was begun.

-s DatabaseInstance or

/s DatabaseInstance

Specifies the SQL Server instance. If this parameter is omitted, the file is imported on the local machine.

-n NewOwnerName or /n NewOwnerName

Specifies that all imported elements should be imported with a new owner. The name of the owner is provided by the <NewOwner> parameter.

-m ModelName or /m ModelName

Specifies the name of the model within the database instance. This is a required parameter.

-oc

Imports only the configurations and ignores all other elements in the incoming .model file. It is applicable only when importing a .model file. By default, the configurations are updated if they already exist in the database during an import.

-inc

Specifies that all the configurations in the incoming .model file should be created if they do not exist in the database. You must specify this option to import all the configurations if the incoming .model file is partially exported from another AB Suite database. If this option is not specified, new configurations are imported (only if the incoming .model file is fully exported) from another AB Suite database.

Filename

Specifies the names of the files to be imported.

The summary of these parameters are available by running the followings commands.

For example, Import -m MyModel sample.mdl imports the LCIF file named "sample" from EAE 3.3 into a model called "MyModel" in Agile Business Suite.

As another example, Import -s BigServer\Test -m MyModel sample.mdl chocolate.mdl imports the sample and chocolate LCIF files into the model, "MyModel" for the database instance, "Test" available on the server "BigServer".

The Importer also includes a dialog box that allows to define this information manually. The dialog box also appears when you enter invalid information at the command line. For example, specifying an option that is not supported by AB Suite.