&$QUEUE# returns the queue the current task (=Notification object) is running in, not the parent object which triggered the alarm.
Original Message:
Sent: Sep 16, 2024 11:26 AM
From: timjcw32767
Subject: Retrieving Queue used for a job
Perhaps I am missing something. I have something similar but get some inconsistent results.
My notification subject
Job: &uc_slm_service_name#
RunID:&uc_slm_service_runid#
Time: &uc_slm_service_time#
Return Code: &slm_violation#
Queue: &$QUEUE#
My notification process:
:read &uc_slm_slo_name#,,
:read &uc_slm_service_name#,,
:read &uc_slm_service_status#,,
:read &uc_slm_service_runid#,,
:read &uc_slm_service_time#,,
: read &uc_slm_violation_msg_number#,,
: read &uc_slm_violation_msg_insert#,,
: set &slm_violation# = get_msg_txt(&uc_slm_violation_msg_number#,&uc_slm_violation_msg_insert#)
:set &system# = GET_UC_SYSTEM_NAME()
:set &client# = SYS_ACT_CLIENT()
:set &lang# = SYS_USER_LANGUAGE()
:SET &RC# = GET_STATISTIC_DETAIL(&uc_slm_service_runid#,RETURN_CODE)
:PRINT &RC#
:SET &STAT# = GET_STATISTIC_DETAIL(&uc_slm_service_runid#,STATUS)
:PRINT &STAT#
:set &slm_statustext# = get_msg_txt(&uc_slm_service_status#,'')
:set &slm_statustext# = "&slm_statustext# (&uc_slm_service_status#)"
:SET &LAST_ERR_INS# = GET_STATISTIC_DETAIL(&uc_slm_service_runid#,LAST_ERR_INS)
:SET &LAST_ERR_NR# = GET_STATISTIC_DETAIL(&uc_slm_service_runid#,LAST_ERR_NR)
:SET &ERR_MESSAGE# = GET_MSG_TXT(&LAST_ERR_NR#,&LAST_ERR_INS#)
:if &lang# = 'E'
: put_att SUBJECT = "Job Failure Notification, &uc_slm_service_name#, RunID: &uc_slm_service_runid#, Client: &$client# QUEUE: &$QUEUE#"
My email results:
Subject: Job Failure Notification, JOBS.TESTFAILUREJOB, RunID: 0001421970, Client: 0001 QUEUE: CLIENT_QUEUE
Job: JOBS.TESTFAILUREJOB
RunID:0001421970
Time: 2024-09-16 10:16:32
Return Code: U00045079 The status 'FAULT_OTHER - Start impossible. Other error.' does not match the expected status 'ANY_OK'.
Queue: CLIENT_QUEUE
The queue is the queue the CALL executes and not the queue the job executes.
I also cannot get the agent value.
All the other information is correct, although it would be ideal to get the cause shown in the messages/details.
Original Message:
Sent: Sep 13, 2024 11:21 AM
From: Marilyn Singley
Subject: Retrieving Queue used for a job
To list the QUEUE,
In the Notification tab of the CALL OBJECT:
for the Body of the email:
add Job ran in QUEUE: &$QUEUE#
To add it the Subject of the email:
Add in the Process Tab of the Call object, QUEUE: &$QUEUE#
Here's an example of the Subject line
Here's an example of the Email Body
Original Message:
Sent: Sep 11, 2024 01:30 PM
From: timjcw32767
Subject: Retrieving Queue used for a job
I am in the process of improving/setting up a CALL that sends information to ServiceNow regarding aborts. The goal is to have ServiceNow assign incident tickets based on the queue the job used. I have yet to find a way to get the queue value either in a CALL that triggers if the job returns END_NOT_OK, or through an SLO. Any ideas or am I going at this in the wrong manner? Similarly, if I have post processing script to parse out "caused by." I can get that value, but not without it as a post processing script. Ideally, I would not have to add post processing to thousands on objects. Better still would be if errors for situations like, FAULT_OTHER would also populate.