Different Import behavior for Folder and individual objects
search cancel

Different Import behavior for Folder and individual objects

book

Article ID: 409166

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

We observe a difference in behavior during while importing individual object and complete parent folder.

Scenario 1: Export and import of individual objects 

If an object is imported into a different folder than its original home folder in the target system, the home folder remains unchanged, and instead, a link to the object is created in the target folder

https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/24.4.0/Automic%20Automation%20Guides/Content/AWA/Objects/obj_ImportingExporting.htm?Highlight=export%20import

Perform the following steps to observe the behavior

Step 1: Create a parent Folder ( SRC ) under that create script (SCRI1) and a subfolder (F1)
Step 2: Export only the individual objects script (SCRI1) and a subfolder (F1) under parent Folder ( SRC )
Step 3: Move the script object (SCRI1) into sub folder (F1 )
Step 4: Try importing the exported individual objects script (SCRI1) and a subfolder (F1) with Replace Existing Object option under Parent Folder (SRC)
Step 5: Now a link for script object(SCRI1) is created under Parent Folder (SRC). -> works as per documentation

 

Scenario 2: Export and import of Complete Folder

Perform the following steps to observe the behavior

Step 1: Export of Complete Parent Folder ( SRC ) including create script (SCRI1) and a subfolder (F1)
Step 2: Move the script object (SCRI1) into sub folder (F1 )
Step 3: Try importing the exported parent folder which includes objects script (SCRI1) and a subfolder (F1) with Replace Existing Object option under Parent Folder (SRC)
Step 4: Now the link is not created even though object (SCRI1) is moved under (F1)

Therefore we would like to understand/clarify if this behavior is normal

Environment

Automation Engine 24.x and also previous versions 21.x

Resolution

The reported behavior is by design.

The difference between the two described export/import options is that in the first case a sequence of objects is imported (i.e., F1 and SCRI1) and in case two, ONE folder with substructure is imported.
Both behaviors are explained in the documentation.

 

Case #1:  As the object SCRI1 does already exist (located somewhere else in a different folder; here in F1) the object is replaced (if the option "Replace existing objects" was selected) and a link is created 
at the place where the import has been carried out.
This is explained in the documentation:

   If an object is imported in a different folder than its existing home folder in the target system, the home folder will not be changed, but instead a link will be created in the target folder.

 

Case #2:  A folder with substructure is imported. Here, the complete (sub)structure of the folder is kept.  Therefore, the object SCRI1 is placed by the import procedure according to its location in the XML file
This is explained in the documentation:

   If you are importing folders with sub folders, their structure is kept. 

 

Note:  If you want to leave the object in its current location and instead create an additional link at the position specified in the XML file, or if you want to keep already existing links, you can to do so by selecting the "Keep existing folder links" option.



The import behavior is a bit "involved" because of several backward compatibility requirements. Objects are uniquely identified by their name and Client ID, not by their location (home folder of the object). The "location" of an object is merely a "convenience feature" for organizing work in a (hierarchical, visual) folder structure. Object links provide an alternative "UI route" to an object. The only difference between links an their target objects they link to is their removal behavior. Links and the objects they link to can be swapped via the context menu.  
In short, for working with objects via the UI, there is no relevant difference between links and objects.