DBA Data[Home] [Help]

APPS.PA_CONTROL_ITEMS_WORKFLOW dependencies on PA_CONTROL_ITEMS

Line 1: package body pa_control_items_workflow as

1: package body pa_control_items_workflow as
2: /* $Header: PACIWFPB.pls 120.7.12000000.5 2007/07/12 10:07:48 rballamu ship $ */
3: /*============================================================================+
4: | Copyright (c) 1993 Oracle Corporation Belmont, California, USA |
5: | All rights reserved. |

Line 55: pa_ci_list_v is replaced with the base table pa_control_items and

51: and canel the notification. This is called when an action is cancelled.
52: 08-Sep-05 raluthra Bug 4565156. Added code for Manual NOCOPY Changes
53: for usage of same variable for In and Out parameter.
54: 01-Feb-06 vgottimu Bug 4923945. Changed the cursor cur_ci_status_n_owner query,
55: pa_ci_list_v is replaced with the base table pa_control_items and
56: included table hz_parties to get the owner name.
57: 26-Apr-07 vvjoshi Bug#5962401:Modified set_workflow_attributes procedure to set expiration date for adhoc role.
58: 25-Jun-07 rballamu Bug#6053648:Modified change_status_approved to initialize the application context.
59: =============================================================================*/

Line 107: FROM pa_control_items

103:
104: CURSOR get_project_id
105: IS
106: SELECT project_id
107: FROM pa_control_items
108: WHERE ci_id = p_ci_id;
109: BEGIN
110:
111: OPEN get_project_id;

