DBA Data[Home] [Help]

APPS.JTF_ESCWFACTIVITY_PVT dependencies on FND_API

Line 104: , fnd_api.G_FALSE

100: l_msg_count := fnd_msg_pub.count_msg;
101: IF l_msg_count > 0
102: THEN
103: l_msg := ' ' || substr(fnd_msg_pub.get( fnd_msg_pub.G_FIRST
104: , fnd_api.G_FALSE
105: ),1, 512);
106: END IF;
107:
108: FOR iIndex IN 1..(l_msg_count-1) LOOP

Line 110: ,fnd_api.G_FALSE

106: END IF;
107:
108: FOR iIndex IN 1..(l_msg_count-1) LOOP
109: l_msg := l_msg || ' ' || substr(fnd_msg_pub.get(fnd_msg_pub.G_NEXT
110: ,fnd_api.G_FALSE
111: ), 1, 512);
112: END LOOP;
113:
114: END Get_Messages_On_Stack;

Line 175: RAISE FND_API.G_EXC_ERROR;

171: -- Query Rule didn't find a record
172: -----------------------------------------------------------------------
173: debug( fnd_log.level_error, 'Get_WorkflowAttribute', 'There is no rule for the query'||g_rule_id);
174: CLOSE c_get_rule;
175: RAISE FND_API.G_EXC_ERROR;
176: END IF;
177: CLOSE C_GET_RULE;
178: IF (p_return_type = 'CODE')
179: THEN

Line 242: x_resultout := FND_API.G_Ret_Sts_Success;

238:
239: l_person_id JTF_RS_RESOURCE_EXTNS.SOURCE_ID%TYPE;
240:
241: BEGIN
242: x_resultout := FND_API.G_Ret_Sts_Success;
243:
244: -- -----------------------------------------------------------------------
245: -- Query Resources view to get the employee_id
246: -- -----------------------------------------------------------------------

Line 256: RAISE FND_API.G_EXC_ERROR;

252: -- Query Resources didn't find a record
253: -----------------------------------------------------------------------
254: debug( fnd_log.level_error, 'Get_EmployeeID', 'Employee details not found for the resource'||p_resource_id);
255: CLOSE c_query_emp;
256: RAISE FND_API.G_EXC_ERROR;
257: END IF;
258: CLOSE c_query_emp;
259: debug( fnd_log.level_statement, 'Get_EmployeeID', 'Employee id for the resource'||p_resource_id||':'||l_person_id);
260: RETURN(l_person_id);

Line 263: WHEN FND_API.G_EXC_ERROR

259: debug( fnd_log.level_statement, 'Get_EmployeeID', 'Employee id for the resource'||p_resource_id||':'||l_person_id);
260: RETURN(l_person_id);
261:
262: EXCEPTION
263: WHEN FND_API.G_EXC_ERROR
264: THEN
265: x_resultout := FND_API.G_Ret_Sts_Error;
266: debug( fnd_log.level_error, 'Get_EmployeeID'
267: , 'Error occured: Code:'|| SQLCODE || 'Error:'|| SQLERRM

Line 265: x_resultout := FND_API.G_Ret_Sts_Error;

261:
262: EXCEPTION
263: WHEN FND_API.G_EXC_ERROR
264: THEN
265: x_resultout := FND_API.G_Ret_Sts_Error;
266: debug( fnd_log.level_error, 'Get_EmployeeID'
267: , 'Error occured: Code:'|| SQLCODE || 'Error:'|| SQLERRM
268: );
269: RETURN(NULL);

Line 272: x_resultout := FND_API.G_Ret_Sts_Unexp_Error;

268: );
269: RETURN(NULL);
270: WHEN OTHERS
271: THEN
272: x_resultout := FND_API.G_Ret_Sts_Unexp_Error;
273: debug( fnd_log.level_unexpected, 'Get_EmployeeID'
274: , 'Error occured: Code:'|| SQLCODE || 'Error:'|| SQLERRM
275: );
276: RETURN(NULL);

Line 309: x_resultout := FND_API.G_RET_STS_SUCCESS;

305: l_role_display_name wf_local_roles.display_name%type;
306:
307: BEGIN
308:
309: x_resultout := FND_API.G_RET_STS_SUCCESS;
310:
311: -------------------------------------------------------------------------
312: -- Call Workflow API to get the role
313: -- If there is more than one role for this employee, the API will

Line 325: x_resultout := FND_API.G_RET_STS_ERROR;

321: );
322:
323: IF (l_wf_role IS NULL)
324: THEN
325: x_resultout := FND_API.G_RET_STS_ERROR;
326: debug( fnd_log.level_error, 'Get_EmployeeRole', 'No role found for the employee:'||p_employee_id);
327: END IF;
328: RETURN(l_wf_role);
329:

Line 331: WHEN FND_API.G_EXC_ERROR

327: END IF;
328: RETURN(l_wf_role);
329:
330: EXCEPTION
331: WHEN FND_API.G_EXC_ERROR
332: THEN
333: x_resultout := FND_API.G_Ret_Sts_Error;
334: debug( fnd_log.level_error, 'Get_EmployeeRole'
335: , 'Error occured: Code:'|| SQLCODE || 'Error:'|| SQLERRM

Line 333: x_resultout := FND_API.G_Ret_Sts_Error;

329:
330: EXCEPTION
331: WHEN FND_API.G_EXC_ERROR
332: THEN
333: x_resultout := FND_API.G_Ret_Sts_Error;
334: debug( fnd_log.level_error, 'Get_EmployeeRole'
335: , 'Error occured: Code:'|| SQLCODE || 'Error:'|| SQLERRM
336: );
337: RETURN(NULL);

Line 340: x_resultout := FND_API.G_Ret_Sts_Unexp_Error;

336: );
337: RETURN(NULL);
338: WHEN OTHERS
339: THEN
340: x_resultout := FND_API.G_Ret_Sts_Unexp_Error;
341: debug( fnd_log.level_unexpected, 'Get_EmployeeRole'
342: , 'Error occured: Code:'|| SQLCODE || 'Error:'|| SQLERRM
343: );
344: RETURN(NULL);

Line 399: RAISE FND_API.G_EXC_ERROR;

395: -- Query Resources didn't find a record
396: -------------------------------------------------------------------
397: debug( fnd_log.level_error, 'Get_RuleOwner', 'No resource found for the rule owner:'||g_rule_owner);
398: CLOSE c_query_resource;
399: RAISE FND_API.G_EXC_ERROR;
400: END IF;
401: CLOSE c_query_resource;
402: ELSE
403: l_owner_id := g_rule_owner;

Line 409: WHEN FND_API.G_EXC_ERROR

405: debug( fnd_log.level_statement, 'Get_RuleOwner', 'The returned rule owner is :'||l_owner_id);
406: RETURN(l_owner_id);
407:
408: EXCEPTION
409: WHEN FND_API.G_EXC_ERROR
410: THEN
411: x_resultout := FND_API.G_Ret_Sts_Error;
412: RETURN(NULL);
413: WHEN OTHERS

Line 411: x_resultout := FND_API.G_Ret_Sts_Error;

407:
408: EXCEPTION
409: WHEN FND_API.G_EXC_ERROR
410: THEN
411: x_resultout := FND_API.G_Ret_Sts_Error;
412: RETURN(NULL);
413: WHEN OTHERS
414: THEN
415: x_resultout := FND_API.G_Ret_Sts_Unexp_Error;

Line 415: x_resultout := FND_API.G_Ret_Sts_Unexp_Error;

411: x_resultout := FND_API.G_Ret_Sts_Error;
412: RETURN(NULL);
413: WHEN OTHERS
414: THEN
415: x_resultout := FND_API.G_Ret_Sts_Unexp_Error;
416: RETURN(NULL);
417:
418: END Get_RuleOwner;
419:

Line 486: x_resultout := FND_API.G_Ret_Sts_Success;

482: l_resource_id JTF_RS_RESOURCE_EXTNS.RESOURCE_ID%TYPE;
483: l_resultout VARCHAR2(80);
484:
485: Begin
486: x_resultout := FND_API.G_Ret_Sts_Success;
487:
488: debug( fnd_log.level_statement, l_api_name, 'Input ID type'||p_id_type);
489:
490: -------------------------------------------------------------------------

