Automic Workload Automation

Expand all | Collapse all

How to retrieve the object name in a script getting triggered under Time Checkpoint

Jump to Best Answer
  • 1.  How to retrieve the object name in a script getting triggered under Time Checkpoint

    Posted 7 days ago
    We have a requirement where we need to fetch the name of the job under whose properties(Time and dependency), we have a script getting triggered under evaluate check point. This script needs the job name.

    Eg :

    Workflow Name : JOBP_TEST
    We have two jobs under this workflow, namely JOB_A and JOB_B
    Under the properties of JOB_B -> Under Evaluate Checkpoint, we have a script(SCRI_TEST) executing if a particular time has been reached.
    We want to pull the job name JOB_B in this script.

    Could you please suggect how we can achieve this?

    We have tried different script elements like SYS_ACT_PARENT_NR(), SYS_ACT_ME_NAME etc.. But all of them are either returning the script name SCRI_TEST or the workflow name JOBP_TEST only.


  • 2.  RE: How to retrieve the object name in a script getting triggered under Time Checkpoint

    Posted 7 days ago
    Have  you tried  &$ALIAS#

    ------------------------------
    Pete Wirfs
    SAIF Corporation
    Salem Oregon USA
    ------------------------------



  • 3.  RE: How to retrieve the object name in a script getting triggered under Time Checkpoint

    Posted 6 days ago
    Edited by Juergen Lechner 6 days ago
    Hi,

    SCRI are more or less a package with a virtual interface. You are including code into another. This included code uses variables. Some of them can be filled in the SCRI code and others not. So they have to be filled outside. When I put sequences into a SCRI I normally have such cases. E.g. a script for SIEM logging where the log entry is compiled in the JOB itself.

    So put the name of the JOB_B into a variable before the call of the SCRI and then use it in the included sequence.

    Regards,
    Juergen

    ------------------------------
    Juergen Lechner
    Senior Consultant
    setis GmbH
    Germany
    ------------------------------



  • 4.  RE: How to retrieve the object name in a script getting triggered under Time Checkpoint
    Best Answer

    Posted 6 days ago
    Edited by Neeraja Ethiraj 5 days ago
    Use the following script function at the top of SCRI_TEST to read from the buffer the name of the object that caused the trigger.

    :READ &UC_CAUSE_NAME,,
    :PRINT &UC_CAUSE_NAME


    This will provide the name JOB_B in the variable &UC_CAUSE_NAME.-------------------------------------------

    Here's the link to the documentation on the READ function.

    Original Message:
    Sent: 06-07-2021 06:44 PM
    From: Neeraja Ethiraj
    Subject: How to retrieve the object name in a script getting triggered under Time Checkpoint

    We have a requirement where we need to fetch the name of the job under whose properties(Time and dependency), we have a script getting triggered under evaluate check point. This script needs the job name.

    Eg :

    Workflow Name : JOBP_TEST
    We have two jobs under this workflow, namely JOB_A and JOB_B
    Under the properties of JOB_B -> Under Evaluate Checkpoint, we have a script(SCRI_TEST) executing if a particular time has been reached.
    We want to pull the job name JOB_B in this script.

    Could you please suggect how we can achieve this?

    We have tried different script elements like SYS_ACT_PARENT_NR(), SYS_ACT_ME_NAME etc.. But all of them are either returning the script name SCRI_TEST or the workflow name JOBP_TEST only.


  • 5.  RE: How to retrieve the object name in a script getting triggered under Time Checkpoint

    Posted 5 days ago
    Thank You.. That helped!