Hits are not shown in correct order in Control Tower
The investigation steps are different, depending on which strategy you use to sort Manual Tasks.
Case 1: sorting is based on FIFO
To investigate, check the FIFO configuration:
Verify the data in the _sys_record_order column.
Make sure the
core.task.queue.fifo.enabledparameter is set totrue.
Case 2: sorting is based on DTR
warning
Dynamic Task Rendering (DTR) is not supported since IA Cloud Enterprise version 10.2.0. You must not enable it. Otherwise, custom sorting will not work.
To investigate, act as follows:
Step 1
Check the Dynamic Task Rendering (DTR) configuration:
DTR is enabled in Manual Task options.
The Task Comparator is specified.
Step 2
If everything is configured correctly, execute the following query in the database to get statistics:
select r.id as run_id, r.title as run_title,r.uuid as run_uuid, h.id as ws_hit_id, h.vid as ws_hit_vid,
a.vid as assignment_vid, ht.vid as hit_type_vid, answered.nativeid as endpoint_task_id, ah.id as ah_hit_id,
ah.creationtime as ah_creation_time, submitted.creation_time as submitted_creation_time, ah.completiondate as ah_competion_date,
a.assignment_status as a_status,
a.accept_time as assignment_accept_time, aha.accepttime as aha_accepttime, a.submit_time as assignment_submit_time, aha.submittime as aha_submittime,
aha.assignmentid as aha_assignmentid, hsdi.jsondataitemvalues, ah.sortindex as awshit_sortindex
from ws.hit h (nolock)
join ws.hit_type ht (nolock) on ht.id=h.hit_type_id
join ws.[assignment] a (nolock) on a.hit_id=h.id
join ct.endpointtask answered (nolock) on answered.nativeid = h.vid
join ct.awshit ah (nolock) on ah.id = answered.awshitid
join ws.hit submitted (nolock) on ah.uuid = submitted.unique_request_token
join ct.run r (nolock) on r.id=ah.run_id
join ct.hitsubmissiondataitem hsdi (nolock) on hsdi.hit_id=ah.id
join ct.awshitassignment aha (nolock) on aha.hit_id=ah.id
where r.title = '{manual_task_name}'
and r.rootrunuuid = `{placeholder_of_root_run_uuid}`
order by ah.sortindex
note
If sorting is completed without issues on the Control Tower side, ah.sortindex is populated with an integer value. If ah.sortindex is empty, check Control Tower logs for Task Comparator errors.
Output
If you failed to identify the root cause, escalate the case to the Support team. Provide the Task Comparator code and database query results. Otherwise, continue the investigation.
Read also: