838: ,x_msg_count => l_msg_count
839: ,x_msg_data => l_msg_data);
840:
841: IF (l_return_status <> FND_API.G_RET_STS_SUCCESS) THEN
842: WF_NOTIFICATION.WriteToClob(document, 'Content Generation failed');
843: DBMS_LOB.writeappend(document, 255, SUBSTR(l_msg_data, 255));
844: END IF;
845: ELSE
846: IF c_pwp_preview_info%ISOPEN THEN
851: document_type := 'text/html';
852:
853: EXCEPTION
854: WHEN OTHERS THEN
855: WF_NOTIFICATION.WriteToClob(document, 'Content Generation failed');
856: dbms_lob.writeappend(document, 255, substrb('Testing', 255));
857: NULL;
858: END SHOW_TASK_NOTIFY_PREVIEW;
859:
1577: and not exists (select 1 from pa_tasks where task_id = pra.task_id and project_id = pra.project_id);
1578:
1579: l_unapproved_task_cnt NUMBER :=0;
1580: c_task_rec c_task_info%ROWTYPE;
1581: l_max_notification_id WF_NOTIFICATIONS.notification_id%TYPE;
1582: BEGIN
1583: log_message('Inside Verify_Task_Status',3);
1584: x_return_status := 'S';
1585:
1602: IF c_task_rec.task_status = 'SUBMITTED' THEN
1603: BEGIN
1604: SELECT max(notification_id)
1605: INTO l_max_notification_id
1606: FROM WF_NOTIFICATIONS WFN
1607: WHERE message_type = 'PATASKWF'
1608: AND status = 'OPEN'
1609: AND EXISTS (
1610: SELECT 1
1607: WHERE message_type = 'PATASKWF'
1608: AND status = 'OPEN'
1609: AND EXISTS (
1610: SELECT 1
1611: FROM WF_NOTIFICATION_ATTRIBUTES
1612: WHERE notification_id = wfn.notification_id
1613: AND name = 'TASK_NUMBER'
1614: AND text_value like c_task_rec.task_number
1615: )
1614: AND text_value like c_task_rec.task_number
1615: )
1616: AND EXISTS (
1617: SELECT 1
1618: FROM WF_NOTIFICATION_ATTRIBUTES
1619: WHERE notification_id = wfn.notification_id
1620: AND name = 'PROJECT_NUMBER'
1621: AND text_value like c_task_rec.project_number
1622: );
1624: WHEN OTHERS THEN
1625: NULL;
1626: END;
1627: IF l_max_notification_id IS NOT NULL THEN
1628: UPDATE WF_NOTIFICATIONS
1629: SET status = 'CLOSED'
1630: WHERE notification_id = l_max_notification_id;
1631: PA_TASK_WORKFLOW_PKG.Start_Task_Aprv_Wf (
1632: 'PATASKWF'