HelpDesk (ServiceNow) tickets are not created on Job Failure
search cancel

HelpDesk (ServiceNow) tickets are not created on Job Failure

book

Article ID: 399100

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

HelpDesk integration was configured and is kicked off on a JOBFAILURE alarm, but no ticket is generated in ServiceNow.

AutoSys scheduler log has a 

[05/26/2025 13:15:34]     CAUAJM_I_40245 EVENT: FORCE_STARTJOB   JOB: ServiceNow_Test_Job JOID: 25569           RUNID: 560531          NTRY: 0
[05/26/2025 13:15:34]     CAUAJM_I_40245 EVENT: CHANGE_STATUS    STATUS: STARTING        JOB: ServiceNow_Test_Job MACHINE: <agent>.<example>.<com> JOID: 25569           RUNID: 12345          NTRY: 1
[05/26/2025 13:15:34]     CAUAJM_I_10082 [<agent>.<example>.<com> connected for ServiceNow_Test_Job 25569.12345.1]
[05/26/2025 13:15:35]     CAUAJM_I_40245 EVENT: CHANGE_STATUS    STATUS: RUNNING         JOB: ServiceNow_Test_Job MACHINE: <agent>.<example>.<com> JOID: 25569           RUNID: 12345          NTRY: 1
[05/26/2025 13:15:35]     <Executing at WA_AGENT>
[05/26/2025 13:15:35]     CAUAJM_I_40245 EVENT: CHANGE_STATUS    STATUS: FAILURE         JOB: ServiceNow_Test_Job MACHINE: <agent>.<example>.<com> EXITCODE: 1               JOID: 25569           RUNID: 12345          NTRY: 1
[05/26/2025 13:15:35]     CAUAJM_I_61015 Help desk request pending for JOB: ServiceNow_Test_Job RUN_NUMBER: 12345.1 STATUS: FAILURE
[05/26/2025 13:15:36]     CAUAJM_I_40245 EVENT: ALARM            ALARM: JOBFAILURE       JOB: ServiceNow_Test_Job MACHINE: <agent>.<example>.<com> EXITCODE: 1               JOID: 25569           RUNID: 12345          NTRY: 1
[05/26/2025 13:15:36]     CAUAJM_I_61015 Help desk request pending for JOB: ServiceNow_Test_Job RUN_NUMBER: 12345.1 ALARM: JOBFAILURE
[05/26/2025 13:15:36]     CAUAJM_I_61019 Help desk request creation successful for JOB: ServiceNow_Test_Job RUN_NUMBER: 12345.1 ALARM: JOBFAILURE
[05/26/2025 13:15:36]     CAUAJM_I_61019 Help desk request creation successful for JOB: ServiceNow_Test_Job RUN_NUMBER: 12345.1 STATUS: FAILURE

 

Environment

AutoSys Workload Automation

Cause

The URL for helpdesk ticket creation was set incorrectly to below:

helpdesk_ticket_creation_url=https://instance.servicenow.com/api/now/import/u_standard_incident_import

 
 

Resolution

The helpdesk_url and helpdesk_ticket_creation_url should be set to below:

helpdesk_url=https://instance.service-now.com/api/now
helpdesk_ticket_creation_url=https://instance.servicenow.com/api/now/table/incident


Additional steps are also documented here

 

Additional Information

