Skip to main content
Kinetic Community

Task Troubleshooting

This page goes over some of the techniques for troubleshooting task exceptions and describes some common task errors and what can be done to address them.

Reading a Task Exception

Task 2/3

The Source ID is the Instance ID of the service item/execution of this tree. The Tree Name and Tree Instance ID are provided in a couple of places. The Node Name and Node Type (the Task handler used) are also listed. These items all assist you in locating the problem node and tree.

The Error and the Cause tell you what exactly the error was and what the task engine has identified as the cause. This will assist you in correcting the error condition.

In some cases, the task stack trace may be necessary to understand the error. If the error is a problem spawned by the handler (the below example is not), the stack trace will show the line in the init.rb where the error originated. 

 

Created At Status Type Source Root Source Group Source ID Tree
05/08/2013 13:29:57 Active Handler Error Kinetic Request Brents Test Catalog II > Approval Service Item AG005056960055lIuKUQqKRJRwBfsi Send Email
  A problem was encountered processing the 'utilities_echo_v1_1' (utilities_echo_v1_1) node on the 'Send Email' (ID005056960055SYuKUQwH9IRw7fci) tree.
Description:
A problem was encountered processing the 'utilities_echo_v1_1' (utilities_echo_v1_1) node on 
the 'Send Email' (ID005056960055SYuKUQwH9IRw7fci) tree.
  ERROR: 
  KineticTask::TaskParameterException: Unable to process the 'input' parameter for node 
  'utilities_echo_v1_1' (utilities_echo_v1_1): <%=@template['Service Category Name']%>
  CAUSE:
  KineticTask::TemplateError: Unable to retrieve hash value for the key "Service Category 
  Name".
  STACK TRACE:
  lib/kinetic_task/engine_processing.rb:942:in `build_task_parameters'
  lib/kinetic_task/engine_processing.rb:934:in `each'
  lib/kinetic_task/engine_processing.rb:934:in `build_task_parameters'
  lib/kinetic_task/engine_processing.rb:793:in `execute_handler'
  lib/kinetic_task/engine_processing.rb:461:in `process_node'
  lib/kinetic_task/engine_processing.rb:733:in `process_dependents'
  lib/kinetic_task/engine_processing.rb:731:in `each'
  lib/kinetic_task/engine_processing.rb:731:in `process_dependents'
  lib/kinetic_task/engine_processing.rb:484:in `process_node'
  lib/kinetic_task/engine_processing.rb:159:in `process_branch'
  lib/kinetic_task/engine.rb:264:in `process_trigger'
  lib/kinetic_task/engine.rb:225:in `process'
  lib/kinetic/threadpool.rb:237:in `call'
  lib/kinetic/threadpool.rb:237:in `spawn'

The Status of an error can be Active or Handled. Handled error are errors that have been addressed/resolved in the Task Manager, whether action was taken (like a retry) or not. See the Handling Errors section to see details on how to resolve an error.

Task 4

In Task 4, the formatting of the error has changed somewhat. The Name of the tree (split into Source, Group, and Tree) and the Source Id is in the upper right, then, in the middle is the error type, time, status (resolved, unresolved) and run number (which when clicked will take you back to that run). You can hover over the time to get the exact timestamp. Then there is the ability to take action, then the actual error, which, in format, is the same as the actual error from previous versions.

Connector Errors

The description of a connector error (rather than a handler error) contains additional information.

The Label of the connector is provided. This is to help you identify which connector is erroring, and this is why all connectors with logic on them should also have labels. The Parent Task and Child Task nodes are also provided. This also helps indentify the connector with an issue in the tree.

The Expression to be evaluated is provided for review/clarity purposes. Instead of a Cause, a Problem is provided. The Problem indicates why the Expression could not successfully be evaluated.

A problem was encountered processing the connector expression between the 
'Retrieve Customer Information  D' and 'Junction' nodes on the 
'Processing' (ID00505696001CBTKyUQGUQUFAeGMO) tree.
  ERROR:
  KineticTask::ConnectorError: A problem was encountered processing a connector expression.
  Tree:
  Processing (ID00505696001CBTKyUQGUQUFAeGMO)

  Label:
  Approval Not Required
  Parent Task:
  Retrieve Customer Information  D (kinetic_helper_record_retrieve_v1_15)
  Child Task:
  Junction (system_junction_v1_11)
  Expression:
  <%=@results['Retrieve Customer Information']['Integer Field1'] <= @answers['Order Total']%>
  Problem:
  Unable to retrieve hash value for the key "Retrieve Customer Information".

Common Task Errors

This section reviews some common task errors and what can/should be done able them.

Unable to find message template

