search cancel

How to find timeout duration for the Work Incident task for existing Incidents?

book

Article ID: 173409

calendar_today

Updated On:

Products

ServiceDesk

Issue/Introduction

ServiceDesk incidents are unexpectedly being set to closed one year after they were created.

Cause

All workflow tasks are created with a timeout date. By default ServiceDesk sets this value to one year, the maximum allowed value. If the task hasn't been completed via this designated date the Workflow server will trigger the timeout path setup in the project for the task.

Resolution

This is working as designed. 

If you have a business need to keep a ServiceDesk incident open for longer than one year you can use the SQL query provided below to find incidents with an upcoming timeout date and take the necessary steps to extend them.

The incident's timeout date is not displayed in the Process Manager portal and must be viewed via SQL.

The timeout date for a task is saved as a trigger date in properties of the associated message in the database. This query is returns all incidents who's timeout (trigger date) is less than 30 days from today.

Note: Do not attempt to change the trigger date value via SQL. To address less than expected timeouts from via the Process Manager portal is to put Incident on hold and then take it out of hold. This will result in a new Work Incident task and a new timeout date.

SELECT TOP 100
 t.WFTaskNumberPrefix AS [Incident ID],
 t.AssignedDate AS [Started Date],
 CAST((mp.AttributeNumValue - 599266080000000000) / 10000000 / 24 / 60 / 60 AS datetime) AS 'Timeout Date'
FROM MessageProperties mp WITH (NOLOCK)
LEFT JOIN Task t  WITH (NOLOCK) 
 ON mp.messageID = t.TaskID
WHERE AttributeKey = 'TRIGGER_DATE'
 AND QueueName='local.workflowsqlexchange-incident_mgmt.tasks'
 AND DATEDIFF(day,t.AssignedDate,CAST((mp.AttributeNumValue - 599266080000000000) / 10000000 / 24 / 60 / 60 AS datetime)) < 30