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)..
SYS_ACT_PARENT_TYPE(Activation type)
Syntax |
Description/Format |
---|---|
Activation type |
Allowed values: |
Return codes |
---|
Object type of the superordinate task |
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,… retrieves the object type of the superordinate task (parentThere are different ways of activating objects. The originator of an activation is referred to as the superordinate task (parent). See also: Child; Children). 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 groupAn Automation Engine object type that integrates tasks so that they can be processed together. may be retrieved, "Generate at Runtime" (Attributes tab) must be activated in the taskAn executable object that is running. Tasks are also referred to as activities. using this script function. Otherwise, the name can only be retrieved for jobs in post process.
The first example checks whether the task runs in a group, 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."] 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 |
---|---|
Supplies the name of a superordinate task. | |
SYS_ACT_PARENT_NR | Supplies the run number (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 .) of the superordinate task. |
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 |