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

SYS_STATE_ACTIVE

Script Function: Checks if an objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task has already been activated

Syntax

SYS_STATE_ACTIVE([Object Type], [Object Name])

Syntax

Description/Format

Object Type

Short Label of an executable object
Format: AE name, script literal or script variable

Object Name

Name of the object
Format: AE name, scriptA particular Automation Engine object type. literal or script variableA placeholder for a value within a script.


Return codes

"Y" - The object is in a statusThis represents the condition of a task (such as active, blocked, generating). with system return codeThe value that represents the result of tasks and script functions. < 1699 or 1701.
"N" - The object is in a status with system return code > 1699 and not 1701.

Comments

This script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… checks whether or not the specified object (object classThere are four classes of objects: executable, active, passive and system objects. of executable objects) is in a status with a system return codebelow 1699 or equals the return code 1701. If none of the two parameters has been specified, the function checks the object in which it is used.

The check is made when the script line which contains this function is processed. A negative result does not provide the information whether or not the object will be activated later. Thus, this function cannot be used to synchronize processes. The information it supplies about object states is only valid for a limited period of time.

When you specify the name of the own object (= the object that is used to process the script element), your system considers this and always returns the return code "Y".

Examples

This example tests if the same object has already been activated.

:SET &ACTIVE# = SYS_STATE_ACTIVE()

The function is used here to define a condition.

:IF SYS_STATE_ACTIVE(JOBS, "MM.END.PROCESSING") = "Y" 
!...

:
ENDIF
 

 

See also:

Script element Description

SYS_STATE_JOB_ACTIVE

Checks if a jobAn Automation Engine object type for a process that runs on a target system. has already been activated
SYS_STATE_JOBS_IN_GROUP Returns the number of jobs that are registeredThis is the status of a task that runs within a group and is waiting for its start. in groups
SYS_STATE_JP_ACTIVE Checks if 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."] has already been activated

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