Line 502: IF (l_resultout <> FND_API.G_Ret_Sts_Success)

498: -----------------------------------------------------------------
499: l_resource_id := Get_RuleOwner( p_id_type => p_id_type
500: , x_resultout => l_resultout
501: );
502: IF (l_resultout <> FND_API.G_Ret_Sts_Success)
503: THEN
504: RAISE FND_API.G_EXC_ERROR;
505: END IF;
506:

Line 504: RAISE FND_API.G_EXC_ERROR;

500: , x_resultout => l_resultout
501: );
502: IF (l_resultout <> FND_API.G_Ret_Sts_Success)
503: THEN
504: RAISE FND_API.G_EXC_ERROR;
505: END IF;
506:
507: debug( fnd_log.level_statement, l_api_name, 'business rule owner for'||l_resource_id);
508:

Line 521: , p_init_msg_list => FND_API.G_TRUE

517: debug( fnd_log.level_statement, l_api_name, 'escalation territory exists for source doc');
518:
519: JTF_TERRITORY_GET_PUB.Get_Escalation_Territory
520: ( p_api_version => 1.0
521: , p_init_msg_list => FND_API.G_TRUE
522: , x_return_status => l_return_status
523: , x_msg_count => l_msg_count
524: , x_msg_data => l_msg_data
525: , p_terr_id => g_territory

Line 529: IF (l_return_status = FND_API.G_Ret_Sts_Success)

525: , p_terr_id => g_territory
526: , x_escalation_terr_id => l_esc_territory
527: );
528:
529: IF (l_return_status = FND_API.G_Ret_Sts_Success)
530: THEN
531: debug( fnd_log.level_statement, l_api_name, 'Getting the members for territory'||l_esc_territory);
532: JTF_TERRITORY_GET_PUB.Get_Escalation_TerrMembers
533: ( 1.0

Line 535: , p_init_msg_list => FND_API.G_TRUE

531: debug( fnd_log.level_statement, l_api_name, 'Getting the members for territory'||l_esc_territory);
532: JTF_TERRITORY_GET_PUB.Get_Escalation_TerrMembers
533: ( 1.0
534: , p_terr_id => l_esc_territory
535: , p_init_msg_list => FND_API.G_TRUE
536: , x_return_status => l_return_status
537: , x_msg_count => l_msg_count
538: , x_msg_data => l_msg_data
539: , x_QualifyingRsc_out_tbl => l_terr_resource_table

Line 542: IF (l_return_status = FND_API.G_Ret_Sts_Success)

538: , x_msg_data => l_msg_data
539: , x_QualifyingRsc_out_tbl => l_terr_resource_table
540: );
541: debug( fnd_log.level_statement, l_api_name, 'retrieving members was:'||l_return_status);
542: IF (l_return_status = FND_API.G_Ret_Sts_Success)
543: THEN
544: l_index := l_terr_resource_table.First;
545: LOOP
546: EXIT WHEN ( (l_terr_resource_table(l_index).primary_contact_flag = 'Y')

Line 560: IF (l_resultout <> FND_API.G_Ret_Sts_Success) Then

556: IF (p_id_type = 'EMPLOYEE') Then
557: l_contact_id := Get_EmployeeID( p_resource_id => l_resource_id
558: , x_resultout => l_resultout
559: );
560: IF (l_resultout <> FND_API.G_Ret_Sts_Success) Then
561: debug( fnd_log.level_error, l_api_name, 'employee id not found for'||l_resource_id);
562: RAISE FND_API.G_EXC_ERROR;
563: END IF;
564: ELSE

Line 562: RAISE FND_API.G_EXC_ERROR;

558: , x_resultout => l_resultout
559: );
560: IF (l_resultout <> FND_API.G_Ret_Sts_Success) Then
561: debug( fnd_log.level_error, l_api_name, 'employee id not found for'||l_resource_id);
562: RAISE FND_API.G_EXC_ERROR;
563: END IF;
564: ELSE
565: l_contact_id := l_resource_id;
566: END IF;

Line 575: IF (l_resultout <> FND_API.G_Ret_Sts_Success)

571: -----------------------------------------------------------------
572: l_resource_id := Get_RuleOwner( p_id_type => p_id_type
573: , x_resultout => l_resultout
574: );
575: IF (l_resultout <> FND_API.G_Ret_Sts_Success)
576: THEN
577: RAISE FND_API.G_EXC_ERROR;
578: END IF;
579:

Line 577: RAISE FND_API.G_EXC_ERROR;

573: , x_resultout => l_resultout
574: );
575: IF (l_resultout <> FND_API.G_Ret_Sts_Success)
576: THEN
577: RAISE FND_API.G_EXC_ERROR;
578: END IF;
579:
580: debug( fnd_log.level_statement, l_api_name, 'business rule owner for'||l_resource_id);
581:

Line 591: RAISE FND_API.G_EXC_ERROR;

587: -------------------------------------------------------------------
588: -- Error from Get_Escalation_TerrMembers API
589: -------------------------------------------------------------------
590: debug( fnd_log.level_error, l_api_name, 'Getting the members for territory failed');
591: RAISE FND_API.G_EXC_ERROR;
592: END IF;
593: ELSE
594: ---------------------------------------------------------------------
595: -- Error from Get_Escalation_Territory API

Line 598: RAISE FND_API.G_EXC_ERROR;

594: ---------------------------------------------------------------------
595: -- Error from Get_Escalation_Territory API
596: ---------------------------------------------------------------------
597: debug( fnd_log.level_error, l_api_name, 'Getting the escalation territory failed');
598: RAISE FND_API.G_EXC_ERROR;
599: END IF;
600: END IF;
601: RETURN(l_contact_id);
602:

Line 604: WHEN FND_API.G_EXC_ERROR

600: END IF;
601: RETURN(l_contact_id);
602:
603: EXCEPTION
604: WHEN FND_API.G_EXC_ERROR
605: THEN
606: x_resultout := FND_API.G_Ret_Sts_Error;
607: debug(fnd_log.LEVEL_statement, l_api_name, 'Error occured: Code:'|| SQLCODE || 'Error:'|| SQLERRM);
608: RETURN(NULL);

Line 606: x_resultout := FND_API.G_Ret_Sts_Error;

602:
603: EXCEPTION
604: WHEN FND_API.G_EXC_ERROR
605: THEN
606: x_resultout := FND_API.G_Ret_Sts_Error;
607: debug(fnd_log.LEVEL_statement, l_api_name, 'Error occured: Code:'|| SQLCODE || 'Error:'|| SQLERRM);
608: RETURN(NULL);
609: WHEN OTHERS
610: THEN

Line 611: x_resultout := FND_API.G_Ret_Sts_Unexp_Error;

607: debug(fnd_log.LEVEL_statement, l_api_name, 'Error occured: Code:'|| SQLCODE || 'Error:'|| SQLERRM);
608: RETURN(NULL);
609: WHEN OTHERS
610: THEN
611: x_resultout := FND_API.G_Ret_Sts_Unexp_Error;
612: debug( fnd_log.level_unexpected, l_api_name , 'Error occured: Code:'|| SQLCODE || 'Error:'|| SQLERRM);
613: RETURN(NULL);
614:
615: END Get_EscTerrContact;

Line 710: x_resultout := FND_API.G_Ret_Sts_Success;

706: l_source_id JTF_RS_RESOURCE_EXTNS.SOURCE_ID%TYPE;
707: l_resource_id JTF_RS_RESOURCE_EXTNS.RESOURCE_ID%TYPE;
708:
709: BEGIN
710: x_resultout := FND_API.G_Ret_Sts_Success;
711: x_res_type := jtf_ec_pub.g_escalation_owner_type_code;
712:
713: debug(fnd_log.level_statement, l_api_name,'input doc role'||p_document_role||' input id type'||p_id_type);
714:

Line 729: IF (l_resultout <> FND_API.G_Ret_Sts_Success)

