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

SYS_ACT_PARENT_NAME

Script Function: Supplies the name of a superordinate taskThere are various ways of activating objects. The originator of the activation is referred to as the superordinate task (parent)..

Syntax

SYS_ACT_PARENT_NAME([Activation type])

Syntax

Description/Format

Activation type

Allowed values:

ACT = Activator
PRC = Processor (default value)


Return code

Name of the superordinate task
"*SCRIPT" - The taskAn executable object that is running. Tasks are also referred to as activities. has been activated via a 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.
" " - There is no superordinate task (only for activation type PRC)

Comments

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,… supplies the name of a 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 the name of the User objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task (e.g. SMITH/DEV).

If no activation type is indicated, this script function supplies 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 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, 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 schedule. If so, the name of this task is written in the activation protocol. If there is no superordinate task, the corresponding entry is made in the activation protocol.

:SET &NAME# = SYS_ACT_PARENT_NAME()
:
IF &NAME# NE " "
:   
PRINT "Name of parent: &NAME#."
:
ELSE
:  
 PRINT "No parent"
:
ENDIF

The second example determines the Activator of a task whose name is output in the activation log. In the case of manual activation, the protocol shows the name and departmentDepartment name to which the Automation Engine user belongs. of the particular userIn the Automation Engine, a user is an instance of a User object, and generally the user is a specific person who works with Automic products. The User object is assigned a user ID and then a set of access rights to various parts of the Automation Engine system and product suite. These access rights come in the form of Automation Engine authorizations and privileges, Decision user roles and EventBase rights and ARA web application object rights. You can manage all these centrally in the ECC user management functions. See also, Unified user management..

:SET &NAME# = SYS_ACT_PARENT_NAME(ACT)
:
PRINT "Task was activated by &NAME#."

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

2004-01-27 13:19:36 - U0020408 Task was activated by *SCRIPT.

 

See also:

Script element Description

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.

SYS_ACT_PARENT_TYPE

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 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