Operation Details
Description: List unreserved task details for specified work queue id
Sterotype: nsmulti
SQL
SELECT
  t.taskID,
  t.priority,
  t.assignedDateTime,
  t.wdoSnapshot,
  wfdl. deadlinetime AS dueDateTime,
  wq.name,
  t.status,
  t.versionNo
INTO
  :taskID,
  :taskPriority,
  :assignedDateTime,
  :subject,
  :taskDeadlineDateTime,
  :assignedTo,
  :status,
  :versionNo 
FROM
  TaskAssignment ta,
  WorkQueue wq,
  Task t 
  
  LEFT OUTER JOIN
  
  WorkflowDeadline wfdl 
  ON wfdl.taskID = t.taskID 
WHERE 
  (
    :searchByRelatedIDInd = '0' 
    OR ta.relatedID = :relatedID 
  ) 
  AND t.status NOT IN( :taskCompleted, :taskClosed) 
  AND ta.assigneeType = :assigneeType 
  AND t.taskID =ta.taskID 
  AND t.reservedBy IS NULL 
  AND wq.workQueueID =ta.relatedID