If ISDBGACTIV=LIGHT,HEAVY,JOB  is set, below additional debug information gets printed to give additional details:


 
[05/27/2025 13:42:28.162] 29180  25496  callRestAPI(): url = https://instance.servicenow.com/api/now/import/u_standard_incident_import user agent = AutoSys http method = 47 payload = 
[05/27/2025 13:42:28.162] 29180  25496  {
[05/27/2025 13:42:28.162] 29180  25496      "u_short_description": "Instance: ACE Job name: ServiceNow_Test_Job Status: FAILURE",
[05/27/2025 13:42:28.162] 29180  25496      "u_description": "",
[05/27/2025 13:42:28.162] 29180  25496      "u_urgency": "3",
[05/27/2025 13:42:28.162] 29180  25496      "u_impact": "3",
[05/27/2025 13:42:28.162] 29180  25496      "u_assignment_group": "\\\Test Group\\\"",
[05/27/2025 13:42:28.162] 29180  25496      "u_caller": "test name",
[05/27/2025 13:42:28.162] 29180  25496      "comments": "Scheduler host: <hostname>.<example>.<com> Job run machine: <hostname>.<example>.<com> Job run identifier: 25569.12345.1 Exit code: 1",
[05/27/2025 13:42:28.162] 29180  25496      "u_configuration_Item":"Autosys",
[05/27/2025 13:42:28.162] 29180  25496      "u_category":"System/Service",
[05/27/2025 13:42:28.162] 29180  25496      "u_subcategory" : "Error Message",
[05/27/2025 13:42:28.162] 29180  25496      "u_operation":"Create",
[05/27/2025 13:42:28.162] 29180  25496      "u_affected_user":"test name",
[05/27/2025 13:42:28.162] 29180  25496      "u_correlation_provider":"Autosys",
[05/27/2025 13:42:28.162] 29180  25496      "u_channel":"test tool" 
[05/27/2025 13:42:28.162] 29180  25496  }
[05/27/2025 13:42:28.162] 29180  25496   retries = 5 retry interval = 1 receive response time out = 60 connection time out = 60
..
..

[05/27/2025 13:42:28.703] 29180  30716  callRestAPI(): http response code = 201
[05/27/2025 13:42:28.703] 29180  30716  callRestAPI(): http response code = 201[05/27/2025 13:42:28.703] 29180  30716  callRestAPI(): response = [{"import_set":"########","staging_table":"u_standard_incident_import","result":[{"transform_map":"Standard Incident Transform Map","table":"incident","status":"error","error_message":"[Create] is not a valid operation value; Target record not found"}]}]
[05/27/2025 13:42:28.703] 29180  30716  L:2 svcnow.cpp 245 HDESK_createTicket Response [{"import_set":"########","staging_table":"u_standard_incident_import","result":[{"transform_map":"Standard Incident Transform Map","table":"incident","status":"error","error_message":"[Create] is not a valid operation value; Target record not found"}]}] rc [1] apiRetCode [0] http code [201]
[05/27/2025 13:42:28.728] 29180  30716  L:2 as_json.cpp 227 DBQ cDuktapeHelper::retrieveJSONPath  elapsed [24000]
[05/27/2025 13:42:28.752] 29180  30716  L:2 as_json.cpp 227 DBQ cDuktapeHelper::retrieveJSONPath  elapsed [24000]
[05/27/2025 13:42:28.772] 29180  30716  CAUAJM_I_61019 Help desk request creation successful for JOB: ServiceNow_Test_Job RUN_NUMBER: 12345.1 STATUS: FAILURE
[05/27/2025 13:42:29.021] 29180  19168  GBE[1748371349:@0]:  
[05/27/2025 13:42:29.188] 29180  25496  callRestAPI(): http response code = 201
[05/27/2025 13:42:29.188] 29180  25496  callRestAPI(): http response code = 201[05/27/2025 13:42:29.188] 29180  25496  callRestAPI(): response = [{"import_set":"#########","staging_table":"u_standard_incident_import","result":[{"transform_map":"Standard Incident Transform Map","table":"incident","status":"error","error_message":"Missing [u_configuration_item] in payload; Target record not found"}]}]
[05/27/2025 13:42:29.188] 29180  25496  L:2 svcnow.cpp 245 HDESK_createTicket Response [{"import_set":"########","staging_table":"u_standard_incident_import","result":[{"transform_map":"Standard Incident Transform Map","table":"incident","status":"error","error_message":"Missing [u_configuration_item] in payload; Target record not found"}]}] rc [1] apiRetCode [0] http code [201]
[05/27/2025 13:42:29.215] 29180  25496  L:2 as_json.cpp 227 DBQ cDuktapeHelper::retrieveJSONPath  elapsed [27000]
[05/27/2025 13:42:29.242] 29180  25496  L:2 as_json.cpp 227 DBQ cDuktapeHelper::retrieveJSONPath  elapsed [26000]