Script Function: Exports objects to an XML fileA format for imports and exports. An XML file contains object structures.
EXPORT(Folder, File [,Include_External_Objects])
EXPORT(Object, File [, ,Include_Referenced_Objects])
Syntax |
Description/Format |
---|---|
Object |
Name of the objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task(s) to be exported (with wildcard charactersThese are placeholders for characters when you specify filters. ? stands for exactly one character, * for any number of characters.) The wildcard characters "*" and "?" can be used. "*" stands for any, "?" for exactly one character. |
Folder | Name of the folderTop level entities such as Environment, Deployment Target, Activity, … are stored in folders. The permissions a user has on an entity depend on the permissions that are set on the folder for the entities. (with complete path specifications) which you want to export. Format: scriptA particular Automation Engine object type. literal or script variableA placeholder for a value within a script. |
File |
Name of the file (with complete path specifications) in which the objects
are to be exported |
Include_External_Objects |
Allowed values: "Y(es)" or "N(o)" Default value: "N" If you set this value to "Y", external objects are exported as well. Relevant for folders only. The parameter will be ignored in combination with other object types. |
Include_Referenced_Objects |
Allowed values: "Y(es)" or "N(o)" Default value: "N" If you set this value to "Y", referenced objects are exported as well (recursively). Referenced objects are objects used by the given object such as tasks in a workflowAn object of the Automation Engine that can include several executable objects and which runs them in a specified order. [Formerly called "ProcessFlow" and "JobPlan."] or PromptSets. Not supported with folders or wildcard characters. Exceptions are the following referenced objects, which will be excluded, when you use this parameter and value "Y":
|
Return code |
---|
"0" - Export was successful |
With this script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… you can export objects or folder structures to a specific XML file. The return value of the script function is zero, if the export was successful.
When you export folder structures, the XML file will contain folder structure information at the top of the file.
During export, all folder and non-folder objects and sub-folders as well as linked objects are included in the export.
When importing, a new folder ##INCLUDED_EXTERNALS## will be created on the same level as the dedicated folder on the target system.
Linked objects will be stored in the ##INCLUDED_EXTERNALS## folder.
For details on import also see information on the script element IMPORT.
The importing and exporting functionality is not suitable for mass transports! Use the Transport Case instead for this purpose.
With the script statement :ON_ERROR you can determine the reaction to an incorrect export. As before, you can analyze the error with the script functions for error handling. The script will continue to be processed. It is also possible to cancel the processing of the script.
Before the export starts, the system checks if the file already exists. If this is the case, it will be overwritten. If the file is write-protected, the export cannot be done.
The export also fails when the userIn the Automation Engine, a user is an instance of a User object, and generally the user is a specific person who works with Automic products. The User object is assigned a user ID and then a set of access rights to various parts of the Automation Engine system and product suite. These access rights come in the form of Automation Engine authorizations and privileges, Decision user roles and EventBase rights and ARA web application object rights. You can manage all these centrally in the ECC user management functions. See also, Unified user management. does not have
the authorization "Read" (R) for the object.
Further information on exports is kept in the activation reportA report provides more detailed information about a task's execution or a component. of the object that calls up the export.
In a distributed AE environmentAn Environment consists of Deployment Targets which represent your endpoints. Different environments are used for different phases in the software delivery cycle, for example Development, QA, Staging, Production. An environment is typically set up once and used by several applications. (work processes run on different computers) you can not determine on which computer the export will be made. We therefore recommend specifying the UNC path under Windows. Please note that the server should run under an appropriate domain user so that the UNC names can be accessed. For UNIX server, the absolute path must be indicated in UNIX notation. Additionally, the FileSystem needs to be accessible (NFS; mount command) but it is not important on which computer it is located. This is the only way to assure that the actually required file is used.
The script statement causes all open transactions of the script to be written to the AE databaseA database is an organized collection of data including relevant data structures..
In the following example
For Windows:
:SET &OBJECT# = "MM.DAY*"
:SET &FILE# = "\\PC\
:SET &RET# =
EXPORT(&OBJECT#,&FILE#)
For UNIX:
:SET &OBJECT# = "MM.DAY*"
:SET &FILE# = "/opt/
:SET &RET# =
EXPORT(&OBJECT#,&FILE#)
The following example exports a folder structure:
:SET &RET# = EXPORT ("\TESTFOLDER\EXPORT_STRUCTURE", "\\PC\ae\EXPORT\ae_export.xml", "Y")
This example exports a workflow with references:
:SET &RET# = EXPORT ("EXAMPLE_WORKFLOW", "\\PC\ae\EXPORT\ae_export.xml", ,"Y")
See also:
Script element | Description |
---|---|
Imports objects from an XML file |
Script Elements - Handle Objects
Importing and Exporting Objects
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function
Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support |
Copyright © 2016 Automic Software GmbH |