Operation Details
Description: Returns a list of all the task identifiers from the task user assignment table for all of the redirect task to users that have currently active task redirection records. The name of the user from which the tasks will be redirected from and the name of the user to which the tasks will be redirected are also returned.
Sterotype: nsmulti
SQL
SELECT
  ta.taskAssignmentID,
  ta.taskID,
  ta.relatedID,
  ta.assigneeType,
  ta.relatedName,
  tr.fromUserName,
  tr.toUserName,
  tr.toRedirectID,
  tr.toRedirectType
INTO
  :taskAssignmentID,
  :taskID,
  :relatedID,
  :assigneeType,
  :relatedName,
  :fromUserName,
  :toUserName,
  :toRedirectID,
  :toRedirectType 
FROM
  TaskRedirection tr,
  TaskAssignment ta 
WHERE 
  (
    ta.relatedName = tr.fromUserName 
  ) 
  AND 
  (
    tr.startDateTime <= :currentDateTime 
    AND 
    (
      tr.endDateTime IS NULL 
      OR tr.endDateTime >= :currentDateTime 
    ) 
  ) 
  AND tr.blockTaskAllocation = '0' 
ORDER BY tr.fromUserName