Export and Import

Aware IM includes the functionality to import and export instances of a business object to and from the system. This functionality may be useful under the following scenarios:

  1. The user wants to enter large amounts of data into the system – it may be too tedious and slow to enter each instance of a business object using the business object form (see Data Entry and Editing). It is much faster and easier to use a text editor or a spreadsheet to prepare the data in a file and then import the file in one go.
  2. A variation of the first scenario. The user wants to modify large amounts of data. Again it may be too slow and tedious to do it using a business object form. It may be much faster to export the required instances from the system, change the data using some text editor or a spreadsheet and import the data back into the system.
  3. It may be necessary to transfer data from some other (non-Aware IM) system into the Aware IM-based system. The data from another system can be imported from a CSV or XML file.
  4. It may be necessary to transfer data from the Aware IM-based system into some other (non-AwareIM) system. The data to be transferred can be exported into a comma delimited CSV file.

When data is exported from a system Aware IM writes out attribute values of those instances of a business object that have been selected for export. The attribute values are written into a comma-separated file (CSV), which is supported by a large number of software programs including Microsoft Excel.

For options 3 and 4 above the best approach is to define your own import or export template that defines mapping between the columns in the data file format supported by an external package and attributes of the object in Aware IM. Aware IM includes a sophisticated mapping module that allows end users to define such templates.

This video tutorial explains how to define import and export templates for mapping data to be imported and exported into Aware IM.

 

There are several options that control how export is performed:

It is possible to indicate whether values of the ID attribute will be written into the output file. If this option is switched on Aware IM writes out values of the ID attribute for each instance of the exported business object. When such a file is imported back into the system Aware IM detects that the data contains the ID attribute and tries to find the corresponding instance in its database. Then it uses the data in the record to modify the instance rather than to add a new one. Thus this option controls whether exported data will later be used to import the new data as in scenario 1 or modify the existing data as in scenario 2.

note

It is possible to use a particular attribute, rather than ID attribute to indicate update operation. If you add * symbol before the name of the object and attribute in the header of the CSV file, Aware IM will use values of this attribute to find instances of business objects to modify (only one instance must be found for each value of the attribute). This may be useful when exchanging data with non-Aware IM systems that do not have the ID attribute.

It is possible to select which attributes will be exported and optionally specify whether attributes of the Binary, Document or Picture types should be exported

It is possible to indicate whether reference attributes should be exported – see Exporting and Importing Relationships

When the data is imported from a CSV file Aware IM checks whether the imported file includes values of the ID attribute and if so tries to find the corresponding instances and update the attribute values with the data from the file. Obviously it changes values only of those attributes that are present in the file leaving other values intact. If the file does not have the values of the ID attribute Aware IM creates a new instance of the business object for each record in the file and initialises it from the data in the record. The following import options can be specified:

This option indicates whether Aware IM will perform validation of the instances when the data is imported. This option allows bypassing the execution of rules that are attached to the business object being imported. When validation is off Aware IM does not execute the rules thus leaving the possibility of storing logically invalid data. The option exists purely for efficiency reason – importing with validation off is faster, yet it becomes the user’s responsibility to provide valid data.

Aware IM imports records in batches of the specified size. After each batch has been imported Aware IM commits the database transaction thus making the changes permanent (see also Batch Operations).

Import and export can be performed either from the user interface of the Operation Mode (see Export and Import in the Operation Mode) or from business rules (see Export and Import from Business Rules).

See also:

  • Last modified: 2022/09/13 18:15