Line 132: pa_control_items_wf_client.start_workflow(

128: , x_item_key
129: , p_Process_Name);
130: --debug_msg ( 'after WF_ENGINE createProcess: key = ' || x_item_key);
131:
132: pa_control_items_wf_client.start_workflow(
133: p_item_type
134: , p_process_name
135: , x_item_key
136: , p_ci_id

Line 306: pa_control_items_utils.ChangeCIStatus

302: ( itemtype => itemtype,
303: itemkey => itemkey,
304: aname => 'RECORD_VERSION_NUMBER');
305:
306: pa_control_items_utils.ChangeCIStatus
307: (
308: p_validate_only=> 'F',
309: p_commit=>'T',
310:

Line 357: pa_control_items ci

353:
354: cursor c_status(p_ci_id NUMBER, p_item_type VARCHAR2) is
355: SELECT wf_failure_status_code
356: FROM pa_project_statuses ps,
357: pa_control_items ci
358: WHERE ci.ci_id = p_ci_id
359: and ci.status_code = ps.project_status_code
360: and ps.status_type = 'CONTROL_ITEM'
361: and ps.workflow_item_type = p_item_type

Line 400: pa_control_items_wf_client.set_notification_party

396:
397:
398:
399: -- set notification party based on the notification type
400: pa_control_items_wf_client.set_notification_party
401: (itemtype,
402: itemkey,
403: 'CI_REJECTED',
404: actid,

Line 416: pa_control_items_utils.ChangeCIStatus

412: fetch c_status into l_status;
413: close c_status;
414:
415: -- debug_msg_s1 ('b4 reject the ci ' || l_return_status);
416: pa_control_items_utils.ChangeCIStatus
417: (
418: p_validate_only=> 'F',
419: p_commit=>'T',
420: p_ci_id => l_ci_id,

Line 470: pa_control_items ci

466:
467: cursor c_status(p_ci_id NUMBER, p_item_type VARCHAR2) is
468: SELECT wf_success_status_code
469: FROM pa_project_statuses ps,
470: pa_control_items ci
471: WHERE ci.ci_id = p_ci_id
472: and ci.status_code = ps.project_status_code
473: and ps.status_type = 'CONTROL_ITEM'
474: and ps.workflow_item_type = p_item_type

Line 549: pa_control_items_wf_client.set_notification_party

545: -- set notification party based on the notification type
546:
547:
548:
549: pa_control_items_wf_client.set_notification_party
550: (itemtype,
551: itemkey,
552: 'CI_APPROVED',
553: actid,

Line 566: pa_control_items_utils.ChangeCIStatus

562: open c_status(l_ci_id, itemtype);
563: fetch c_status into l_status;
564: close c_status;
565:
566: pa_control_items_utils.ChangeCIStatus
567: (
568: p_validate_only=> 'F',
569: p_commit=>'T',
570: p_ci_id => l_ci_id,

Line 680: FROM pa_control_items

676: l_ret VARCHAR2(240);
677:
678: CURSOR get_status IS
679: SELECT status_code
680: FROM pa_control_items
681: WHERE ci_id = l_ci_id;
682:
683:
684: BEGIN

Line 712: pa_control_items_wf_client.set_notification_party

708:
709:
710: -- added by syao
711: -- set notification party based on the notification type
712: pa_control_items_wf_client.set_notification_party
713: (itemtype,
714: itemkey,
715: l_status,
716: actid,

Line 922: where object_Type = 'PA_CONTROL_ITEMS'

918: where
919: pprv.version_id = document_id
920: AND pprv.object_type = 'PA_PROJECTS'*/
921: select PAGE_CONTENT from PA_PAGE_CONTENTS
922: where object_Type = 'PA_CONTROL_ITEMS'
923: and pk1_value = document_id;
924:
925: l_size number;
926:

Line 1027: ,p_ci_id In pa_control_items.ci_id%TYPE

1023:
1024: PROCEDURE START_NOTIFICATION_WF
1025: ( p_item_type In VARCHAR2
1026: ,p_process_name In VARCHAR2
1027: ,p_ci_id In pa_control_items.ci_id%TYPE
1028: ,p_action_id In pa_ci_actions.ci_action_id%TYPE
1029: ,x_item_key Out NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
1030: ,x_return_status Out NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
1031: ,x_msg_count Out NOCOPY NUMBER --File.Sql.39 bug 4440895

Line 1060: CURSOR get_project_id(c_ci_id pa_control_items.ci_id%TYPE)

1056: l_module_name VARCHAR2(100) := 'pa.plsql.START_NOTIFICATION_WF';
1057: Invalid_Arg_Exc_CI Exception;
1058:
1059: --cursor to obtain the project id.
1060: CURSOR get_project_id(c_ci_id pa_control_items.ci_id%TYPE)
1061: IS
1062: SELECT project_id
1063: FROM pa_control_items
1064: WHERE ci_id = c_ci_id;

Line 1063: FROM pa_control_items

1059: --cursor to obtain the project id.
1060: CURSOR get_project_id(c_ci_id pa_control_items.ci_id%TYPE)
1061: IS
1062: SELECT project_id
1063: FROM pa_control_items
1064: WHERE ci_id = c_ci_id;
1065:
1066: BEGIN
1067: x_msg_count := 0;

Line 1136: pa_control_items_workflow.set_workflow_attributes(

1132:
1133:
1134: -- The following API will set all the required attributes for the workflow to function.
1135:
1136: pa_control_items_workflow.set_workflow_attributes(
1137: p_item_type => p_item_type
1138: ,p_process_name => p_process_name
1139: ,p_ci_id => p_ci_id
1140: ,p_action_id => p_action_id

Line 1160: pa_debug.g_err_stage:= 'returned from pa_control_items_workflow.set_workflow_attributes';

1156: RAISE Invalid_Arg_Exc_CI;
1157: END IF;
1158:
1159: IF l_debug_mode = 'Y' THEN
1160: pa_debug.g_err_stage:= 'returned from pa_control_items_workflow.set_workflow_attributes';
1161: pa_debug.write(l_module_name,pa_debug.g_err_stage,l_debug_level3);
1162: END IF;
1163:
1164:

Line 1238: ( p_pkg_name => 'PA_CONTROL_ITEMS_WORKFLOW'

1234: CLOSE get_project_id;
1235: END IF;
1236:
1237: FND_MSG_PUB.add_exc_msg
1238: ( p_pkg_name => 'PA_CONTROL_ITEMS_WORKFLOW'
1239: ,p_procedure_name => 'START_NOTIFICATION_WF'
1240: ,p_error_text => x_msg_data);
1241:
1242: IF l_debug_mode = 'Y' THEN

Line 1259: ,p_ci_id In pa_control_items.ci_id%TYPE

1255: =================================================================*/
1256: PROCEDURE set_workflow_attributes
1257: ( p_item_type In VARCHAR2
1258: ,p_process_name In VARCHAR2
1259: ,p_ci_id In pa_control_items.ci_id%TYPE
1260: ,p_action_id In pa_ci_actions.ci_action_id%TYPE
1261: ,p_item_key In NUMBER
1262: ,x_return_status Out NOCOPY VARCHAR2 --File.Sql.39 bug 4440895
1263: ,x_msg_count Out NOCOPY NUMBER --File.Sql.39 bug 4440895

Line 1292: l_owner_id pa_control_items.owner_id%TYPE;

1288: l_project_number pa_projects_all.segment1%TYPE;
1289: l_customer pa_project_lists_v.customer_name%TYPE;
1290: l_project_manager pa_project_lists_v.person_name%TYPE;
1291: l_org pa_project_lists_v.carrying_out_organization_name%TYPE;
1292: l_owner_id pa_control_items.owner_id%TYPE;
1293:
1294: l_action_number pa_ci_actions_v.ci_action_number%TYPE;
1295: l_action_request pa_ci_actions_v.comment_text%TYPE;
1296: l_action_requestor pa_ci_actions_v.create_name%TYPE;

Line 1316: l_ci_owner_id pa_control_items.owner_id%TYPE;

1312: l_priority_name pa_lookups.meaning%TYPE;
1313: l_comment_text pa_ci_comments.comment_text%TYPE;
1314: l_loop_var1 NUMBER := 1;
1315: l_record_version_number NUMBER;
1316: l_ci_owner_id pa_control_items.owner_id%TYPE;
1317: l_ci_owner_name VARCHAR2(2000);
1318: l_ci_status_code pa_control_items.status_code%TYPE;
1319: l_ci_status_name VARCHAR2(2000);
1320: l_action_type pa_ci_actions_v.action_type%TYPE;

Line 1318: l_ci_status_code pa_control_items.status_code%TYPE;

1314: l_loop_var1 NUMBER := 1;
1315: l_record_version_number NUMBER;
1316: l_ci_owner_id pa_control_items.owner_id%TYPE;
1317: l_ci_owner_name VARCHAR2(2000);
1318: l_ci_status_code pa_control_items.status_code%TYPE;
1319: l_ci_status_name VARCHAR2(2000);
1320: l_action_type pa_ci_actions_v.action_type%TYPE;
1321: l_action_type_code pa_ci_actions_v.action_type_code%TYPE;
1322: l_last_updated pa_ci_actions_v.last_update_date%TYPE;

Line 1344: FROM pa_control_items pci,

1340: pcc.class_code classification,
1341: pci.record_version_number record_version_number,
1342: pl.meaning ci_type_class,
1343: pcb.ci_type_class_code
1344: FROM pa_control_items pci,
1345: pa_ci_types_tl pct,
1346: pa_ci_types_b pcb,
1347: pa_lookups pl,
1348: pa_class_codes pcc

Line 1395: from pa_control_items pci,

1391: select pci.status_code,
1392: pps.project_status_name,
1393: pci.owner_id,
1394: hzp.party_name
1395: from pa_control_items pci,
1396: pa_project_statuses pps,
1397: hz_parties hzp
1398: where pci.ci_id = p_ci_id AND
1399: pci.status_code=pps.project_status_code AND

Line 1408: CURSOR get_notification_list(c_owner_id pa_control_items.owner_id%TYPE)

1404:
1405:
1406:
1407: --This cursor gets the users to whom the notification should be sent to.
1408: CURSOR get_notification_list(c_owner_id pa_control_items.owner_id%TYPE)
1409: IS
1410: --select user_name, party_name, email_address
1411: --from (
1412: select fu.user_name, hp.party_name, hp.email_address

Line 1446: Cursor get_comment_text(c_ci_id pa_control_items.ci_id%TYPE)

1442: lkp.lookup_type = c_lookup_type
1443: and lkp.lookup_code = c_lookup_code;
1444:
1445: --This cursor gets the change owner comment text.
1446: Cursor get_comment_text(c_ci_id pa_control_items.ci_id%TYPE)
1447: IS
1448: select comment_text
1449: from pa_ci_comments
1450: where ci_comment_id =

Line 1472: type l_table is table of pa_control_items.owner_id%TYPE index by binary_integer;

1468: and sysdate between nvl(effective_start_date,sysdate) and nvl(effective_end_date,sysdate)
1469: and rownum=1;
1470:
1471: -- This table contains PartyId's of all involved in hirarchy
1472: type l_table is table of pa_control_items.owner_id%TYPE index by binary_integer;
1473: PartyId_Tbl l_table ;
1474:
1475: -- This table checks for duplicates of PartyId's of all involved in hirarchy
1476: type l_table_dupck is table of CHAR index by binary_integer;

Line 2002: ( p_pkg_name => 'PA_CONTROL_ITEMS_WORKFLOW'

1998: CLOSE get_comment_text;
1999: END IF;
2000:
2001: FND_MSG_PUB.add_exc_msg
2002: ( p_pkg_name => 'PA_CONTROL_ITEMS_WORKFLOW'
2003: ,p_procedure_name => 'set_workflow_attributes'
2004: ,p_error_text => x_msg_data);
2005:
2006: IF l_debug_mode = 'Y' THEN

Line 2067: from pa_control_items

2063: l_item_key pa_wf_processes.item_key%TYPE;
2064:
2065: Cursor getRecordVersionNumber IS
2066: select record_version_number
2067: from pa_control_items
2068: where ci_id = l_ci_id;
2069:
2070: -- Added the cursor for bug# 3877985 Issue# 2
2071: CURSOR get_fnd_usr( p_party_id NUMBER) IS

Line 2080: PA_DEBUG.init_err_stack('PA_CONTROL_ITEMS_WORKFLOW.CLOSE_CI_ACTION');

2076: and rownum = 1;
2077:
2078: BEGIN
2079: -- Initialize the Error Stack
2080: PA_DEBUG.init_err_stack('PA_CONTROL_ITEMS_WORKFLOW.CLOSE_CI_ACTION');
2081:
2082:
2083: l_ci_id := wf_engine.GetItemAttrNumber
2084: ( itemtype => itemtype,

Line 2204: PA_CONTROL_ITEMS_PVT.UPDATE_NUMBER_OF_ACTIONS (

2200: CLOSE getRecordVersionNumber;
2201:
2202: If (l_return_status = fnd_api.g_ret_sts_success) then
2203:
2204: PA_CONTROL_ITEMS_PVT.UPDATE_NUMBER_OF_ACTIONS (
2205: p_api_version => 1.0,
2206: p_init_msg_list => fnd_api.g_true,
2207: p_commit => FND_API.g_false,
2208: p_validate_only => FND_API.g_true,

Line 2237: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_CONTROL_ITEMS_WORKFLOW',

2233: resultout := wf_engine.eng_completed||':'||'F';
2234: WHEN OTHERS THEN
2235: ROLLBACK TO CLOSE_CI_ACTION;
2236: resultout := wf_engine.eng_completed||':'||'F';
2237: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_CONTROL_ITEMS_WORKFLOW',
2238: p_procedure_name => 'CLOSE_CI_ACTIONS',
2239: p_error_text => SUBSTRB(SQLERRM,1,240));
2240: RAISE;
2241: END CLOSE_CI_ACTION;

Line 2303: from pa_control_items

2299: l_item_key pa_wf_processes.item_key%TYPE;
2300:
2301: Cursor getRecordVersionNumber IS
2302: select record_version_number
2303: from pa_control_items
2304: where ci_id = l_ci_id;
2305: BEGIN
2306: -- Initialize the Error Stack
2307: PA_DEBUG.init_err_stack('PA_CONTROL_ITEMS_WORKFLOW.KEEP_OPEN');

Line 2307: PA_DEBUG.init_err_stack('PA_CONTROL_ITEMS_WORKFLOW.KEEP_OPEN');

2303: from pa_control_items
2304: where ci_id = l_ci_id;
2305: BEGIN
2306: -- Initialize the Error Stack
2307: PA_DEBUG.init_err_stack('PA_CONTROL_ITEMS_WORKFLOW.KEEP_OPEN');
2308:
2309:
2310:
2311: l_ci_id := wf_engine.GetItemAttrNumber

Line 2411: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_CONTROL_ITEMS_WORKFLOW',

2407: resultout := wf_engine.eng_completed||':'||'F';
2408: WHEN OTHERS THEN
2409: ROLLBACK TO KEEP_OPEN;
2410: resultout := wf_engine.eng_completed||':'||'F';
2411: fnd_msg_pub.add_exc_msg(p_pkg_name => 'PA_CONTROL_ITEMS_WORKFLOW',
2412: p_procedure_name => 'KEEP_OPEN',
2413: p_error_text => SUBSTRB(SQLERRM,1,240));
2414: RAISE;
2415: END KEEP_OPEN;

Line 2538: END pa_control_items_workflow;

2534:
2535: END close_notification;
2536:
2537:
2538: END pa_control_items_workflow;
2539: