Automation Engine Script Guide > Introduction > Advanced Users > Using Script Components

 Using Script Components

Many objects use the same processing steps in their scripts. AE recommends storing them in Include objects in order to avoid repeated creation and maintenance being required in every scriptA particular Automation Engine object type.. In doing so, you can acquire a collection of script components that can easily be maintained and reduce the time that is required for writing scripts considerably.

How to use Include objects:

  1. Store  frequently used blocks of script lines in Include objects.
  2. Call the script statement :INCLUDE indicating the name of the Include objectAn Automation Engine object type for a script that is frequently used in more than one object. in the particular script section in which the script lines should be included at 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)..
  3. The above script element also contains a parameter which can be used to adjust the script lines to an objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task as it facilitates a particular string to be replaced. This assignment is only valid for the current generation and does not change the Include object itself.

The Include object's script lines are copied to the object's exact script position at which :INCLUDE is called. Therefore, script functions refer to the particular object and not to the Include object. For example, the script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… SYS_ACT_ME_NAME supplies the object name and not the name of the Include object.

You can use the script editor to display and edit the contents of your Include objects. You expand the Include object by clicking the plus symbol on the left edge. When you edit the script of an expanded Include object and store the object, your modifications apply to the complete Include object. This influences also all objects that use the modified Include object!
Use the rights assignment for users (write access to Include objects) if you want to prevent unwanted modifications in Include objects.

 

 


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

Copyright © 2016 Automic Software GmbH