Automation Engine Script Guide > Ordered by Function > Handle Objects > MOVE_OBJECT

MOVE_OBJECT

Script Function: Moves an objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task to a 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..

Syntax

MOVE_OBJECT (Object Name, Destination Folder)

Syntax

Description/Format

Object Name

The name of the object.
Format: script literal or script variable 

Destination Folder

The path of the folder in which the object should be moved.
Format: scriptA particular Automation Engine object type. literal or script variableA placeholder for a value within a script. 


Return codes

"0" - The object was successfully moved.
"20645" - This object does not exist.
"20657" - The target folder does not exist.

Comments

It is irrelevant in which folder the object that should be moved is stored because it will be retrieved automatically. Existing object links are ignored and will not be moved.

 You need writ access (W) to the object and the target folder as otherwise, a runtimeThe duration of a task's execution. It refers to the period between a task's start and end. It does not include its activation period (see also: activation and start). error occurs.

When the object or the folder do not exist, a runtime error will occur if the script statement :ON_ERROR was used with the parameter ABEND. If the folder does not exist, the object remains in its original folder.

This script statement causes all the script's open transactions to be written to the AE databaseA database is an organized collection of data including relevant data structures..

Example

The following example moves the object VIENNA to the sub-folder OBJECTS of the folder TIME_ZONES.

:ON_ERROR ABEND
:
SET &RET# = MOVE_OBJECT ("VIENNA","TIME_ZONES/OBJECTS")

 

See also:

Script element Description

:ON_ERROR

Determines the reaction to certain errors and messages of script elements.

CREATE_OBJECT

Creates an object (Calendar, Login and Variable only).

REMOVE_OBJECT Deletes an existing object.
MODIFY_OBJECT Changes an existing object (only Calendar, Login and Variable).

Script Elements - Handling Objects
Script Elements - Error Handling and Messages

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by Functions

 


Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support

Copyright © 2016 Automic Software GmbH