Copy Model Objects between Different AWM Models

The model editor features a copy mechanism that enables you to copy objects and all references from one model into another via drag and drop or copy and paste. It includes an Import dialog which displays potential conflicts in the target model and enables the selective copying of objects. To copy objects from one model into another, select the required objects and copy them using the context menu or press Ctrl+C and paste them anywhere in the target model.

Note: You cannot paste objects on to the resource object at the top of a target model.

You can use drag and drop to copy objects between models. To do this, both models need to be opened in the model editor. Both editors need to be visible at the same time. To achieve this, one editor must be dragged to the edge of the Eclipse editor area.


Copy Model

When both editors are positioned so they are visible, objects can be dragged and dropped from one model to the other.


Copy Model Objects 2

The import mechanism copies not only objects that were selected but all underlying objects including referenced objects. Copying the category "Tool Descriptors" copies all the containing tool descriptors, referenced properties and file descriptors (parameters), action descriptors (Job After Action) and so on. Copying an objects "Document Root" or "Model Configuration" results in the whole model being copied.

It is not possible to copy objects explicitly that do not have an ID attribute, for example, Application Options, relationships or ISA attributes.

Once a copy operation is initiated, all relationships and references are gathered and the Import dialog box opens. The Import dialog shows the dragged object(s) and all their references that are to be copied into the target model, in a table view. The table consists of two columns Before and After. The Before column indicates whether a copied object already exists in the target model. It contains the existing object from the target model or "---" if there is none. The After column always shows the copied objects and relationships from the source model.

If a copied object contains children, like relationships, it can be expanded in the table view. Attributes of objects and relationships can be seen by moving the mouse pointer over the specific object.

Objects that should not be copied or overwritten can be unchecked in the table view. The Import dialog box also uses certain typography to highlight possible conflicts:

Conflict Description Highlighting
No conflict Copied object, relationship or attribute does not exist in target model. Green
Identical object The copied object already exists in the target model. Normal
Change conflict Copied object, relationship or attribute already exists in target model but with different attributes or children, for example, relationships of an object. Blue
Remove conflict Copied attribute/relationship exists in target model but is to be removed since the source object does not contain this attribute/relationship. Crossed out

If an object already exists in the target model, the dialog shows both source and target objects compared. The mouse pointer can be placed over any object or relationship to display the attributes of that object.


Copy Model Objects 3

Copy Model Objects 4

In the Import dialog box above, a file descriptor is copied from one model into another. The dialog highlights that the file descriptor FILE_DatasetList and the property PROP_DatasetName already exist in the target model but with different attributes. The property PROP_Suffix does not exist in the target model, click OK to continue the import. Other identical and existing objects are hidden because the Identical filter is checked.