Automation Engine Script Guide > Ordered by Function > Error Handling and Messages > :EXIT

:EXIT

Script Statement: Terminates the processing of a scriptA particular Automation Engine object type. and sends a return codeThe value that represents the result of tasks and script functions..

Syntax

:EXIT [Return code]

Syntax

Description/Format

Return code

Value that should be used as the return code.
Format: number, script variable or script function.
Default value: "0"

Comment

You can use this script statement in order to stop the processing of a script with a specified return code. In doing so, you can react to conditions that cause the taskAn executable object that is running. Tasks are also referred to as activities. to be canceled. For example, you can test a variableIt stores or retrieves values dynamically at runtime. An individual Automation Engine object type.'s content in a Script objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task and depending on the content, you can either continue or cancel the task.

If you use this script statement without a return code or with the value 0, script processing ends normally with the return code 0. The task itself continues (this means that jobs start with the generated JCL, notifications are displayed etc).

You can also define user return codes as return codes. Script processing is canceled and the task ends abnormally  (ENDED_NOT_OK). If the option generate 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). is activated in the task's Attributes tab, you can react to this 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. return code within 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."]

:EXIT terminates script processing. Therefore, you cannot use this script element in Post Process tabs. Automic recommends using the script statement :MODIFY_STATE in such a case.

Example

The first example ends script processing with the return code 10.

:EXIT 10

 

See also:

Script element Description

:MODIFY_STATE

Modifies the return code or statusThis represents the condition of a task (such as active, blocked, generating). text of a jobAn Automation Engine object type for a process that runs on a target system. after it has ended.

:STOP

Cancels script processing.

Script Elements - Error Handling and Messages

System Return Codes of Executable 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