It's possible to reference, in the input for a handler, a message template that does not exist on the system. This can happen because of a typo, a message template being renamed, a message template that did not get moved to a higher environment, or a message template that was deleted.

  ERROR:
  KineticTask::HandlerExecutionError: A problem was encountered executing the 
  'kinetic_request_email_message_create_v1' handler.

  CAUSE:
  RuntimeError: Unable to find message template "Approval Reminder 3" in application 
  "Kinetic Request"

This may happen/be spawned from any number of handlers that process message templates, but the Cause will be the same. The cause will also list the message template name. This will allow you to search for the message template and identify why the handler couldn't find it. Note, when you are looking for message template, that the handler will be looking in the same catalog as the Service Item for the message template.

Unable to locate a remote repository task record

This error is a fancy way of saying that the engine could not find the task handler specified in the configuration for the system.

  ERROR:
  KineticTask::HandlerError: Unable to retrieve the 
  'kinetic_request_notification_submission_create_v2' handler.

  CAUSE:
  KineticTask::HandlerLoadError: Unable to locate a remote repository task record for the 
  'kinetic_request_manager_approval_submission_create_v2' handler.

This can happen if the task handler was deleted from the servers configuration, or, if you have migrated to a new environment, was never loaded in the server. The fix is the load the missing handler.

Unable to find template

This error occurs when a service item template referenced in your tree cannot be found in the referenced catalog. 

  ERROR:
  KineticTask::HandlerExecutionError: A problem was encountered executing the 
  'kinetic_work_order_create_v1' handler.

  CAUSE:
  RuntimeError: Unable to find template "Region 1 Fulfillment Work Order" in catalog 
  "National Service Catalog"

This is likely becaue the item was renamed or you are working with a clone and didn't update all the template names to reference your catalog.

No matching entry

These errors are most likely on retrieve handlers, but can happen with others as well. This error indicates that no results were returned from the search performed.

  ERROR:
  KineticTask::HandlerExecutionError: A problem was encountered executing the
  'bmc_itsm7_person_retrieve_v1' handler.

  CAUSE:
  RuntimeError: No matching entry on the CTM:People form for the given login id []

In this first case, the cause is indicating that there was no login id provided. This is most likely caused by the variable being passed in (probably either an answer or a result from a previous node) being blank/empty. To address this, you'd want to investigate why the expected value wasn't populated.

  ERROR:
  KineticTask::HandlerExecutionError: A problem was encountered executing the
  'bmc_itsm7_functional_role_lookup_login_v1' handler.

  CAUSE:
  RuntimeError: No matching entries in the CTM:SupportGrpAsscFuncRoleLkUp form for the
  given support group [SGP000000000011]

In this second case, the cause is indicating that a support group ID was provided, but there were no entries in the assocated form for that group id. To address this, you would need to look into why there were no such entries. Perhaps that support group had been deleted. Perhaps no one in that support group has a functional role. Perhaps all members have been removed from that group. The potential causes will be different depending on what handler is referenced and what it's looking for, but this error/cause indicates a data problem.

Unable to retrieve hash value for the key

This error indicates that there is a reference for a node name that hasn't been executed yet. 

ERROR:
  KineticTask::TaskParameterException: Unable to process the 'submission_instance_id' 
  parameter for node 'Set Email' (kinetic_request_submission_create_answers_v1_89): 
  <%=@results['Work Order 1']['Work Order Instance Id']%>

  CAUSE:
  KineticTask::TemplateError: Unable to retrieve hash value for the key "Work Order 1".

or, if on a connector,

A problem was encountered processing the connector expression between the 
'Retrieve Customer Information  D' and 'Junction' nodes on the 'Processing' 
(ID00505696001CBTKyUQGUQUFAeGMO) tree.
  ERROR:
  KineticTask::ConnectorError: A problem was encountered processing a connector expression.

  Tree:
  Processing (ID00505696001CBTKyUQGUQUFAeGMO)

  Label:
  Approval Not Required

  Parent Task:
  Retrieve Customer Information  D (kinetic_helper_record_retrieve_v1_15)

  Child Task:
  Junction (system_junction_v1_11)

  Expression:
  <%=@results['Retrieve Customer Information']['Integer Field1'] <= @answers['Order Total']%>

  Problem:
  Unable to retrieve hash value for the key "Retrieve Customer Information".

This could be because the node was renamed, because the node is on a different path and hasn't executed, or because the node is within a loop and this reference is outside the loop (see here how to access data from outside the loop). It may be necessary to check to see if the node has executed, if that is the case, you would want to reference this article. This can also occur when a node is copied from another node for creation and the creator forgets to update a reference (node parameter or message) and places it down a completely different branch or up higher in the tree than the item referenced.

