Automic Workload Automation

 View Only
Expand all | Collapse all

Is it possible to send notification using SLO object only for job running through schedule and not for adhoc submission

  • 1.  Is it possible to send notification using SLO object only for job running through schedule and not for adhoc submission

    Posted Mar 29, 2023 08:51 AM

    Is it possible to send notification using SLO object only for job running through schedule and not for adhoc submission , if yes how?



  • 2.  RE: Is it possible to send notification using SLO object only for job running through schedule and not for adhoc submission

    Posted Mar 29, 2023 10:25 AM

    Hi Arun,

    in your jobs get the result of SYS_ACT_PARENT_TYPE using :PSET. In the CALL object use the script variable and check if the type is JSCH -> send the notification.

    https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/21.0.5/Automic%20Automation%20Guides/Content/Script/Reference/SYS_ACT_PARENT_TYPE.htm?tocpath=Reference%7CAutomation%20Engine%20Script%20Reference%7CScript%20Elements%20Ordered%20by%20Purpose%7CWorkflows%7C_____10

    regards,
    Peter



    ------------------------------
    Automic Certified Professional/Expert & Broadcom Knight

    For AUTOMIC trainings please check https://www.qskills.de/qs/workshops/automic/
    ------------------------------



  • 3.  RE: Is it possible to send notification using SLO object only for job running through schedule and not for adhoc submission

    Posted Mar 30, 2023 05:15 AM

    Hi Peter,

    Thanks for the reply. i think i figured out it still some testing i need to do, i am using below code in call mail to achieve this

    :SET &RunID = GET_UC_OBJECT_NR(&uc_slm_service_name#)
    :SET &parent# = GET_PARENT_TYPE(&RunID, ACT)


    :If &parent# = "USER"
    :   PRINT &parent#
    :   PRINT 'Its Adhoc submission skipping notifications'
    :   STOP NOMSG
    :else
    :  PRINT &parent#