725: -----------------------------------------------------------------------
726: l_person_id := Get_RuleOwner( p_id_type => p_id_type
727: , x_resultout => l_resultout
728: );
729: IF (l_resultout <> FND_API.G_Ret_Sts_Success)
730: THEN
731: debug(fnd_log.level_error, l_api_name, 'Retrieving Business Rule Owner Failed');
732: RAISE FND_API.G_EXC_ERROR;
733: END IF;

Line 732: RAISE FND_API.G_EXC_ERROR;

728: );
729: IF (l_resultout <> FND_API.G_Ret_Sts_Success)
730: THEN
731: debug(fnd_log.level_error, l_api_name, 'Retrieving Business Rule Owner Failed');
732: RAISE FND_API.G_EXC_ERROR;
733: END IF;
734: ELSIF ( (p_document_role = 'ESC_TERRITORY_PRIMARY')
735: OR ( (g_owner_id Is Null) AND g_owner_group_id IS NULL)
736: )

Line 746: IF (l_resultout <> FND_API.G_Ret_Sts_Success)

742: l_person_id := Get_EscTerrContact( p_id_type => p_id_type
743: , x_res_type => x_res_type
744: , x_resultout => l_resultout
745: );
746: IF (l_resultout <> FND_API.G_Ret_Sts_Success)
747: THEN
748: debug(fnd_log.level_error, l_api_name, 'Retrieving Escalation Primary Contact Failed for esc_terr_primary');
749: RAISE FND_API.G_EXC_ERROR;
750: END IF;

Line 749: RAISE FND_API.G_EXC_ERROR;

745: );
746: IF (l_resultout <> FND_API.G_Ret_Sts_Success)
747: THEN
748: debug(fnd_log.level_error, l_api_name, 'Retrieving Escalation Primary Contact Failed for esc_terr_primary');
749: RAISE FND_API.G_EXC_ERROR;
750: END IF;
751: ELSIF (p_document_role = 'DOCUMENT_OWNER')
752: THEN
753: -----------------------------------------------------------------------

Line 762: IF (l_resultout <> FND_API.G_Ret_Sts_Success)

758: l_person_id := Get_EscTerrContact( p_id_type => p_id_type
759: , x_res_type => x_res_type
760: , x_resultout => l_resultout
761: );
762: IF (l_resultout <> FND_API.G_Ret_Sts_Success)
763: THEN
764: debug(fnd_log.level_error, l_api_name, 'Retrieving Escalation Primary Contact Failed for document_owner');
765: RAISE FND_API.G_EXC_ERROR;
766: END IF;

Line 765: RAISE FND_API.G_EXC_ERROR;

761: );
762: IF (l_resultout <> FND_API.G_Ret_Sts_Success)
763: THEN
764: debug(fnd_log.level_error, l_api_name, 'Retrieving Escalation Primary Contact Failed for document_owner');
765: RAISE FND_API.G_EXC_ERROR;
766: END IF;
767: Elsif g_res_type_code = 'RS_EMPLOYEE' Then
768: ---------------------------------------------------------------------
769: -- Get the document owner

Line 777: IF (l_resultout = FND_API.G_Ret_Sts_Success)

773: THEN
774: l_source_id := Get_EmployeeID( p_resource_id => l_person_id
775: , x_resultout => l_resultout
776: );
777: IF (l_resultout = FND_API.G_Ret_Sts_Success)
778: THEN
779: l_person_id := l_source_id;
780: ELSE
781: debug(fnd_log.level_error, l_api_name ,'Retrieving DocumentOwner for Employee Resource failed for:'||l_person_id);

Line 782: RAISE FND_API.G_EXC_ERROR;

778: THEN
779: l_person_id := l_source_id;
780: ELSE
781: debug(fnd_log.level_error, l_api_name ,'Retrieving DocumentOwner for Employee Resource failed for:'||l_person_id);
782: RAISE FND_API.G_EXC_ERROR;
783: END IF;
784: END IF;
785: Else
786: ---------------------------------------------------------------------

Line 802: IF (l_resultout = FND_API.G_Ret_Sts_Success) Then

798: If p_id_type = 'EMPLOYEE' Then
799: l_source_id := Get_EmployeeID( p_resource_id => l_resource_id
800: , x_resultout => l_resultout
801: );
802: IF (l_resultout = FND_API.G_Ret_Sts_Success) Then
803: debug(fnd_log.level_statement, l_api_name, 'employee id found:'||l_source_id);
804: l_person_id := l_source_id;
805: ELSE
806: debug(fnd_log.level_error, l_api_name, 'Retrieving Employee ID for Manager failed');

Line 807: RAISE FND_API.G_EXC_ERROR;

803: debug(fnd_log.level_statement, l_api_name, 'employee id found:'||l_source_id);
804: l_person_id := l_source_id;
805: ELSE
806: debug(fnd_log.level_error, l_api_name, 'Retrieving Employee ID for Manager failed');
807: RAISE FND_API.G_EXC_ERROR;
808: END IF;
809: Else
810: l_person_id := l_resource_id;
811: End If;

Line 825: IF (l_resultout <> FND_API.G_Ret_Sts_Success)

821: l_person_id := Get_EscTerrContact( p_id_type => p_id_type
822: , x_res_type => x_res_type
823: , x_resultout => l_resultout
824: );
825: IF (l_resultout <> FND_API.G_Ret_Sts_Success)
826: THEN
827: debug(fnd_log.level_error, l_api_name, 'Escaltion Primary Contact failed for group resource');
828: --
829: -- simply assign it to the group

Line 848: IF (l_resultout <> FND_API.G_Ret_Sts_Success)

844: l_person_id := Get_EscTerrContact( p_id_type => p_id_type
845: , x_res_type => x_res_type
846: , x_resultout => l_resultout
847: );
848: IF (l_resultout <> FND_API.G_Ret_Sts_Success)
849: THEN
850: debug(fnd_log.level_error, l_api_name, 'Escaltion Primary Contact failed for DOCUMENT_OWNER_MGR');
851: RAISE FND_API.G_EXC_ERROR;
852: END IF;

Line 851: RAISE FND_API.G_EXC_ERROR;

847: );
848: IF (l_resultout <> FND_API.G_Ret_Sts_Success)
849: THEN
850: debug(fnd_log.level_error, l_api_name, 'Escaltion Primary Contact failed for DOCUMENT_OWNER_MGR');
851: RAISE FND_API.G_EXC_ERROR;
852: END IF;
853: Elsif g_res_type_code = 'RS_EMPLOYEE' Then
854: ---------------------------------------------------------------------
855: -- Query Resources view to get HR Manager

Line 866: RAISE FND_API.G_EXC_ERROR;

862: -- Query HR Manager didn't find a record
863: -------------------------------------------------------------------
864: CLOSE c_query_hr_manager;
865: debug(fnd_log.level_error, l_api_name, 'Query for HR manager failed for owner'||g_owner_id);
866: RAISE FND_API.G_EXC_ERROR;
867: END IF;
868: CLOSE c_query_hr_manager;
869: IF (p_id_type = 'RESOURCE')
870: THEN

Line 887: IF (l_resultout <> FND_API.G_Ret_Sts_Success)

883: l_person_id := Get_EscTerrContact( p_id_type => p_id_type
884: , x_res_type => x_res_type
885: , x_resultout => l_resultout
886: );
887: IF (l_resultout <> FND_API.G_Ret_Sts_Success)
888: THEN
889: debug(fnd_log.level_error, l_api_name, 'Escaltion Primary Contact failed for id type'||p_id_type);
890: RAISE FND_API.G_EXC_ERROR;
891: END IF;

Line 890: RAISE FND_API.G_EXC_ERROR;

886: );
887: IF (l_resultout <> FND_API.G_Ret_Sts_Success)
888: THEN
889: debug(fnd_log.level_error, l_api_name, 'Escaltion Primary Contact failed for id type'||p_id_type);
890: RAISE FND_API.G_EXC_ERROR;
891: END IF;
892: ELSE
893: l_person_id := l_resource_id;
894: CLOSE c_query_resource;

Line 915: IF (l_resultout <> FND_API.G_Ret_Sts_Success)