Cannot open catalog

This error is forwarded from Remedy and will have an error code associated with it.

ERROR:
  KineticTask::HandlerInitializationError: A problem was encountered initializing the 
  'kinetic_request_submission_format_answers_html_v1' handler.

  CAUSE:
  ArsModels::Exceptions::ModelException: MessageType: 2
MessageNum: 1582MessageText: Cannot open catalog; Message number = 1582AppendedText: position 61 ('CustomerSurveyInstanceID' = "AG000c29724a16Rm--UAcOcPyQkwon" AN))

or

ERROR:
  KineticTask::HandlerExecutionError: A problem was encountered executing the 
  'itsm7_change_create_v1' handler.

  CAUSE:
  ArsModels::Exceptions::ModelException: MessageType: 2
MessageNum: 92MessageText: Cannot open catalog; Message number = 92AppendedText: myserver.test.com

The message number/error code can be looked up here to help you identify the cause. Common error codes are:

ARERR    92    Timeout during database update -- the operation has been accepted by the server and will usually complete successfully.
ARERR    93    Timeout during data retrieval due to busy server -- retry the operation.
ARERR    94    Timeout during database query -- consider using more specific search criteria to narrow the results, and retry the operation.
ARERR    1582    Logical operator expected at this position.
ARERR    1583    Relational operator expected at this position.
ARERR    1584    Field or value expected at this position.
ARERR    1587    Unknown field referenced in search line.

Timeouts can likely just be retried if the server has recovered from whatever was causing the issue. For query issue, it may be a problem with the data provided or with the query constructed in the handler. This is one case where the stack trace indication of the line that threw the error in the init.rb could be helpful.

Other Remedy Errors

Remedy can forward errors other than the Cannot open catalog error. In these cases the errors and all provided (by Remedy) details are presented in the task manager for review.

ERROR:
  KineticTask::HandlerExecutionError: A problem was encountered executing the 
  'kinetic_request_email_message_create_v1' handler.

  CAUSE:
  ArsModels::Exceptions::ModelException: MessageType: 2
MessageNum: 306
MessageText: Value does not fall within the limits specified for the field
AppendedText:  (Maximum length - 38) : 600000310

In this case, there was a value provided (likely as input to the handler) that didn't fit in the field within Remedy where it was to be put. This can be fixed by fixing the data passed to the handler in most cases.

  ERROR:
  KineticTask::HandlerExecutionError: A problem was encountered executing the 
  'bmc_cmdb_computer_system_create_v2' handler.

  CAUSE:
  NativeException: com.remedy.arsys.api.ARException:
MessageType: 2
MessageNum: 44897
MessageText:
AppendedText: The Location Information is not valid.  Please use the menus provided on the 
'Region', 'Site Group' and 'Site' fields or the type ahead return function on the 'Site' 
field to select this information.

In this example, a value provided as location (input into the handler) was not a valid value in the system. This is probably also a case of correcting the data being provided to the handler, but it is also possible that the data could be added to Remedy in this case.

  ERROR:
  KineticTask::HandlerExecutionError: A problem was encountered executing the 
  'bmc_cmdb_communication_endpoint_update_v1' handler.

  CAUSE:
  NativeException: com.remedy.arsys.api.ARException:
MessageType: 2
MessageNum: 120006
MessageText: Instance not found.
AppendedText: AS005056B81F41057TSQdCsWDwJzZB

In this case, an update was to be performed, but the instance to update was not found. To troubleshoot this, you'd need to indentify why that instance ID was set to be updated when, apparently, it doesn't exist.

These are just a few examples. As you can see, how to troubleshoot a Remedy error, entire depends on the action being take and the Remedy error details. The MessageText and any AppendedText should point you in the right direction.

undefined method * for nil:NilClass

