Automic Workload Automation

 View Only
  • 1.  Call Notification not giving correct state of job

    Posted Oct 23, 2020 08:35 AM
    Hi Team,

    We are calling call mail notification from the post process of jobs using the below code.
    :SET &RETCODE# = GET_UC_OBJECT_STATUS(,,"RETCODE")
    :IF &RETCODE# > 0
    :SET &ACTOBJ# = ACTIVATE_UC_OBJECT(JOBS,CALL.MAIL.HTML.FINAL)
    :ENDIF

    In the call notification itself we have defined the variables as below:
    :SET &UC_CAUSE_NAME = GET_PARENT_NAME(&RUN#, ACT)
    :SET &UC_CAUSE_NR = GET_PARENT_NR(&RUN#,ACT)
    :SET &UC_CAUSE_STATE = GET_UC_OBJECT_STATUS(,&UC_CAUSE_NR,"STATUS_TEXT")
    :SET &UC_CAUSE_RETCODE = GET_UC_OBJECT_STATUS(,&UC_CAUSE_NR,"RETCODE")

    :set &parentname# = GET_PARENT_NAME(&UC_CAUSE_NR, ACT)
    :set &parentnr# = GET_PARENT_NR(&UC_CAUSE_NR, ACT)
    :set &parenttyp# = SYS_ACT_PARENT_TYP('ACT')
    :set &date# = SYS_DATE_PHYSICAL('YYYY-MM-DD')
    :set &time# = SYS_TIME_PHYSICAL("HH:MM:SS")

    However when the notification is triggered it is giving the status text as (Job Ended with Return Code) instead of the actual state of the job like Ended_Not_OK
    So is there any way to get the correct status?
    Note:- We cant use the Call notification from the Work flow task properties because of some issue.


    ------------------------------
    Thanks,
    Kumar
    ------------------------------


  • 2.  RE: Call Notification not giving correct state of job

    Posted Oct 23, 2020 09:44 AM
    Hi Kumar,

    kindly check the last example on this page.

    regards,
    Peter

    ------------------------------
    Capture Europe
    ------------------------------



  • 3.  RE: Call Notification not giving correct state of job

    Posted Nov 02, 2020 08:54 AM
    Edited by KumarRahul605332 Nov 02, 2020 09:33 AM
    Thank You Peter for the suggestion. However even when I use this function the status of the job that gets captured is post processing. I have modified the Call notification and using the below script in process tab of the call notification. And the call notification is being called from the post process of the job. 
    :SET &UC_CAUSE_NR = GET_PARENT_NR(&RUN#,ACT)
    :SET &UC_CAUSE_STATE = GET_STATISTIC_DETAIL(&UC_CAUSE_NR, STATUS)