911: l_person_id := Get_EscTerrContact( p_id_type => p_id_type
912: , x_res_type => x_res_type
913: , x_resultout => l_resultout
914: );
915: IF (l_resultout <> FND_API.G_Ret_Sts_Success)
916: THEN
917: debug(fnd_log.level_error, l_api_name, 'Escaltion Primary Contact failed for group resource');
918: RAISE FND_API.G_EXC_ERROR;
919: END IF;

Line 918: RAISE FND_API.G_EXC_ERROR;

914: );
915: IF (l_resultout <> FND_API.G_Ret_Sts_Success)
916: THEN
917: debug(fnd_log.level_error, l_api_name, 'Escaltion Primary Contact failed for group resource');
918: RAISE FND_API.G_EXC_ERROR;
919: END IF;
920: Else
921: debug(fnd_log.level_statement, l_api_name, 'Employee ID found is:'||l_resource_id);
922: l_person_id := l_resource_id;

Line 932: RAISE FND_API.G_EXC_ERROR;

928: -----------------------------------------------------------------------
929: -- Unhandled value for p_document_role
930: -----------------------------------------------------------------------
931:
932: RAISE FND_API.G_EXC_ERROR;
933: END IF;
934: debug(fnd_log.level_statement, l_api_name, 'Returning the person id: '||l_person_id);
935: RETURN(l_person_id);
936:

Line 938: WHEN FND_API.G_EXC_ERROR

934: debug(fnd_log.level_statement, l_api_name, 'Returning the person id: '||l_person_id);
935: RETURN(l_person_id);
936:
937: EXCEPTION
938: WHEN FND_API.G_EXC_ERROR
939: THEN
940: x_resultout := FND_API.G_Ret_Sts_Error;
941: RETURN(NULL);
942: WHEN OTHERS

Line 940: x_resultout := FND_API.G_Ret_Sts_Error;

936:
937: EXCEPTION
938: WHEN FND_API.G_EXC_ERROR
939: THEN
940: x_resultout := FND_API.G_Ret_Sts_Error;
941: RETURN(NULL);
942: WHEN OTHERS
943: THEN
944: debug( fnd_log.level_unexpected, l_api_name, 'Error occured: Code:'|| SQLCODE || 'Error:'|| SQLERRM);

Line 945: x_resultout := FND_API.G_Ret_Sts_Unexp_Error;

941: RETURN(NULL);
942: WHEN OTHERS
943: THEN
944: debug( fnd_log.level_unexpected, l_api_name, 'Error occured: Code:'|| SQLCODE || 'Error:'|| SQLERRM);
945: x_resultout := FND_API.G_Ret_Sts_Unexp_Error;
946: RETURN(NULL);
947:
948: END Get_PersonID;
949:

Line 1037: resultout := FND_API.G_Ret_Sts_Success;

1033: l_select_name JTF_OBJECTS_VL.SELECT_NAME%TYPE;
1034: l_from_table JTF_OBJECTS_VL.FROM_TABLE%TYPE;
1035:
1036: BEGIN
1037: resultout := FND_API.G_Ret_Sts_Success;
1038: -------------------------------------------------------------------------
1039: -- Get item attribute values
1040: -------------------------------------------------------------------------
1041: g_object_id := WF_ENGINE.GetItemAttrNumber( itemtype => itemtype

Line 1089: RAISE FND_API.G_EXC_ERROR;

1085: -- Query of Defect details didn't find a record
1086: ---------------------------------------------------------------------
1087: debug( fnd_log.level_error,'Set_Globals', 'Defect Details Not Found Using:'||g_object_id);
1088: CLOSE c_object;
1089: RAISE FND_API.G_EXC_ERROR;
1090: END IF;
1091: CLOSE c_object;
1092:
1093: g_object_type_code := 'DF';

Line 1136: RAISE FND_API.G_EXC_ERROR;

1132: , 'Set_Globals'
1133: , 'Service Request Details Not Found Using:'||g_object_id);
1134:
1135: CLOSE c_object;
1136: RAISE FND_API.G_EXC_ERROR;
1137: END IF;
1138: CLOSE c_object;
1139: g_object_type_code := 'SR';
1140:

Line 1147: , p_init_msg_list => FND_API.G_TRUE

1143: -----------------------------------------------------------------------
1144: -- It's a Task object
1145: -----------------------------------------------------------------------
1146: JTF_TASKS_PUB.Query_Task( p_api_version => 1.0
1147: , p_init_msg_list => FND_API.G_TRUE
1148: , p_task_id => g_object_id
1149: , p_sort_data => l_sort_data
1150: , p_start_pointer => l_start_pointer
1151: , p_rec_wanted => l_rec_wanted

Line 1161: IF ( (l_return_status = FND_API.G_Ret_Sts_Success)

1157: , x_msg_count => l_msg_count
1158: , x_msg_data => l_msg_data
1159: , x_object_version_number => l_object_version_number
1160: );
1161: IF ( (l_return_status = FND_API.G_Ret_Sts_Success)
1162: AND (l_returned > 0)
1163: )
1164: THEN
1165: debug( fnd_log.level_statement,'Set_Globals','Task Details Found');

Line 1180: RAISE FND_API.G_EXC_ERROR;

1176: ---------------------------------------------------------------------
1177: -- Query API returned an error
1178: ---------------------------------------------------------------------
1179: debug(fnd_log.level_error,'Set_Globals','Task Details Not Found Using:'||g_object_id);
1180: RAISE FND_API.G_EXC_ERROR;
1181: END IF;
1182: ELSE
1183: -----------------------------------------------------------------------
1184: -- It's an invalid object type

Line 1187: RAISE FND_API.G_EXC_ERROR;

1183: -----------------------------------------------------------------------
1184: -- It's an invalid object type
1185: -----------------------------------------------------------------------
1186: debug(fnd_log.level_statement,'Set_Globals','Invalid Object Type'||g_object_type);
1187: RAISE FND_API.G_EXC_ERROR;
1188: END IF;
1189: -------------------------------------------------------------------------
1190: -- Get the object name from AK
1191: -------------------------------------------------------------------------

Line 1201: RAISE FND_API.G_EXC_ERROR;

1197: -- Query AK_OBJECTS didn't find a record
1198: -----------------------------------------------------------------------
1199: debug(fnd_log.level_error,'Set_Globals','Object Name from AK not found for:'||g_object_type);
1200: CLOSE c_query_ak;
1201: RAISE FND_API.G_EXC_ERROR;
1202: END IF;
1203: CLOSE c_query_ak;
1204: -------------------------------------------------------------------------
1205: -- Get the rule name, description and owner

Line 1218: RAISE FND_API.G_EXC_ERROR;

1214: -- Query rule didn't find a record
1215: -----------------------------------------------------------------------
1216: debug(fnd_log.level_error,'Set_Globals','Rule details not found for rule ID:'||g_rule_id);
1217: CLOSE c_query_rule;
1218: RAISE FND_API.G_EXC_ERROR;
1219: END IF;
1220: CLOSE c_query_rule;
1221:
1222: -------------------------------------------------------------------------

Line 1241: RAISE FND_API.G_EXC_ERROR;

1237: -- Query jtf_objects didn't find a record
1238: -----------------------------------------------------------------------
1239: debug(fnd_log.level_error,'Set_Globals', 'Details from JTF_OBJECTS not found for:'||g_object_type_code);
1240: CLOSE c_obj_details;
1241: RAISE FND_API.G_EXC_ERROR;
1242: END IF;
1243: CLOSE c_obj_details;
1244:
1245: l_query := 'SELECT ' || l_select_name ||

Line 1259: RAISE FND_API.G_EXC_ERROR;

1255: -- Query of object details didn't find a record
1256: -----------------------------------------------------------------------
1257: debug(fnd_log.level_error,'Set_Globals','Object Details not found for object name:'||g_jtf_object_name);
1258: CLOSE c_object;
1259: RAISE FND_API.G_EXC_ERROR;
1260: END IF;
1261: CLOSE c_object;
1262:
1263: debug( fnd_log.level_statement

Line 1307: WHEN FND_API.G_EXC_ERROR

1303: , avalue => g_detected_date
1304: );
1305:
1306: EXCEPTION
1307: WHEN FND_API.G_EXC_ERROR
1308: THEN
1309: resultout := FND_API.G_Ret_Sts_Error;
1310:
1311: WHEN OTHERS

Line 1309: resultout := FND_API.G_Ret_Sts_Error;

1305:
1306: EXCEPTION
1307: WHEN FND_API.G_EXC_ERROR
1308: THEN
1309: resultout := FND_API.G_Ret_Sts_Error;
1310:
1311: WHEN OTHERS
1312: THEN
1313: debug( fnd_log.level_unexpected, 'Set_Globals'

Line 1317: resultout := FND_API.G_Ret_Sts_Unexp_Error;

1313: debug( fnd_log.level_unexpected, 'Set_Globals'
1314: , 'Error occured: Code:'|| SQLCODE || 'Error:'|| SQLERRM
1315: );
1316:
1317: resultout := FND_API.G_Ret_Sts_Unexp_Error;
1318:
1319: END Set_Globals;
1320:
1321: ----------------------------------------------------------------------------

Line 1402: If (resultout = FND_API.G_Ret_Sts_Success)

1398: , actid => actid
1399: , funcmode => funcmode
1400: , resultout => resultout
1401: );
1402: If (resultout = FND_API.G_Ret_Sts_Success)
1403: THEN
1404: IF (funcmode = 'RUN')
1405: THEN
1406: ---------------------------------------------------------------------

Line 1466: IF (l_resultout = FND_API.G_Ret_Sts_Success)

1462: , p_id_type => 'RESOURCE'
1463: , x_res_type => l_resource_type
1464: , x_resultout => l_resultout
1465: );
1466: IF (l_resultout = FND_API.G_Ret_Sts_Success)
1467: THEN
1468:
1469: if c_Get_Template_id%ISOPEN
1470: then

