Script Function: Deactivates a completed taskAn executable object that is running. Tasks are also referred to as activities..
DEACTIVATE_UC_OBJECT(RunIDShort for "run number". It is a number that provides unique information about a task's execution. The RunID can include 7 to 10 digits. It is assigned by the Automation Engine component . [, FORCED])
Syntax |
Description/Format |
---|---|
RunID |
The RunID of the task that should be deactivated. |
FORCED |
Performs deactivation regardless of the statusThis represents the condition of a task (such as active, blocked, generating). of the high-level tasks. The system will not check whether the task runs 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."]. Also, the options for the automatic deactivation of all subordinate tasks are ignored and deactivated in any case. You can use FORCED only in combination with workflows. Note that FORCED does not check whether tasks in sub-workflows are active. Format: AE name, script literal, or variableIt stores or retrieves values dynamically at runtime. An individual Automation Engine object type. |
Return Codes |
---|
12204 - The task (RunID) cannot be deactivated. You cannot deactivate objects of a workflow. |
You can only deactivate tasks that have already ended (either they have been successfully completed or were canceled). When tasks are deactivated, they are also removed from the activitiesDeployment-related activities (Activity Window). Note that you must indicate the task's RunID for this purpose.
The following rules apply for the deactivation process:
In executable objects, you can also define settings for their automatic deactivation. These settings will also be checked by the system.
The following example activates an object and waits until it has ended. A message will be sent to the responsible 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. if an error occurs. When the object ends without an error, it will be deactivated.
:SET &ACTOBJ# = ACTIVATE_UC_OBJECT(&OBJ#,WAIT)
:IF &ACTOBJ# = "0"
: SET &ERRNR# = SYS_LAST_ERR_NR()
: SET &ERRINS# = SYS_LAST_ERR_INS()
: SET &MESSAGE# = GET_MSG_TXT(&ERRNR#,&ERRINS#)
: SET &RET# = SEND_MAIL("John.Smith@automic.com",,&MESSAGE#, "Please check. Thanks!")
:ELSE
: SET &DEACTJOB# = DEACTIVATE_UC_OBJECT(&ACTJOB#)
:ENDIF
See also:
Script Elements | Description |
---|---|
ACTIVATE_UC_OBJECT | Activates an object. |
RESTART_UC_OBJECT | Repeats the execution of a task. |
Script Elements - Activating Objects
Sample Collection:
Database Maintenance with Options
Notification with Variable Message Text
Retrieving Error Message and Number
Reaction to External Events
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 |