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

SYS_STATE_ACTIVE

Script Function: Checks if an object 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, script literal or script variable


Return codes

"Y" - The object is in a status with system return code < 1699 or 1701.
"N" - The object is in a status with system return code > 1699 and not 1701.

Comments

This script function checks whether or not the specified object (object class 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 job has already been activated
SYS_STATE_JOBS_IN_GROUP Returns the number of jobs that are registered in groups
SYS_STATE_JP_ACTIVE Checks if a workflow has already been activated

Script Elements - Activate Objects

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by function