Line 1490: , p_init_msg_list => FND_API.G_True

1486: -- Create the notification task
1487: -----------------------------------------------------------------
1488: JTF_TASKS_PUB.Create_Task_From_Template
1489: ( p_api_version => 1.0
1490: , p_init_msg_list => FND_API.G_True
1491: , p_task_template_group_id => l_template_id
1492: , p_task_template_group_name => l_template_name
1493: , p_owner_type_code => jtf_ec_pub.g_escalation_owner_type_code
1494: , p_owner_id => l_owner_id

Line 1508: IF (l_return_status = FND_API.G_Ret_Sts_Success)

1504: , x_msg_data => l_msg_data
1505: , x_task_details_tbl => l_task_details_table
1506: );
1507: debug(fnd_log.level_statement, l_api_name,'Notification Task creation was : '||l_return_status);
1508: IF (l_return_status = FND_API.G_Ret_Sts_Success)
1509: THEN
1510: l_notif_task_id := l_task_details_table(1).task_id;
1511: ---------------------------------------------------------------
1512: -- Need to query back the task to get the object version number

Line 1515: , p_init_msg_list => FND_API.G_TRUE

1511: ---------------------------------------------------------------
1512: -- Need to query back the task to get the object version number
1513: ---------------------------------------------------------------
1514: JTF_TASKS_PUB.Query_Task( p_api_version => 1.0
1515: , p_init_msg_list => FND_API.G_TRUE
1516: , p_task_id => l_notif_task_id
1517: , p_sort_data => l_sort_data
1518: , p_start_pointer => l_start_pointer
1519: , p_rec_wanted => l_rec_wanted

Line 1531: IF (l_return_status = FND_API.G_Ret_Sts_Success)

1527: , x_object_version_number => l_obj_version
1528: );
1529: l_obj_version := l_task_table(1).object_version_number;
1530:
1531: IF (l_return_status = FND_API.G_Ret_Sts_Success)
1532: THEN
1533: -------------------------------------------------------------
1534: -- Update the notification task with name and description
1535: -------------------------------------------------------------

Line 1538: , p_init_msg_list => FND_API.G_True

1534: -- Update the notification task with name and description
1535: -------------------------------------------------------------
1536: debug(fnd_log.level_statement, l_api_name,'Notification Task created with task id:'|| l_notif_task_id);
1537: JTF_TASKS_PUB.Update_Task( p_api_version => 1.0
1538: , p_init_msg_list => FND_API.G_True
1539: , p_object_version_number => l_obj_version
1540: , p_task_id => l_notif_task_id
1541: , p_task_name => g_rule_name
1542: , p_description => g_rule_desc

Line 1549: IF (l_return_status = FND_API.G_Ret_Sts_Success)

1545: , x_msg_data => l_msg_data
1546: );
1547: debug(fnd_log.level_statement, l_api_name,'Updation of the notification task completes with : '||l_return_status);
1548:
1549: IF (l_return_status = FND_API.G_Ret_Sts_Success)
1550: THEN
1551: -----------------------------------------------------------
1552: -- Task created successfully
1553: -- Create reference to source document

Line 1557: , p_init_msg_list => FND_API.G_True

1553: -- Create reference to source document
1554: -----------------------------------------------------------
1555: JTF_TASK_REFERENCES_PUB.Create_References
1556: ( p_api_version => 1.0
1557: , p_init_msg_list => FND_API.G_True
1558: , p_task_id => l_notif_task_id
1559: , p_object_type_code => g_object_type_code
1560: , p_object_name => g_jtf_object_name
1561: , p_object_id => g_object_id

Line 1569: IF (l_return_status = FND_API.G_Ret_Sts_Success)

1565: , x_msg_data => l_msg_data
1566: , x_task_reference_id => l_task_reference_id
1567: );
1568: debug(fnd_log.level_statement, l_api_name, 'Reference creation completes with : '||l_return_status);
1569: IF (l_return_status = FND_API.G_Ret_Sts_Success)
1570: THEN
1571: ---------------------------------------------------------
1572: -- Get task assignee's role from the Workflow attribute
1573: ---------------------------------------------------------

Line 1603: IF (l_resultout = FND_API.G_Ret_Sts_Success)

1599: , p_id_type => 'RESOURCE'
1600: , x_res_type => l_resource_type
1601: , x_resultout => l_resultout
1602: );
1603: IF (l_resultout = FND_API.G_Ret_Sts_Success)
1604: THEN
1605: IF (l_assign_id IS NOT NULL)
1606: THEN
1607: -----------------------------------------------------

Line 1615: , p_init_msg_list => FND_API.G_True

1611: ( name => 'JTF_TASK_DEFAULT_TASK_STATUS');
1612:
1613: JTF_TASK_ASSIGNMENTS_PUB.Create_Task_Assignment
1614: ( p_api_version => 1.0
1615: , p_init_msg_list => FND_API.G_True
1616: , p_task_id => l_notif_task_id
1617: , p_resource_type_code => l_resource_type
1618: , p_resource_id => l_assign_id
1619: , p_assignment_status_id => l_status_id

Line 1626: IF (l_return_status <> FND_API.G_Ret_Sts_Success)

1622: , x_msg_data => l_msg_data
1623: , x_task_assignment_id => l_task_assign_id
1624: );
1625: debug(fnd_log.level_statement, l_api_name, 'Assignment creation completes with : '||l_return_status);
1626: IF (l_return_status <> FND_API.G_Ret_Sts_Success)
1627: THEN
1628: ---------------------------------------------------
1629: -- Create_Task_Assignment API failed
1630: ---------------------------------------------------

Line 1631: IF (l_return_status = FND_API.G_Ret_Sts_Error)

1627: THEN
1628: ---------------------------------------------------
1629: -- Create_Task_Assignment API failed
1630: ---------------------------------------------------
1631: IF (l_return_status = FND_API.G_Ret_Sts_Error)
1632: THEN
1633: RAISE FND_API.G_EXC_ERROR;
1634: ELSE
1635: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1633: RAISE FND_API.G_EXC_ERROR;

