Daniel_Trimmel_2011

How to find Activator ID by Script

Discussion created by Daniel_Trimmel_2011 on Aug 7, 2017
Latest reply on Jan 16, 2018 by Peter WIRFS
Q: I want to send an email from a JOBS failing in a Workflow. This Email should contain the failed JOBS Runid and Name, determined with scripting.

Answer: The following Script shows how to get the different Runids, Names and Types of Tasks:

:s &NAME# = SYS_ACT_ME_NAME() :s &ID# = SYS_ACT_ME_NAME() :s &TYPE# = SYS_ACT_ME_TYPE() :p My Runid: &ID# Name: &NAME# Type: &TYPE# :s &NAME# = SYS_ACT_PARENT_NAME() :s &ID# = SYS_ACT_PARENT_NAME() :s &TYPE# = SYS_ACT_PARENT_TYPE() :p Processor Runid: &ID# Name: &NAME# Type: &TYPE# :s &NAME# = SYS_ACT_PARENT_NAME(ACT) :s &ID# = SYS_ACT_PARENT_NAME(ACT) :s &TYPE# = SYS_ACT_PARENT_TYPE(ACT) :p Activator Runid: &ID# Name: &NAME# Type: &TYPE#

Processor Runid is the "container" of the task, group, workflow or schedule.
Activator is either the Users session or the Activator Task.

A List of all predefined Variables and corresponding Script Elements can be found here: https://docs.automic.com/documentation/webhelp/english/AWA/12.0/DOCU/12.0/AWA%20Guides/help.htm#AWA/Objects/varaPredefinedList.htm?Highlight=processor

Outcomes