Operation Details
Description: Returns the details of tasks that are assigned to a specified user and that are due within the specified time period. The tasks may be assigned directly to the specified user or be present on a work queue that the user is subscribed to. The search criteria allow for the details of reserved tasks, assigned tasks or all of the tasks to be returned. The results are ordered by assigned date time, earliest first. @deprecated Since Curam 6.0. The TaskUserAssignment entity has been deleted. This method has been replaced by {@link curam.core.sl.entity.intf.TaskAssignment#searchUserWorkQueueTasksByDueDate(TasksByDueDateKey)}. See release note CR00223130.
Sterotype: nsmulti
SQL
SELECT
  t.taskID,
  t.priority,
  t.reservedBy,
  u.fullName,
  t.assignedDateTime,
  t.wdoSnapshot,
  t.overflowInd
INTO
  :taskID,
  :taskPriority,
  :taskReservedByUserName,
  :taskReservedByFullUserName,
  :taskAssignedDateTime,
  :wdoSnapshot,
  :overflowInd 
FROM
  Task t 
  
  LEFT OUTER JOIN
  
  Users u 
  ON (t.reservedBy = u.userName) 
  
  LEFT OUTER JOIN
  
  WorkflowDeadline w 
  ON (t.taskID = w.taskID) 
WHERE w.deadlineTime >= :fromDeadlineDateTime 
  AND w.deadlineTime < :toDeadlineDateTime 
  AND 
  (
    t.taskID IN 
    ( 
    SELECT
      taskID 
    FROM
      TaskUserAssignment tua 
    WHERE tua.userName = :userName 
    ) 
    OR 
    (
      t.taskID IN 
      ( 
      SELECT
        taskID 
      FROM
        TaskWorkQueueAssignment tw 
      WHERE tw.workQueueID IN 
        ( 
        SELECT
          workQueueID 
        FROM
          WorkQueueSubscription wq 
        WHERE wq.userName = :userName 
        ) 
      ) 
    ) 
  ) 
  AND 
  (
    
    (
      :allUserTasksInd = '0' 
      OR 
      (
        t.reservedBy IS NULL 
        OR t.reservedBy IS NOT NULL 
      ) 
    ) 
    AND 
    (
      :allReservedUserTasksInd = '0' 
      OR t.reservedBy IS NOT NULL 
    ) 
    AND 
    (
      :allAssignedUserTasksInd = '0' 
      OR t.reservedBy IS NULL 
    ) 
  ) 
ORDER BY assignedDateTime ASC