1629: -- Create_Task_Assignment API failed
1630: ---------------------------------------------------
1631: IF (l_return_status = FND_API.G_Ret_Sts_Error)
1632: THEN
1633: RAISE FND_API.G_EXC_ERROR;
1634: ELSE
1635: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1636: END IF;
1637: END IF;

Line 1635: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1631: IF (l_return_status = FND_API.G_Ret_Sts_Error)
1632: THEN
1633: RAISE FND_API.G_EXC_ERROR;
1634: ELSE
1635: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1636: END IF;
1637: END IF;
1638: END IF;
1639: ELSE

Line 1644: IF (l_resultout = FND_API.G_Ret_Sts_Error)

1640: debug(fnd_log.level_statement, l_api_name, 'Getting Person ID failed');
1641: -------------------------------------------------------
1642: -- Get_PersonID (assign_id) failed
1643: -------------------------------------------------------
1644: IF (l_resultout = FND_API.G_Ret_Sts_Error)
1645: THEN
1646: RAISE FND_API.G_EXC_ERROR;
1647: ELSE
1648: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1646: RAISE FND_API.G_EXC_ERROR;

1642: -- Get_PersonID (assign_id) failed
1643: -------------------------------------------------------
1644: IF (l_resultout = FND_API.G_Ret_Sts_Error)
1645: THEN
1646: RAISE FND_API.G_EXC_ERROR;
1647: ELSE
1648: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1649: END IF;
1650: END IF;

Line 1648: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1644: IF (l_resultout = FND_API.G_Ret_Sts_Error)
1645: THEN
1646: RAISE FND_API.G_EXC_ERROR;
1647: ELSE
1648: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1649: END IF;
1650: END IF;
1651: ELSE
1652: ---------------------------------------------------------

Line 1656: IF (l_return_status = FND_API.G_Ret_Sts_Error)

1652: ---------------------------------------------------------
1653: -- Create_References API failed
1654: ---------------------------------------------------------
1655: debug(fnd_log.level_statement, l_api_name,'Creating Reference failed');
1656: IF (l_return_status = FND_API.G_Ret_Sts_Error)
1657: THEN
1658: RAISE FND_API.G_EXC_ERROR;
1659: ELSE
1660: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1658: RAISE FND_API.G_EXC_ERROR;

1654: ---------------------------------------------------------
1655: debug(fnd_log.level_statement, l_api_name,'Creating Reference failed');
1656: IF (l_return_status = FND_API.G_Ret_Sts_Error)
1657: THEN
1658: RAISE FND_API.G_EXC_ERROR;
1659: ELSE
1660: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1661: END IF;
1662: END IF;

Line 1660: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1656: IF (l_return_status = FND_API.G_Ret_Sts_Error)
1657: THEN
1658: RAISE FND_API.G_EXC_ERROR;
1659: ELSE
1660: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1661: END IF;
1662: END IF;
1663: ELSE
1664: -----------------------------------------------------------

Line 1668: IF (l_return_status = FND_API.G_Ret_Sts_Error)

1664: -----------------------------------------------------------
1665: -- Update_Task API failed
1666: -----------------------------------------------------------
1667: debug(fnd_log.level_statement, l_api_name,'Update Task failed');
1668: IF (l_return_status = FND_API.G_Ret_Sts_Error)
1669: THEN
1670: RAISE FND_API.G_EXC_ERROR;
1671: ELSE
1672: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1670: RAISE FND_API.G_EXC_ERROR;

1666: -----------------------------------------------------------
1667: debug(fnd_log.level_statement, l_api_name,'Update Task failed');
1668: IF (l_return_status = FND_API.G_Ret_Sts_Error)
1669: THEN
1670: RAISE FND_API.G_EXC_ERROR;
1671: ELSE
1672: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1673: END IF;
1674: END IF;

Line 1672: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1668: IF (l_return_status = FND_API.G_Ret_Sts_Error)
1669: THEN
1670: RAISE FND_API.G_EXC_ERROR;
1671: ELSE
1672: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1673: END IF;
1674: END IF;
1675: ELSE
1676: -------------------------------------------------------------

Line 1680: IF (l_return_status = FND_API.G_Ret_Sts_Error)

1676: -------------------------------------------------------------
1677: -- Query_Task API failed
1678: -------------------------------------------------------------
1679: debug(fnd_log.level_statement, l_api_name,'Query Task failed');
1680: IF (l_return_status = FND_API.G_Ret_Sts_Error)
1681: THEN
1682: RAISE FND_API.G_EXC_ERROR;
1683: ELSE
1684: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1682: RAISE FND_API.G_EXC_ERROR;

1678: -------------------------------------------------------------
1679: debug(fnd_log.level_statement, l_api_name,'Query Task failed');
1680: IF (l_return_status = FND_API.G_Ret_Sts_Error)
1681: THEN
1682: RAISE FND_API.G_EXC_ERROR;
1683: ELSE
1684: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1685: END IF;
1686: END IF;

Line 1684: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1680: IF (l_return_status = FND_API.G_Ret_Sts_Error)
1681: THEN
1682: RAISE FND_API.G_EXC_ERROR;
1683: ELSE
1684: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1685: END IF;
1686: END IF;
1687: ELSE
1688: debug(fnd_log.level_error, l_api_name,'Creating Task From Template failed');

Line 1692: IF (l_return_status = FND_API.G_Ret_Sts_Error)

1688: debug(fnd_log.level_error, l_api_name,'Creating Task From Template failed');
1689: ---------------------------------------------------------------
1690: -- Create_Task_From_Template API failed
1691: ---------------------------------------------------------------
1692: IF (l_return_status = FND_API.G_Ret_Sts_Error)
1693: THEN
1694: RAISE FND_API.G_EXC_ERROR;
1695: ELSE
1696: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1694: RAISE FND_API.G_EXC_ERROR;

1690: -- Create_Task_From_Template API failed
1691: ---------------------------------------------------------------
1692: IF (l_return_status = FND_API.G_Ret_Sts_Error)
1693: THEN
1694: RAISE FND_API.G_EXC_ERROR;
1695: ELSE
1696: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1697: END IF;
1698: END IF;

Line 1696: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1692: IF (l_return_status = FND_API.G_Ret_Sts_Error)
1693: THEN
1694: RAISE FND_API.G_EXC_ERROR;
1695: ELSE
1696: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1697: END IF;
1698: END IF;
1699: ELSE
1700: -----------------------------------------------------------------

Line 1704: IF (l_resultout = FND_API.G_Ret_Sts_Error)

1700: -----------------------------------------------------------------
1701: -- Get_PersonID (owner_id) failed
1702: -----------------------------------------------------------------
1703: debug(fnd_log.level_error, l_api_name,'Getting Person ID failed');
1704: IF (l_resultout = FND_API.G_Ret_Sts_Error)
1705: THEN
1706: RAISE FND_API.G_EXC_ERROR;
1707: ELSE
1708: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1706: RAISE FND_API.G_EXC_ERROR;

1702: -----------------------------------------------------------------
1703: debug(fnd_log.level_error, l_api_name,'Getting Person ID failed');
1704: IF (l_resultout = FND_API.G_Ret_Sts_Error)
1705: THEN
1706: RAISE FND_API.G_EXC_ERROR;
1707: ELSE
1708: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1709: END IF;
1710: END IF;

Line 1708: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1704: IF (l_resultout = FND_API.G_Ret_Sts_Error)
1705: THEN
1706: RAISE FND_API.G_EXC_ERROR;
1707: ELSE
1708: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1709: END IF;
1710: END IF;
1711: ELSE
1712: -------------------------------------------------------------------

Line 1716: RAISE FND_API.G_EXC_ERROR;

1712: -------------------------------------------------------------------
1713: -- Invalid profile value for JTF_ESC_TASK_TEMPLATE_NAME
1714: -------------------------------------------------------------------
1715: debug(fnd_log.level_error, l_api_name,'invalid profile value for JTF_ESC_TASK_TEMPLATE_NAME');
1716: RAISE FND_API.G_EXC_ERROR;
1717: END IF;
1718: ---------------------------------------------------------------------
1719: -- If we get here then it's all been successful - return 'COMPLETE'
1720: ---------------------------------------------------------------------

