[Home] [Help]
310: fnd_msg_pub.count_msg);
311: END IF;
312: */
313: fnd_msg_pub.initialize;
314: pa_debug.init_err_stack ('pa_asgmt_wfstd.start_workflow');
315: x_msg_count := 0;
316: -- Create the unique item key to launch WF with
317: SELECT pa_prm_wf_item_key_s.nextval
318: INTO l_itemkey
482: x_msg_count := l_msg_count;
483: ELSE
484: x_msg_count := l_msg_count;
485: END IF;
486: pa_debug.reset_err_stack;
487: RETURN;
488: END IF;
489: -- Get the approvers user name
490: IF p_approver1_person_id IS NOT NULL THEN
1457: x_error_message_code := SQLCODE ;
1458: -- 4537865 : End
1459: fnd_msg_pub.add_exc_msg
1460: (p_pkg_name => 'PA_ASGMT_WFSTD',
1461: p_procedure_name => pa_debug.g_err_stack );
1462: x_msg_count := fnd_msg_pub.count_msg;
1463: x_return_status:= FND_API.G_RET_STS_UNEXP_ERROR;
1464: END Start_Workflow ;
1465:
1498: -- workflow is an APPROVAL WORKFLOW. else if the status
1499: -- is an APPROVED or REJECTED status, the workflow is a FYI only
1500: x_return_status := FND_API.G_RET_STS_SUCCESS;
1501: x_msg_count := 0;
1502: pa_debug.init_err_stack ('pa_asgmt_wfstd.get_workflow_process_info');
1503: OPEN l_stus_csr;
1504: FETCH l_stus_csr INTO l_stus_rec;
1505: IF l_stus_csr%NOTFOUND THEN
1506: x_return_status := FND_API.G_RET_STS_ERROR;
1527: x_msg_count := l_msg_count;
1528: ELSE
1529: x_msg_count := l_msg_count;
1530: END IF;
1531: pa_debug.reset_err_stack;
1532: x_return_status := FND_API.G_RET_STS_ERROR;
1533: RETURN;
1534: END IF;
1535:
1558:
1559: -- 4537865 : End
1560: fnd_msg_pub.add_exc_msg
1561: (p_pkg_name => 'PA_ASGMT_WFSTD',
1562: p_procedure_name => pa_debug.g_err_stack );
1563: x_msg_count := fnd_msg_pub.count_msg;
1564: x_return_status:= FND_API.G_RET_STS_UNEXP_ERROR;
1565: RAISE ;
1566: END Get_workflow_process_info ;
1612:
1613: l_asgmt_type pa_project_assignments.assignment_type%TYPE; /*Added for bug 6408552*/
1614: BEGIN
1615:
1616: pa_debug.init_err_stack ('pa_asgmt_wfstd.Generate_URL');
1617: -- Return if WF Not Running
1618: IF (funcmode <> wf_engine.eng_run) THEN
1619: resultout := wf_engine.eng_null;
1620: RETURN;
1747: , itemkey => itemkey
1748: , aname => 'VIEW_CONFLICT_URL_INFO'
1749: , avalue => l_view_conflict_url );
1750:
1751: pa_debug.reset_err_stack;
1752:
1753: EXCEPTION
1754: WHEN OTHERS THEN
1755: WF_CORE.CONTEXT
1816: l_msg_data VARCHAR2(200);
1817: l_error_message_code VARCHAR2(200);
1818: l_return_status VARCHAR2(30);
1819: BEGIN
1820: pa_debug.init_err_stack ('pa_asgmt_wfstd.start_new_wf');
1821: -- Return if WF Not Running
1822: IF (funcmode <> wf_engine.eng_run) THEN
1823: resultout := wf_engine.eng_null;
1824: RETURN;
1879: raise_application_error(-20001, l_error_message_code);
1880: END IF;
1881: END IF;
1882: resultout := wf_engine.eng_completed||':'||'S';
1883: pa_debug.reset_err_stack;
1884: EXCEPTION
1885: WHEN OTHERS THEN
1886: WF_CORE.CONTEXT
1887: ('PA_ASGMT_WFSTD',
1910: l_return_status VARCHAR2(30);
1911: l_schedule_exception_id NUMBER;
1912: l_is_new_assignment_flag VARCHAR2(1);
1913: BEGIN
1914: pa_debug.init_err_stack ('pa_asgmt_wfstd.Set_Success_Status');
1915: -- Return if WF Not Running
1916: IF (funcmode <> wf_engine.eng_run) THEN
1917: resultout := wf_engine.eng_null;
1918: RETURN;
1955: resultout := wf_engine.eng_completed||':'||'F';
1956: RETURN;
1957: END IF;
1958: resultout := wf_engine.eng_completed||':'||'S';
1959: pa_debug.reset_err_stack;
1960:
1961: EXCEPTION
1962: WHEN OTHERS THEN
1963: WF_CORE.CONTEXT
1987: l_return_status VARCHAR2(30);
1988: l_schedule_exception_id pa_schedule_exceptions.schedule_exception_id%TYPE;
1989: l_is_new_assignment_flag VARCHAR2(1);
1990: BEGIN
1991: pa_debug.init_err_stack ('pa_asgmt_wfstd.Set_Failure_Status');
1992: -- Return if WF Not Running
1993: IF (funcmode <> wf_engine.eng_run) THEN
1994: resultout := wf_engine.eng_null;
1995: RETURN;
2032: resultout := wf_engine.eng_completed||':'||'F';
2033: RETURN;
2034: END IF;
2035: resultout := wf_engine.eng_completed||':'||'S';
2036: pa_debug.reset_err_stack;
2037:
2038: EXCEPTION
2039: WHEN OTHERS THEN
2040: WF_CORE.CONTEXT
2074: else
2075: set the new wf item type and new wf process attr
2076: resultout = 'T'
2077: */
2078: pa_debug.init_err_stack ('pa_asgmt_wfstd.Check_Wf_Enabled');
2079: -- Return if WF Not Running
2080: IF (funcmode <> wf_engine.eng_run) THEN
2081: resultout := wf_engine.eng_null;
2082: RETURN;
2121: ELSE
2122: resultout := wf_engine.eng_completed||':'||'N';
2123: END IF;
2124: END IF;
2125: pa_debug.reset_err_stack;
2126: EXCEPTION
2127: WHEN OTHERS THEN
2128: WF_CORE.CONTEXT
2129: ('PA_ASGMT_WFSTD',
2155: l_item_attr_name VARCHAR2(30);
2156: l_approvers_list_tbl_idx NUMBER := 1;
2157: l_user_exists BOOLEAN := FALSE; -- Bug#11769582
2158: BEGIN
2159: pa_debug.init_err_stack ('pa_asgmt_wfstd.Generate_Approvers');
2160: -- Return if WF Not Running
2161: IF (funcmode <> wf_engine.eng_run) THEN
2162: resultout := wf_engine.eng_null;
2163: RETURN;
2239: , itemkey => itemkey
2240: , aname => 'NUMBER_OF_APPROVERS'
2241: , avalue => l_number_of_approvers
2242: );
2243: pa_debug.reset_err_stack;
2244:
2245: EXCEPTION
2246: WHEN OTHERS THEN
2247: WF_CORE.CONTEXT
2280: Set approvals loop counter
2281: Resultout = 'S'
2282: */
2283: -- Return if WF Not Running
2284: pa_debug.init_err_stack ('pa_asgmt_wfstd.get_approver');
2285: IF (funcmode <> wf_engine.eng_run) THEN
2286: resultout := wf_engine.eng_null;
2287: RETURN;
2288: END IF;
2381: WHERE item_type = itemtype
2382: AND item_key = itemkey
2383: AND object_id1 = l_assignment_id;
2384: resultout := wf_engine.eng_completed||':'||'S';
2385: pa_debug.reset_err_stack;
2386: EXCEPTION
2387: WHEN OTHERS THEN
2388: WF_CORE.CONTEXT
2389: ('PA_ASGMT_WFSTD',
2425: BEGIN
2426: -- This will not do anything in milestone 1. In version 1
2427: -- appropriate client extensions will be called
2428:
2429: pa_debug.init_err_stack ('pa_asgmt_wfstd.Generate_apprvl_nf_recipients');
2430: -- Return if WF Not Running
2431: IF (funcmode <> wf_engine.eng_run) THEN
2432: resultout := wf_engine.eng_null;
2433: RETURN;
4478: l_ntfy_apprvl_recipient_name pa_wf_ntf_performers.user_name%TYPE; --- Commented for 3267790 fnd_user.user_name%TYPE; --used to set NTFY_APPRVL_RECIPIENT_NAME attribute
4479: l_prev_user fnd_user.user_name%TYPE; --used to set FORWARDED_FROM attribute
4480: l_number_of_assignments NUMBER;
4481: l_mass_approve_url VARCHAR2(2000); --Mass Approve page URL
4482: l_debug_mode VARCHAR2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N'); -- 5345171
4483:
4484: BEGIN
4485:
4486: -- Initialize the Error Stack
4483:
4484: BEGIN
4485:
4486: -- Initialize the Error Stack
4487: PA_DEBUG.init_err_stack('PA_ASGMT_WFSTD.start_mass_approval_flow');
4488:
4489: --Log Message
4490: IF l_debug_mode = 'Y' THEN -- 5345171
4491: PA_DEBUG.write_log
4487: PA_DEBUG.init_err_stack('PA_ASGMT_WFSTD.start_mass_approval_flow');
4488:
4489: --Log Message
4490: IF l_debug_mode = 'Y' THEN -- 5345171
4491: PA_DEBUG.write_log
4492: ( x_module => 'pa.plsql.PA_ASGMT_WFSTD.start_mass_approval_flow.begin'
4493: ,x_msg => 'Beginning of mass approval workflow api'
4494: ,x_log_level => 1);
4495: END IF;
4763:
4764: -- Set the excetption Message and the stack
4765: FND_MSG_PUB.add_exc_msg
4766: ( p_pkg_name => 'PA_ASGMT_WFSTD.start_mass_Approval_flow'
4767: ,p_procedure_name => PA_DEBUG.G_Err_Stack );
4768:
4769: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
4770: RAISE;
4771: END start_mass_approval_flow;
4907:
4908: l_prev_asgmt_info_rec l_prev_asgmt_info_csr%ROWTYPE;
4909: l_assignments_rec l_assignments_csr%ROWTYPE;
4910: l_resource_rec l_resource_csr%ROWTYPE;
4911: l_debug_mode VARCHAR2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N'); -- 5345171
4912:
4913: BEGIN
4914:
4915: -- Initialize the Error Stack
4912:
4913: BEGIN
4914:
4915: -- Initialize the Error Stack
4916: PA_DEBUG.init_err_stack('PA_ASGMT_WFSTD.process_res_fyi_notification');
4917:
4918: --Log Message
4919: IF l_debug_mode = 'Y' THEN -- 5345171
4920: PA_DEBUG.write_log
4916: PA_DEBUG.init_err_stack('PA_ASGMT_WFSTD.process_res_fyi_notification');
4917:
4918: --Log Message
4919: IF l_debug_mode = 'Y' THEN -- 5345171
4920: PA_DEBUG.write_log
4921: ( x_module => 'pa.plsql.PA_ASGMT_WFSTD.process_res_fyi_notification.begin'
4922: ,x_msg => 'Beginning of mass fyi workflow api'
4923: ,x_log_level => 1);
4924: END IF;
5449: ,p_msg_index_out => l_msg_index_out );
5450: END IF;
5451:
5452: -- Reset the error stack when returning to the calling program
5453: PA_DEBUG.Reset_Err_Stack;
5454:
5455: -- If g_error_exists is TRUE then set the x_return_status to 'E'
5456: IF FND_MSG_PUB.Count_Msg >0 THEN
5457: x_return_status := FND_API.G_RET_STS_ERROR;
5465:
5466: -- Set the excetption Message and the stack
5467: FND_MSG_PUB.add_exc_msg
5468: ( p_pkg_name => 'PA_ASGMT_WFSTD.process_res_fyi_notification'
5469: ,p_procedure_name => PA_DEBUG.G_Err_Stack );
5470:
5471: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
5472: RAISE;
5473: END process_res_fyi_notification;
5995: FROM pa_wf_ntf_performers
5996: WHERE wf_type_code = 'MASS_APPROVAL_FYI'
5997: AND group_id = p_group_id;
5998: l_notified_id NUMBER;
5999: l_debug_mode VARCHAR2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N'); -- 5345171
6000:
6001: BEGIN
6002:
6003: -- Initialize the Error Stack
6000:
6001: BEGIN
6002:
6003: -- Initialize the Error Stack
6004: PA_DEBUG.init_err_stack('PA_ASGMT_WFSTD.process_mgr_fyi_notification');
6005:
6006: --Log Message
6007: IF l_debug_mode = 'Y' THEN -- 5345171
6008: PA_DEBUG.write_log
6004: PA_DEBUG.init_err_stack('PA_ASGMT_WFSTD.process_mgr_fyi_notification');
6005:
6006: --Log Message
6007: IF l_debug_mode = 'Y' THEN -- 5345171
6008: PA_DEBUG.write_log
6009: ( x_module => 'pa.plsql.PA_ASGMT_WFSTD.process_mgr_fyi_notification.begin'
6010: ,x_msg => 'Beginning of mass fyi workflow api'
6011: ,x_log_level => 1);
6012: END IF;
6034: IF l_admin_project = 'N' THEN
6035:
6036: --Log Message
6037: IF l_debug_mode = 'Y' THEN -- 5345171
6038: PA_DEBUG.write_log
6039: (x_module => 'pa.plsql.PA_ASGMT_WFSTD.process_mgr_fyi_notification.check_prj_manager.'
6040: ,x_msg => 'Check if project manger exists.'
6041: ,x_log_level => 1);
6042: END IF;
6421: ,p_msg_index_out => l_msg_index_out );
6422: END IF;
6423:
6424: -- Reset the error stack when returning to the calling program
6425: PA_DEBUG.Reset_Err_Stack;
6426:
6427: -- If g_error_exists is TRUE then set the x_return_status to 'E'
6428: IF FND_MSG_PUB.Count_Msg >0 THEN
6429: x_return_status := FND_API.G_RET_STS_ERROR;
6434:
6435: -- Set the excetption Message and the stack
6436: FND_MSG_PUB.add_exc_msg
6437: ( p_pkg_name => 'PA_ASGMT_WFSTD.process_mgr_fyi_notification'
6438: ,p_procedure_name => PA_DEBUG.G_Err_Stack );
6439:
6440: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6441: RAISE;
6442: END process_mgr_fyi_notification;
6477: l_update_info_doc VARCHAR2(2000);
6478: l_submitter_user_name fnd_user.user_name%type; /* Commeted for bug 3261755 VARCHAR2(30); */
6479: l_note_to_approvers VARCHAR2(2000);
6480: l_forwarded_from fnd_user.user_name%type; /* Commeted for bug 3261755 VARCHAR2(30); */
6481: l_debug_mode VARCHAR2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N'); -- 5345171
6482:
6483: BEGIN
6484: log_message('Inside mass_process_approval_result_wf');
6485:
6483: BEGIN
6484: log_message('Inside mass_process_approval_result_wf');
6485:
6486: -- Initialize the Error Stack
6487: PA_DEBUG.init_err_stack('PA_ASGMT_WFSTD.mass_process_approval_result_wf');
6488:
6489: --Log Message
6490: IF l_debug_mode = 'Y' THEN -- 5345171
6491: PA_DEBUG.write_log
6487: PA_DEBUG.init_err_stack('PA_ASGMT_WFSTD.mass_process_approval_result_wf');
6488:
6489: --Log Message
6490: IF l_debug_mode = 'Y' THEN -- 5345171
6491: PA_DEBUG.write_log
6492: ( x_module => 'pa.plsql.PA_ASGMT_WFSTD.mass_process_approval_result_wf.begin'
6493: ,x_msg => 'Beginning of mass_assignment_approval'
6494: ,x_log_level => 1);
6495: END IF;
6613: ,p_msg_index_out => l_msg_index_out );
6614: END IF;
6615:
6616: -- Reset the error stack when returning to the calling program
6617: PA_DEBUG.Reset_Err_Stack;
6618:
6619: -- If g_error_exists is TRUE then set the x_return_status to 'E'
6620: IF FND_MSG_PUB.Count_Msg >0 THEN
6621: x_return_status := FND_API.G_RET_STS_ERROR;
6626:
6627: -- Set the excetption Message and the stack
6628: FND_MSG_PUB.add_exc_msg
6629: ( p_pkg_name => 'PA_ASGMT_WFSTD.process_approval_result_wf'
6630: ,p_procedure_name => PA_DEBUG.G_Err_Stack );
6631:
6632: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
6633: RAISE;
6634: END process_approval_result_wf;
7361:
7362: NO_ASSIGNMENT_ERRORS EXCEPTION;
7363:
7364: l_override_basis_name VARCHAR2(80) := NULL;
7365: l_debug_mode VARCHAR2(1) := NVL(FND_PROFILE.value('PA_DEBUG_MODE'), 'N'); -- 5345171
7366:
7367:
7368: BEGIN
7369:
7367:
7368: BEGIN
7369:
7370: -- Initialize the Error Stack
7371: PA_DEBUG.init_err_stack('PA_ASGMT_WFSTD.process_submitter_notification');
7372:
7373: --Log Message
7374: IF l_debug_mode = 'Y' THEN -- 5345171
7375: PA_DEBUG.write_log
7371: PA_DEBUG.init_err_stack('PA_ASGMT_WFSTD.process_submitter_notification');
7372:
7373: --Log Message
7374: IF l_debug_mode = 'Y' THEN -- 5345171
7375: PA_DEBUG.write_log
7376: ( x_module => 'pa.plsql.PA_ASGMT_WFSTD.process_submitter_notification.begin'
7377: ,x_msg => 'Beginning of mass fyi workflow api'
7378: ,x_log_level => 1);
7379: END IF;
7753: ,p_msg_index_out => l_msg_index_out );
7754: END IF;
7755:
7756: -- Reset the error stack when returning to the calling program
7757: PA_DEBUG.Reset_Err_Stack;
7758:
7759: -- If g_error_exists is TRUE then set the x_return_status to 'E'
7760: IF FND_MSG_PUB.Count_Msg >0 THEN
7761: x_return_status := FND_API.G_RET_STS_ERROR;
7771:
7772: -- Set the excetption Message and the stack
7773: FND_MSG_PUB.add_exc_msg
7774: ( p_pkg_name => 'PA_ASGMT_WFSTD.process_submitter_notification'
7775: ,p_procedure_name => PA_DEBUG.G_Err_Stack );
7776:
7777: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR ;
7778: RAISE;
7779: END process_submitter_notification;
7794: l_approval_type VARCHAR2(10);
7795:
7796: BEGIN
7797:
7798: pa_debug.init_err_stack ('pa_asgmt_wfstd.Check_approval_type');
7799:
7800: -- Return if WF Not Running
7801: IF (funcmode <> wf_engine.eng_run) THEN
7802: resultout := wf_engine.eng_null;
7817: resultout := wf_engine.eng_completed||':'||'S';
7818:
7819: END IF;
7820:
7821: pa_debug.reset_err_stack;
7822:
7823: EXCEPTION
7824: WHEN OTHERS THEN
7825: WF_CORE.CONTEXT