Database SQL Operation: TaskWorkQueueAssignment.searchUnreservedByWorkQueuePriorityAndNearestAssignedDateTime
Description: | Returns the unreserved task identifier based on the specified work queue, the priority of the task and nearest assigned date. There may be more than one record matching the search criteria as system generated tasks could have the same assigned date time.
@deprecated Since Curam 6.0. The TaskWorkQueueAssignment entity has been
deleted. This method has been replaced by
{@link curam.core.sl.entity.intf.TaskAssignment#
searchTasksAssignedToOrgObjectWithPriorityNearestToDate(
TaskIDRelatedIDAndTypeKey)}. See release note CR00223130. |
Sterotype: | nsmulti |
SELECT
Task.taskID
INTO
:taskID
FROM
TaskWorkQueueAssignment,
Task
WHERE TaskWorkQueueAssignment.workQueueID = :workQueueID
AND TaskWorkQueueAssignment.taskID = Task.taskID
AND Task.priority = :priority
AND Task.reservedBy IS NULL
AND Task.assignedDateTime =
(
SELECT
MIN(assignedDateTime)
FROM
TaskWorkQueueAssignment,
Task
WHERE TaskWorkQueueAssignment.workQueueID = :workQueueID
AND TaskWorkQueueAssignment.taskID = Task.taskID
AND Task.priority = :priority
AND Task.assignedDateTime <= :assignedDateTime
AND Task.reservedBy IS NULL
)
|