Automation Engine Script Guide > Ordered by Function > Activation Data > GET_PARENT_TYPE

GET_PARENT_TYPE

Script Function: Returns the object typeAn individual object is provided for the individual activities: There are User, UserGroup, Notification, Cockpit, CodeTable, Documentation, Event, Agent, FileTransfer, Group, Include, Job, Workflow, Calendar, Login, Client, RemoteTaskManager, Schedule, Script, Server, Sync, Variable and TimeZone objects of the superordinate taskThere are various ways of activating objects. The originator of the activation is referred to as the superordinate task (parent). (Parent)

Syntax

GET_PARENT_TYPE(RunID, [Activation Type])

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 .

Run number of the current taskAn executable object that is running. Tasks are also referred to as activities.

Activation Type

Allowed values:

ACT = Activator
PRC = Processor (Default value)


Return codes

Object type of the superordinate task
"USER" - With manual activation (only for activation type ACT)
"API" - With activation via CallAPIA programming interface that processes a script in the Automation Engine system. It can be called directly from within the program itself or from a different program. (only for activation type ACT)
" " - There is no superordinate task (only for activation type PRC)

Comments

With this scriptA particular Automation Engine object type. functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,…, the name of the superordinate task of an objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task that is part of the object classThere are four classes of objects: executable, active, passive and system objects. of  executable objects is retrieved. With manual activation, this is "USER".

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

If the RunID of a groupAn Automation Engine object type that integrates tasks so that they can be processed together. should be retrieved, "Generate at Runtime" (in the Attributes tab) must be activated in the task using this script function. Otherwise, the RunID can only be retrieved only for jobs in post process.

Example

The following example retrieves the running number of a task and subsequently the object type of its Activator.

:SET &RunID = GET_UC_OBJECT_NR(MAWI.END.PROCESSING)
:
SET &RET# = GET_PARENT_TYPE(&RunID, ACT)
:
PRINT "The type of the superordinate task is: &RET#"

 

See also:

Script element Description

GET_PARENT_NAME

Returns the name of the superordinate task (Parent)
GET_PARENT_NR Returns the run number (RunID) of the superordinate task (Parent)

Script Elements - Activation Data

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