Automation Engine Script Guide > Ordered by Function > Activate Objects > TOGGLE_OBJECT_STATUS

TOGGLE_OBJECT_STATUS

Script Function: Stops or starts the automatic processing of several object types.

Syntax

TOGGLE_OBJECT_STATUS(RunID, Status, [Tasks])

Syntax

Description/Format

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 .

The run number of the activated objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task
Format: AE name, scriptA particular Automation Engine object type. literal or script variableA placeholder for a value within a script.

Status

The processing statusThis represents the condition of a task (such as active, blocked, generating). that should be set:
Format: AE name, script literal or script variable

Allowed values: "STOP" and "GO"
"STOP" - Stops the automatic processing of a taskAn executable object that is running. Tasks are also referred to as activities..
"GO" - Starts the automatic processing of a task.

Tasks

ALL - The automatic processing of tasks that run within workflows, groups and schedules also stops or starts.

Format: AE name, script literal or script variable


Return code

"0" - Status modification was successful

Comments

This script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… changes the processing of workflows, groups, events, RemoteTaskManagerIt monitors and controls external Jobs that were not started by the Automation Engine (AE). An AE object type. [Formerly called "QueueManager."] and schedules.

 The privilege "Modify 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 required for this script function!

Examples

The following example determines the RunID of an eventAction that is triggered if particular conditions apply. It can be an Automation Engine object type or an entry in a Policy Orchestrator EventBase. and reads a script variable. The automatic processing of the event stops and at the same time, the determined RunID is passed on to the script variable.

:SET &RUNNR# = GET_UC_OBJECT_NR(DUMP.CONTROL)
:
SET &RET# = TOGGLE_OBJECT_STATUS(&RUNNR#, "STOP")
:
PRINT &RET#

 

See also:

Script element Description

TOGGLE_SYSTEM_STATUS

Stops or starts the automatic processing of a clientA closed environment within an Automation Engine system where you can create and run objects. A client name consists of a 4-digit number that must be indicated when a user logs on to the Automation Engine system. Users and their rights are also defined in clients. A particular Automation Engine object type.

Script Elements - Activate 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