Line 1739: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1735: ---------------------------------------------------------------------
1736: -- Unknown function from WF - raise error
1737: ---------------------------------------------------------------------
1738: debug(fnd_log.level_error, l_api_name,'unknown function from Workflow');
1739: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1740: END IF;
1741: ELSE
1742: -----------------------------------------------------------------------
1743: -- Set_Globals failed

Line 1746: IF (resultout = FND_API.G_Ret_Sts_Error)

1742: -----------------------------------------------------------------------
1743: -- Set_Globals failed
1744: -----------------------------------------------------------------------
1745: debug(fnd_log.level_error, l_api_name,'set_globals failed with error:'||resultout);
1746: IF (resultout = FND_API.G_Ret_Sts_Error)
1747: THEN
1748: RAISE FND_API.G_EXC_ERROR;
1749: ELSE
1750: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1748: RAISE FND_API.G_EXC_ERROR;

1744: -----------------------------------------------------------------------
1745: debug(fnd_log.level_error, l_api_name,'set_globals failed with error:'||resultout);
1746: IF (resultout = FND_API.G_Ret_Sts_Error)
1747: THEN
1748: RAISE FND_API.G_EXC_ERROR;
1749: ELSE
1750: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1751: END IF;
1752: END IF;

Line 1750: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1746: IF (resultout = FND_API.G_Ret_Sts_Error)
1747: THEN
1748: RAISE FND_API.G_EXC_ERROR;
1749: ELSE
1750: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1751: END IF;
1752: END IF;
1753: debug(fnd_log.level_statement, l_api_name, 'Result Out is '||resultout);
1754:

Line 1756: WHEN FND_API.G_EXC_ERROR

1752: END IF;
1753: debug(fnd_log.level_statement, l_api_name, 'Result Out is '||resultout);
1754:
1755: EXCEPTION
1756: WHEN FND_API.G_EXC_ERROR
1757: THEN
1758: resultout := 'COMPLETE:' || g_noncritical;
1759: debug(fnd_log.level_error, l_api_name, ' The error:' || Get_Messages_On_Stack());
1760: WF_CORE.Context( pkg_name => g_pkg_name

Line 1850: IF (resultout = FND_API.G_Ret_Sts_Success)

1846: , funcmode => funcmode
1847: , resultout => resultout
1848: );
1849:
1850: IF (resultout = FND_API.G_Ret_Sts_Success)
1851: THEN
1852: IF (funcmode = 'RUN')
1853: THEN
1854: ---------------------------------------------------------------------

Line 1915: IF (l_resultout = FND_API.G_Ret_Sts_Success)

1911: ||'Owner Id is: '||l_owner_id
1912: ||'Res type'||l_resource_type
1913: );
1914:
1915: IF (l_resultout = FND_API.G_Ret_Sts_Success)
1916: THEN
1917: l_esc_rec.esc_owner_id := l_owner_id;
1918: l_esc_rec.esc_owner_type_code := NVL(l_resource_type,FND_API.G_MISS_CHAR);
1919: l_esc_rec.esc_name := g_rule_name;

Line 1918: l_esc_rec.esc_owner_type_code := NVL(l_resource_type,FND_API.G_MISS_CHAR);

1914:
1915: IF (l_resultout = FND_API.G_Ret_Sts_Success)
1916: THEN
1917: l_esc_rec.esc_owner_id := l_owner_id;
1918: l_esc_rec.esc_owner_type_code := NVL(l_resource_type,FND_API.G_MISS_CHAR);
1919: l_esc_rec.esc_name := g_rule_name;
1920: l_esc_rec.esc_description := g_rule_desc;
1921: l_esc_rec.status_id := l_esc_status;
1922: l_esc_rec.escalation_level := l_esc_level;

Line 1942: , p_init_msg_list => FND_API.G_True

1938: l_esc_contacts(1).escalation_requester_flag := 'Y';
1939:
1940: JTF_EC_PUB.Create_Escalation
1941: ( p_api_version => 1.0
1942: , p_init_msg_list => FND_API.G_True
1943: , x_return_status => l_return_status
1944: , x_msg_count => l_msg_count
1945: , x_msg_data => l_msg_data
1946: , p_user_id => l_user_id

Line 1955: IF (l_return_status <> FND_API.G_Ret_Sts_Success)

1951: , x_esc_id => l_esc_task_id
1952: , x_esc_number => l_esc_task_number
1953: , x_workflow_process_id => l_wf_process_id
1954: );
1955: IF (l_return_status <> FND_API.G_Ret_Sts_Success)
1956: THEN
1957: l_msg_count := fnd_msg_pub.count_msg;
1958: IF l_msg_count > 0
1959: THEN

Line 1961: , fnd_api.G_FALSE

1957: l_msg_count := fnd_msg_pub.count_msg;
1958: IF l_msg_count > 0
1959: THEN
1960: l_msg := ' ' || substr(fnd_msg_pub.get( fnd_msg_pub.G_FIRST
1961: , fnd_api.G_FALSE
1962: ),1, 512);
1963: END IF;
1964:
1965: FOR iIndex IN 1..(l_msg_count-1) LOOP

Line 1967: ,fnd_api.G_FALSE

1963: END IF;
1964:
1965: FOR iIndex IN 1..(l_msg_count-1) LOOP
1966: l_msg := l_msg || ' ' || substr(fnd_msg_pub.get(fnd_msg_pub.G_NEXT
1967: ,fnd_api.G_FALSE
1968: ), 1, 512);
1969:
1970: END LOOP;
1971:

Line 1975: IF (l_return_status = FND_API.G_Ret_Sts_Error)

1971:
1972: -----------------------------------------------------------------
1973: -- Create_Escalation API failed
1974: -----------------------------------------------------------------
1975: IF (l_return_status = FND_API.G_Ret_Sts_Error)
1976: THEN
1977: debug(fnd_log.level_statement, l_api_name, 'Escalation API failed because:'||l_msg||l_msg_count);
1978: ---------------------------------------------------------------
1979: -- No need to report the 'document already escalated' error

Line 1983: RAISE FND_API.G_EXC_ERROR;

1979: -- No need to report the 'document already escalated' error
1980: ---------------------------------------------------------------
1981: IF (l_msg_name <> 'JTF_TK_ESC_DOC_EXIST')
1982: THEN
1983: RAISE FND_API.G_EXC_ERROR;
1984: END IF;
1985: ELSE
1986: debug(fnd_log.level_statement, l_api_name, 'Escalation API failed with unexpected error'||l_msg||l_msg_count);
1987: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1987: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1983: RAISE FND_API.G_EXC_ERROR;
1984: END IF;
1985: ELSE
1986: debug(fnd_log.level_statement, l_api_name, 'Escalation API failed with unexpected error'||l_msg||l_msg_count);
1987: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1988: END IF;
1989: END IF;
1990: ELSE
1991: -------------------------------------------------------------------

Line 1995: IF (l_resultout = FND_API.G_Ret_Sts_Error)

1991: -------------------------------------------------------------------
1992: -- Get_PersonID failed
1993: -------------------------------------------------------------------
1994: debug(fnd_log.level_statement, l_api_name, 'Get_PersonID failed');
1995: IF (l_resultout = FND_API.G_Ret_Sts_Error)
1996: THEN
1997: RAISE FND_API.G_EXC_ERROR;
1998: ELSE
1999: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 1997: RAISE FND_API.G_EXC_ERROR;

1993: -------------------------------------------------------------------
1994: debug(fnd_log.level_statement, l_api_name, 'Get_PersonID failed');
1995: IF (l_resultout = FND_API.G_Ret_Sts_Error)
1996: THEN
1997: RAISE FND_API.G_EXC_ERROR;
1998: ELSE
1999: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2000: END IF;
2001: END IF;

Line 1999: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1995: IF (l_resultout = FND_API.G_Ret_Sts_Error)
1996: THEN
1997: RAISE FND_API.G_EXC_ERROR;
1998: ELSE
1999: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2000: END IF;
2001: END IF;
2002: ---------------------------------------------------------------------
2003: -- If we get here then it's all been successful - return 'COMPLETE'

