Database SQL Operation: TaskAssignment.searchUserWorkQueueTasksDueInTheNextTimePeriod
Description: | Returns user work queue tasks due in the next time period |
Sterotype: | nsmulti |
SELECT
w.deadlineTime,
t.reservedBy
INTO
:deadlineDateTime,
:reservedBy
FROM
Task t ,
WorkflowDeadline w
WHERE t.taskID = w.taskID
AND w.deadlineTime >= :fromDeadlineDateTime
AND w.deadlineTime < :toDeadlineDateTime
AND t.taskID IN
(
SELECT
taskID
FROM
TaskAssignment ta
WHERE ta.assigneeType = :assigneeType
AND ta.relatedID IN
(
SELECT
DISTINCT wqs.workQueueID
FROM
WorkQueueSubscription wqs,
Users u
WHERE wqs.userName = u.userName
AND wqs.subscriberType = :subscriberType
AND u.statusCode = :recordStatus
AND u.userName = :relatedName
)
)
ORDER BY deadlineTime
|