SYS_ACT_PARENT_TYPE

ScriptEigener Objekttyp in der Automation Engine Function: Returns the object type of the superordinate task.

Syntax

SYS_ACT_PARENT_TYPE(Activation type)

Syntax

Description/Format

Activation type

Allowed values:

ACT = Activator
PRC = Processor (default value)


Return codes

Object type of the superordinate task
"USER" - in the case of manual activation (only for activation type ACT)
"API" - in the case of activation via CallAPIProgrammierschnittstelle, die entweder direkt oder aus einem anderen Programm aufgerufen werden kann, und ein Script im Automation Engine-System ausführt. (only for activation type ACT)
" " - There is no superordinate task (only for activation type PRC)

Comments

This script function retrieves the object type of the superordinate task (parent). In the case of manual activation, this is "USER". 

If no activation type is specified, this script function retrieves the processor.

In order to facilitate that the name of a group may be retrieved, "Generate at Runtime" (Attributes tab) must be activated in the task using this script function. Otherwise, the name can only be retrieved for jobs in post process.

Examples

The first example checks whether the task runs in a group, a workflow or a schedule. If so, the object type of this task is written in the activation protocol. If there is no superordinate task, the corresponding entry is made to the activation protocol.

:SET &TYPE# = SYS_ACT_PARENT_TYPE()
:
IF &TYPE#  = " "
:   
PRINT "No parent"
:
ELSE
:   
PRINT "Object type of parent is &TYPE#."
:
ENDIF

The second example determines the Activator of a task. If it was activated  by a task, its object type is shown in the activation protocol. In the case of manual activation, the protocol shows the entry "Task was activated by USER".

:SET &TYPE# = SYS_ACT_PARENT_TYPE(ACT)
:
PRINT "Task was activated by &TYPE#."

The third example also determines the Activator of a task. If it was activated through the CallAPI, the following line may be printed in the activation protocol:

2004-01-28 11:19:26 - U0020408 Task was activated by API.

See also:

Script element Description

SYS_ACT_PARENT_NAME

Supplies the name of a superordinate task.
SYS_ACT_PARENT_NR Supplies the run number (RunID"Kurzform für ""laufende Nummer"". Hierbei handelt es sich genauer um eine Zahl, welche die Durchführung einer Aufgabe eindeutig kennzeichnet. Die RunID kann zwischen 7 und 10 Stellen aufweisen. Sie wird von der Komponente Automation Engine vergeben.") of the superordinate task.

Script Elements - Activation Data

Object Types

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by Function