Scripts (SCRI)

{"URL":["/*.*/awa/pa_view_SCRI"],"heroDescriptionIdentifier":"ice_SCRI_intro","customCards":[{"id":"ice_ExecutingSCRIs","title":"Executing Script Objects","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Objects/obj_script.htm","languages":["en-us"]},{"id":"ice_ScriptVIDEO","title":"Watch the Video: Scripting and Script Objects","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Objects/obj_Script_Video.htm","languages":["en-us"]},{"id":"ice_ExecutingObjects","title":"Executing Objects","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Executions/obj_Executing_overview.htm","languages":["en-us"]},{"id":"ice_scripting_and_the_ae_scripting_language","title":"The Automation Engine Scripting Language","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/Script/Writing/AE_Scripting_Language.htm","languages":["en-us"]},{"id":"ice_script_processing","title":"Script Processing","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/Script/Writing/Script_Processing_Order.htm","languages":["en-us"]},{"id":"ice_writing_scripts","title":"Writing Scripts","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/Script/Writing/Script_Writing.htm","languages":["en-us"]},{"id":"ice_working_with_script_editor","title":"Working with the Script Editor","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/Script/Writing/obj_Wkg_ScriptEditor.htm","languages":["en-us"]},{"id":"ice_arithmetic_calculations_in_scripts","title":"Calculations","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/Script/Writing/Script_Arithmetics.htm","languages":["en-us"]},{"id":"ice_script_elements_for_editing_strings","title":"Editing Strings","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/Script/Reference/Overview/Strings_Script.htm","languages":["en-us"]},{"id":"ice_error_handling_in_scripts","title":"Error Handling","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/Script/Writing/Script_Error_Handling.htm","languages":["en-us"]},{"id":"ice_reusing_script_components","title":"Reusing Scripts","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/Script/Writing/Script_Reuse.htm","languages":["en-us"]},{"id":"ice_ae_script_reference","title":"Automation Engine Script Reference","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/Script/Reference.htm","languages":["en-us"]},{"id":"ice_working_with_objects","title":"Working with Objects","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Objects/obj_WorkingWithOverview.htm","languages":["en-us"]},{"id":"ice_AWIs_CommonFunctions","title":"Common Functions","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/_Common/CommonFunctions/CF_OverviewOfChapter.htm","languages":["en-us"]},{"id":"ice_UnderstandingPA","title":"Understanding the Process Assembly Perspective","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/AWA/Objects/ProcessAssembly.htm","languages":["en-us"]},{"id":"ice_Overview_AWI","title":"Understanding the User Interface","type":"customize","url":"https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/*.*/Automic%20Automation%20Guides/Content/_Common/GettingStarted/GS_OverviewAWI.htm","languages":["en-us"]}]}

Script objects let you write and reuse code with internal processing instructions. The code you write in Script objects is executed in the Automation Engine itself, and not on the target systems. You use the Automation Engine scripting language in Script objects. You cannot use Job Control Language (JCL) lines.

Executable objects go through various execution stages (see Executing Objects). Although Script objects are executable objects, they do not go through the Processing stage. They end after they have been generated and their status changes to Finished during runtime. For this reason, their behavior is slightly different to that of other executable objects. For more information, see Executing Objects: The Processing Stage.

Tip: You can use Include objects in Scripts to reuse code and keep it consistent. For more information, see Includes (JOBI).

Defining Script Objects

  1. In the Process Assembly perspective click Add Object. On the Add Object dialog, select Script (SCRI). For information on how to add objects, see Adding Objects.

    A Script object definition is made up of the following pages:

  2. On the Object Name dialog enter the name of the new object. Choose it carefully. For more information, see Best Practices: Naming Conventions.

  3. Write your script on the Process page.

Executing Script Objects

For all executable objects except Scripts, the following two checks take place after the object has been generated (see Executing Objects: The Generation Stage):

  • Sync object dependencies
  • Maximum number of simultaneous tasks that are allowed

Since Script objects do not have a processing stage and end immediately after generation, only the script itself can be synchronized. For this reason, in Scripts these checks take place before generation, also if you select the Generate Task at: Runtime option.

Restarting Scripts

When you restart a Script object, it is always generated at activation time. For more information about the Generate Task at: Runtime/Activation time options, see Executing Objects: Generating Task at Activation Time vs Generating Task at Runtime.

See also: