search cancel

Closing subtasks sometimes get an error on Complete Incident Management Subtask component

book

Article ID: 213355

calendar_today

Updated On:

Products

ServiceDesk

Issue/Introduction

Getting the following error when checking an incident subtask:

"The subtask being worked is already closed with the active incident ticket, removing task link. If you continue to see this error please contact your system administrator"

The logs shows the following:

6632:0229 2021-04-06 19:08:28.120 Error ****
 Exception in Close Subtask
 ReportID:7fd65da5-9723-11eb-a2f4-00155d1bf6e0
 WFTaskID:8e7e5081-9724-11eb-a2f4-00155d1bf6e0
 SessionID:7fd65da5-9723-11eb-a2f4-00155d1bf6e0
 TicketID:SM-00000810
 Component Name:Complete Incident Management Subtask
 Message:
 Server was unable to process request. ---> String or binary data would be truncated.
 The statement has been terminated.
 StackTrace:
 System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> String or binary data would be truncated.
 The statement has been terminated.
 at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
 at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
 at Symantec.ServiceDesk.Im.Core.Components.CompleteSubTaskAssignmentComponent.CloseWorkflowTask(SubTaskAssignment assignment, String completedBy, IData data)
 at LogicBase.Core.ExecutionEngine.SinglePathProcessComponentExecutionDelegate.Execute(IData data, IOrchestrationComponent comp, String String or binary data would be truncated.
 The statement has been terminated.
 TriggerExceptionClassName:
 System.Web.Services.Protocols.SoapException

 

The customer found a lot of tasks closed or removed from IM (Incident Management), but the task on TASK table [IsCompleted] = 0 and on ImSubTaskAssignment table TaskIsClosed = 1, so the link is active on ticket and users get in loop trying to close the tasks. 

 
Sql queries:
 
select * from [Task] tsk with (nolock)
left join [ImSubTaskAssignment] ist with (nolock) on tsk.TaskID =  ist.TaskId
where ist.TaskIsClosed = 1
and tsk.IsCompleted = 0

select * from [Task] tsk with (nolock)
left join [ImSubTaskAssignment] ist with (nolock)  on tsk.TaskID =  ist.TaskId
where tsk.Name like 'Subt%:%'
and tsk.TaskID not in ( select taskid from [ImSubTaskAssignment] with (nolock))
and tsk.IsCompleted = 0 
 

To resolve this, the customer simply made a job to update every taskID with IsCompleted = '1' from query results


DECLARE @TASKID nvarchar(max)
SET @TASKID = '25109012-4eaf-11eb-a2c6-0050569e7f9b'
update Task set IsCompleted = '1' where TaskID = @TASKID

Cause

Here we deal with SQL data truncation. Reason: Task name is rather long and TaskHIstory.[Name] is just 100 chars while Task.[Name] is 510 chars.

Thus, the task is successfully created with Name length > 100, but when it is resolved, resolution fails at writing into the TaskHistory table.

Environment

ServiceDesk 8.5 RU3, RU4

Resolution

This issue has been reported to Symantec Development team. A fix for this is planned for ITMS/SD 8.6 RU1

In the meantime, update the TaskHistory table in the following way:

alter table TaskHistory
alter column Name nvarchar(510) not null

Attachments