This could be a number of different methods referenced, including '[]'. This error indicates that, within the handler, a search was done and then actions were taken with the results--but there weren't any results. The searched assumed results (rather than explicitly checking for them and erroring if none were found) and continued processing as if results were provided. As a result, a method was used, but on nil/null instead of valid value. This is one case where the reference to the line in the init.rb (handler code) is particularly helpful.

  ERROR:
  KineticTask::HandlerExecutionError: A problem was encountered executing the 
  'bmc_cmdb_element_get_v1' handler.

  CAUSE:
  NoMethodError: undefined method `size' for nil:NilClass

  STACK TRACE:
  /apps/kineticTASK7-2/apache-tomcat-7.0.39/webapps/kineticTask/tasks/bmc_cmdb_element_get_v1/
  handler/init.rb:138:in `execute'  lib/kinetic_task/engine_processing.rb:830:in `execute_handler'
  lib/kinetic_task/engine_processing.rb:446:in `process_node'
  lib/kinetic_task/engine_processing.rb:718:in `process_dependents'
  org/jruby/RubyArray.java:1612:in `each'
  lib/kinetic_task/engine_processing.rb:716:in `process_dependents'
  lib/kinetic_task/engine_processing.rb:469:in `process_node'
  lib/kinetic_task/engine_processing.rb:718:in `process_dependents'
  org/jruby/RubyArray.java:1612:in `each'
  lib/kinetic_task/engine_processing.rb:716:in `process_dependents'
  lib/kinetic_task/engine_processing.rb:405:in `process_node'
  lib/kinetic_task/engine_processing.rb:150:in `process_branch'
  lib/kinetic_task/engine.rb:244:in `process_trigger'
  lib/kinetic_task/engine.rb:205:in `process'
  org/jruby/RubyProc.java:270:in `call'
  org/jruby/RubyProc.java:220:in `call'
  lib/kinetic/threadpool.rb:237:in `spawn'
  org/jruby/RubyProc.java:270:in `call'
  org/jruby/RubyProc.java:224:in `call'

The fix on this type of errors can be in two parts. There was probably an error with the data, either provided to the handler or in the remote system (Remedy in this case), that prevented the search from finding the expected data. That issue should be fixed. Also, you may wish to update the handler so a check is done after the search that resulted in this issue so it is a more accurate 'No matching entry' error in the future.

The actions necessary if the error is on a connector are slightly different.

  ERROR:
  KineticTask::ConnectorError: A problem was encountered processing a connector expression.

  Tree:
  Complete - DB Accessability v1 (AGdcd35c9b042a2a1e0e8a32b64d144d1a9)

  Label:
  Expired or Denied

  Parent Task:
  DB Validation Approval (kinetic_request_approval_create_frb_v2_84)

  Child Task:
  Get All Submissions for Denial or Expiration (kinetic_base_submission_find_v1_83)

  Expression:
  <%=@results['Validation Approval']['Validation Status'].strip=="Denied"%> || 
  <%=@results['Validation Approval']['Validation Status'].strip=="Expired"%>

  Problem:
  undefined method `strip' for nil:NilClass

This can occur when results or answers used in an expression are nil/null. In this case, you would just need to troubleshoot why the excepted result was nil/null.

Illegal Deferrals

Errors like these indicate that a "create trigger" node was used to create a trigger for either a node inappropriately:
  KineticTask::IllegalDeferral: Recieved 'Complete' trigger '<wbr/>AGHAA5V0F1BK9ANX83VI1UFKFE10H7<wbr/>' for the Closed instance 'Manager Approval' (<wbr/>AGHAA5V0F1BK7ANWWFN737MASR7PH3<wbr/>).
  KineticTask::IllegalDeferral: Recieved 'Complete' trigger '<wbr/>AGHAA5V0F1BK9ANXRYZP9I62NZTIJE<wbr/>' for the New instance 'Create Staging Record' (<wbr/>AGHAA5V0F1BK9ANXRYZO9I61LUTIIW<wbr/>).

In the first case, the node has received a more than one complete trigger (because it is already closed), and in the second case the node is still new (not yet in progress) and it has received a complete trigger. This indicates incorrect development. The first case shouldn't cause any real concern because the complete workflow has already fired and you should be good to go. In the second case, it could be a concern if that is the only time that trigger will fire, for if so, it's possible that complete tree will never fire correctly now.

 

Handling Errors

editIcon.pngOnce a resolution is in place, use the edit icon to expose the Resolution Notes if they are not already visible.

resolvingException.png

Enter Resolution Notes that reflect the resolution decided upon. This is a required step; Resolution Notes must be entered. The Actions available will depend on the error. Handler errors will generally present choices to retry or skip the node that threw the error. Note that retrying the node is usually what is desired. This will cause the node to restart it's process and, if successful, continue on with the tree as if the error hadn't happened. Skipping the task can be a choice if the output/action from this task are not necessary further down the tree.

actions.png

Connector errors will give you the option of continuing the tree down that path. Whether you want to execute the child task or not would depend on how the logic should have executed if it had been correct. 

actionsConnector.png

Specifying an action, however, is not required. The Action field can be left blank. When the Resolve Exception button is clicked, the Resolution Notes are stored, Additional Actions are taken (if specified), and the Exception Status is updated to Handled. If no action is specified in the Additional Actions dropdown, no retry or further execution takes place--even if you typed "Retry" in the Resolution Notes; if no action is specified, the error is considered handled but the tree is stalled and will not continue.