Line 2025: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2021: ELSE
2022: ---------------------------------------------------------------------
2023: -- Unknown function from WF - raise error
2024: ---------------------------------------------------------------------
2025: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2026: END IF;
2027: ELSE
2028: -----------------------------------------------------------------------
2029: -- Set_Globals failed

Line 2032: IF (resultout = FND_API.G_Ret_Sts_Error)

2028: -----------------------------------------------------------------------
2029: -- Set_Globals failed
2030: -----------------------------------------------------------------------
2031: debug(fnd_log.level_statement, l_api_name, 'Set_Globals is not successful: '||resultout);
2032: IF (resultout = FND_API.G_Ret_Sts_Error)
2033: THEN
2034: RAISE FND_API.G_EXC_ERROR;
2035: ELSE
2036: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 2034: RAISE FND_API.G_EXC_ERROR;

2030: -----------------------------------------------------------------------
2031: debug(fnd_log.level_statement, l_api_name, 'Set_Globals is not successful: '||resultout);
2032: IF (resultout = FND_API.G_Ret_Sts_Error)
2033: THEN
2034: RAISE FND_API.G_EXC_ERROR;
2035: ELSE
2036: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2037: END IF;
2038: END IF;

Line 2036: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2032: IF (resultout = FND_API.G_Ret_Sts_Error)
2033: THEN
2034: RAISE FND_API.G_EXC_ERROR;
2035: ELSE
2036: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2037: END IF;
2038: END IF;
2039: debug(fnd_log.level_statement, l_api_name, 'Return status of the API:'||resultout);
2040: EXCEPTION

Line 2041: WHEN FND_API.G_EXC_ERROR

2037: END IF;
2038: END IF;
2039: debug(fnd_log.level_statement, l_api_name, 'Return status of the API:'||resultout);
2040: EXCEPTION
2041: WHEN FND_API.G_EXC_ERROR
2042: THEN
2043: resultout := 'COMPLETE:' || g_noncritical;
2044:
2045: debug(fnd_log.level_error, l_api_name, 'API returns with Expected Error');

Line 2112: IF (resultout = FND_API.G_Ret_Sts_Success)

2108: , actid => actid
2109: , funcmode => funcmode
2110: , resultout => resultout
2111: );
2112: IF (resultout = FND_API.G_Ret_Sts_Success)
2113: THEN
2114: IF (funcmode = 'RUN')
2115: THEN
2116: ---------------------------------------------------------------------

Line 2152: IF (l_resultout = FND_API.G_Ret_Sts_Success)

2148: , p_id_type => 'EMPLOYEE'
2149: , x_res_type => l_resource_type
2150: , x_resultout => l_resultout
2151: );
2152: IF (l_resultout = FND_API.G_Ret_Sts_Success)
2153: THEN
2154: -------------------------------------------------------------------
2155: -- Work out WF internal name for the employee
2156: -------------------------------------------------------------------

Line 2163: IF (l_resultout = FND_API.G_Ret_Sts_Success)

2159: ( p_employee_id => g_notif_person_id
2160: , x_resultout => l_resultout
2161: );
2162: debug(fnd_log.level_statement, l_api_name, 'Finding Workflow role completed with '||l_resultout);
2163: IF (l_resultout = FND_API.G_Ret_Sts_Success)
2164: THEN
2165: -----------------------------------------------------------------
2166: -- Set the WF attribute
2167: -----------------------------------------------------------------

Line 2182: IF (l_resultout = FND_API.G_Ret_Sts_Error)

2178: ELSE
2179: -----------------------------------------------------------------
2180: -- Get_EmployeeRole failed
2181: -----------------------------------------------------------------
2182: IF (l_resultout = FND_API.G_Ret_Sts_Error)
2183: THEN
2184: debug(fnd_log.level_error, l_api_name, 'Getting Employee Role Failed');
2185: RAISE FND_API.G_EXC_ERROR;
2186: ELSE

Line 2185: RAISE FND_API.G_EXC_ERROR;

2181: -----------------------------------------------------------------
2182: IF (l_resultout = FND_API.G_Ret_Sts_Error)
2183: THEN
2184: debug(fnd_log.level_error, l_api_name, 'Getting Employee Role Failed');
2185: RAISE FND_API.G_EXC_ERROR;
2186: ELSE
2187: debug(fnd_log.level_unexpected, l_api_name, 'Getting Employee Role Failed with unexpected error');
2188: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2189: END IF;

Line 2188: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2184: debug(fnd_log.level_error, l_api_name, 'Getting Employee Role Failed');
2185: RAISE FND_API.G_EXC_ERROR;
2186: ELSE
2187: debug(fnd_log.level_unexpected, l_api_name, 'Getting Employee Role Failed with unexpected error');
2188: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2189: END IF;
2190: END IF;
2191: ELSE
2192: -------------------------------------------------------------------

Line 2196: IF (l_resultout = FND_API.G_Ret_Sts_Error)

2192: -------------------------------------------------------------------
2193: -- Get_PersonId failed
2194: -------------------------------------------------------------------
2195: debug(fnd_log.level_statement, l_api_name, 'Getting Person ID failed with:'||l_resultout);
2196: IF (l_resultout = FND_API.G_Ret_Sts_Error)
2197: THEN
2198: RAISE FND_API.G_EXC_ERROR;
2199: ELSE
2200: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 2198: RAISE FND_API.G_EXC_ERROR;

2194: -------------------------------------------------------------------
2195: debug(fnd_log.level_statement, l_api_name, 'Getting Person ID failed with:'||l_resultout);
2196: IF (l_resultout = FND_API.G_Ret_Sts_Error)
2197: THEN
2198: RAISE FND_API.G_EXC_ERROR;
2199: ELSE
2200: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2201: END IF;
2202: END IF;

Line 2200: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2196: IF (l_resultout = FND_API.G_Ret_Sts_Error)
2197: THEN
2198: RAISE FND_API.G_EXC_ERROR;
2199: ELSE
2200: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2201: END IF;
2202: END IF;
2203: ELSIF (funcmode = 'CANCEL')
2204: THEN

Line 2220: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2216: ---------------------------------------------------------------------
2217: -- Unknown function from WF - raise error
2218: ---------------------------------------------------------------------
2219: debug(fnd_log.level_unexpected, l_api_name, 'Unknown WF action requested');
2220: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2221: END IF;
2222: ELSE
2223: -----------------------------------------------------------------------
2224: -- Set_Globals failed

Line 2227: IF (resultout = FND_API.G_Ret_Sts_Error)

2223: -----------------------------------------------------------------------
2224: -- Set_Globals failed
2225: -----------------------------------------------------------------------
2226: debug(fnd_log.level_unexpected, l_api_name, 'Setting Globals failed with:'||l_resultout);
2227: IF (resultout = FND_API.G_Ret_Sts_Error)
2228: THEN
2229: RAISE FND_API.G_EXC_ERROR;
2230: ELSE
2231: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

Line 2229: RAISE FND_API.G_EXC_ERROR;

2225: -----------------------------------------------------------------------
2226: debug(fnd_log.level_unexpected, l_api_name, 'Setting Globals failed with:'||l_resultout);
2227: IF (resultout = FND_API.G_Ret_Sts_Error)
2228: THEN
2229: RAISE FND_API.G_EXC_ERROR;
2230: ELSE
2231: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2232: END IF;
2233: END IF;

Line 2231: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

2227: IF (resultout = FND_API.G_Ret_Sts_Error)
2228: THEN
2229: RAISE FND_API.G_EXC_ERROR;
2230: ELSE
2231: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2232: END IF;
2233: END IF;
2234: debug(fnd_log.level_statement, l_api_name, 'Return status of the API:'||resultout);
2235:

Line 2237: WHEN FND_API.G_EXC_ERROR

2233: END IF;
2234: debug(fnd_log.level_statement, l_api_name, 'Return status of the API:'||resultout);
2235:
2236: EXCEPTION
2237: WHEN FND_API.G_EXC_ERROR
2238: THEN
2239: resultout := 'COMPLETE:' || g_noncritical;
2240: debug( fnd_log.level_error
2241: , l_api_name