Operation Details
Description: Returns a list of the task details for tasks that are assigned to a specified organizational object, are reserved by a specified user and that are due within a specified time period. The status of the task may also be specified in the search criteria. This function returns the list of tasks ordered by assigned date time, earliest first.
Sterotype: nsmulti
SQL
SELECT
  t.taskID,
  t.priority,
  t.assignedDateTime,
  t.restartTime,
  t.wdoSnapshot,
  t.overflowInd,
  t.versionNo,
  w.deadlineTime
INTO
  :taskID,
  :taskPriority,
  :reservedDateTime,
  :restartDateTime,
  :wdoSnapshot,
  :overflowInd,
  :versionNo,
  :taskDeadlineDateTime 
FROM
  Task t,
  WorkflowDeadline w,
  TaskAssignment ta 
WHERE t.taskID = w.taskID 
  AND t.taskID = ta.taskID 
  AND 
  (
    :searchByRelatedIDInd = '0' 
    OR ta.relatedID = :relatedID 
  ) 
  AND 
  (
    :relatedName IS NULL 
    OR ta.relatedName = :relatedName 
  ) 
  AND assigneeType = :assigneeType 
  AND w.deadlineTime >= :fromDeadlineDateTime 
  AND w.deadlineTime < :toDeadlineDateTime 
  AND t.reservedBy = :reservedBy 
  AND t.status = :status 
ORDER BY t.assignedDateTime ASC