DBA Data[Home] [Help]

APPS.IEM_RULES_ENGINE_PUB dependencies on FND_API

Line 281: IF NOT FND_API.Compatible_API_Call(

277: --Standard begin of API savepoint
278: SAVEPOINT Auto_Process_Email_PUB;
279:
280: -- Standard call to check for call compatibility.
281: IF NOT FND_API.Compatible_API_Call(
282: l_api_version_number,
283: p_api_version_number,
284: l_api_name,
285: G_PKG_NAME)

Line 287: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

283: p_api_version_number,
284: l_api_name,
285: G_PKG_NAME)
286: THEN
287: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
288: END IF;
289:
290: -- Initialize message list if p_init_msg_list is set to TRUE.
291: IF FND_API.to_Boolean( p_init_msg_list ) THEN

Line 291: IF FND_API.to_Boolean( p_init_msg_list ) THEN

287: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
288: END IF;
289:
290: -- Initialize message list if p_init_msg_list is set to TRUE.
291: IF FND_API.to_Boolean( p_init_msg_list ) THEN
292: FND_MSG_PUB.initialize;
293: END IF;
294:
295: -- Initialize API return status to SUCCESS

Line 296: x_return_status := FND_API.G_RET_STS_SUCCESS;

292: FND_MSG_PUB.initialize;
293: END IF;
294:
295: -- Initialize API return status to SUCCESS
296: x_return_status := FND_API.G_RET_STS_SUCCESS;
297:
298: --=================--
299: -- Begining of API --
300: --=================--

Line 337: x_result := FND_API.G_FALSE;

333: end if;
334:
335:
336: --Initialize x_result to fals
337: x_result := FND_API.G_FALSE;
338:
339: --Iniitalize the Rule data structure
340: --ruleHold.delete;
341:

Line 394: x_result := FND_API.G_TRUE;

390: end if;
391: y := y + 1;
392: End Loop;
393:
394: x_result := FND_API.G_TRUE;
395: exit;
396:
397: else --Action is AutoCreateSR, but TAG exists
398: if l_log_enabled then

Line 409: if is_valid( l_service_request_id )= FND_API.G_TRUE then

405: l_service_request_id := IEM_ROUTE_PUB.get_key_value
406: ( p_keyVals_tbl=>p_keyVals_tbl,
407: p_key_name=>'IEMNBZTSRVSRID');
408:
409: if is_valid( l_service_request_id )= FND_API.G_TRUE then
410:
411: x_action := l_action;
412: --Get parameter for template_id
413: y := 1;

Line 428: x_result := FND_API.G_TRUE;

424: end if;
425: y := y + 1;
426: End Loop;
427:
428: x_result := FND_API.G_TRUE;
429: exit;
430: --Action is UpdateSR, but no valid SR_id
431: else
432: if l_log_enabled then

Line 470: x_result := FND_API.G_TRUE;

466: if l_action = 'MES_CATEGORY_MAPPING' then
467: l_doc_total := get_document_total(x_parameters(1).parameter1);
468: if (l_doc_total > 0 ) then
469: --exit with correct result
470: x_result := FND_API.G_TRUE;
471: exit;
472: end if;
473: elsif l_action = 'AUTOACKNOWLEDGE' then
474: if is_document_exist( x_parameters(1).parameter1,x_parameters(1).parameter2 )= FND_API.G_TRUE then

Line 474: if is_document_exist( x_parameters(1).parameter1,x_parameters(1).parameter2 )= FND_API.G_TRUE then

470: x_result := FND_API.G_TRUE;
471: exit;
472: end if;
473: elsif l_action = 'AUTOACKNOWLEDGE' then
474: if is_document_exist( x_parameters(1).parameter1,x_parameters(1).parameter2 )= FND_API.G_TRUE then
475: x_result := FND_API.G_TRUE;
476: exit;
477: end if;
478: elsif l_action='AUTOREPLYSPECIFIEDDOC' then

Line 475: x_result := FND_API.G_TRUE;

471: exit;
472: end if;
473: elsif l_action = 'AUTOACKNOWLEDGE' then
474: if is_document_exist( x_parameters(1).parameter1,x_parameters(1).parameter2 )= FND_API.G_TRUE then
475: x_result := FND_API.G_TRUE;
476: exit;
477: end if;
478: elsif l_action='AUTOREPLYSPECIFIEDDOC' then
479: FOR m IN x_parameters.FIRST..x_parameters.LAST loop

Line 480: if is_document_exist( x_parameters(m).parameter1,x_parameters(m).parameter2 )= FND_API.G_FALSE then

476: exit;
477: end if;
478: elsif l_action='AUTOREPLYSPECIFIEDDOC' then
479: FOR m IN x_parameters.FIRST..x_parameters.LAST loop
480: if is_document_exist( x_parameters(m).parameter1,x_parameters(m).parameter2 )= FND_API.G_FALSE then
481: l_doc_exist_auto_reply := false;
482: exit;
483: end if;
484: end loop;

Line 487: x_result := FND_API.G_TRUE;

483: end if;
484: end loop;
485:
486: if l_doc_exist_auto_reply then
487: x_result := FND_API.G_TRUE;
488: exit;
489: end if;
490: else --NO validation on other action, so result is true, return parameters
491: x_result := FND_API.G_TRUE;

Line 491: x_result := FND_API.G_TRUE;

487: x_result := FND_API.G_TRUE;
488: exit;
489: end if;
490: else --NO validation on other action, so result is true, return parameters
491: x_result := FND_API.G_TRUE;
492: exit;
493: end if; --end if l_action = 'MES_CATEGORY_MAPPING'
494:
495: end if; --end if l_action = 'UPDSERVICEREQID'

Line 568: x_result := FND_API.G_TRUE;

564: end if;
565: y := y + 1;
566: End Loop;
567:
568: x_result := FND_API.G_TRUE;
569: exit;
570:
571: else --Action is AutoCreateSR, but TAG exists
572: if l_log_enabled then

Line 585: if is_valid( l_service_request_id )= FND_API.G_TRUE then

581: l_service_request_id := IEM_ROUTE_PUB.get_key_value
582: ( p_keyVals_tbl=>p_keyVals_tbl,
583: p_key_name=>'IEMNBZTSRVSRID');
584:
585: if is_valid( l_service_request_id )= FND_API.G_TRUE then
586:
587: x_action := l_action;
588: --Get parameter for template_id
589: y := 1;

Line 604: x_result := FND_API.G_TRUE;

600: end if;
601: y := y + 1;
602: End Loop;
603:
604: x_result := FND_API.G_TRUE;
605: exit;
606: else
607: if l_log_enabled then
608: logMessage := '[Rule satisfied for Emailproc_id=' || l_emailproc_id || ' action='||l_action||'. But ServiceRequest ID is null. So continue eval next rule.';

Line 645: x_result := FND_API.G_TRUE;

641: if l_action = 'MES_CATEGORY_MAPPING' then
642: l_doc_total := get_document_total(x_parameters(1).parameter1);
643: if (l_doc_total > 0 ) then
644: --exit with correct result
645: x_result := FND_API.G_TRUE;
646: exit;
647: end if;
648: elsif l_action = 'AUTOACKNOWLEDGE' then
649: if is_document_exist( x_parameters(1).parameter1,x_parameters(1).parameter2 )= FND_API.G_TRUE then

Line 649: if is_document_exist( x_parameters(1).parameter1,x_parameters(1).parameter2 )= FND_API.G_TRUE then

645: x_result := FND_API.G_TRUE;
646: exit;
647: end if;
648: elsif l_action = 'AUTOACKNOWLEDGE' then
649: if is_document_exist( x_parameters(1).parameter1,x_parameters(1).parameter2 )= FND_API.G_TRUE then
650: x_result := FND_API.G_TRUE;
651: exit;
652: end if;
653: elsif l_action='AUTOREPLYSPECIFIEDDOC' then

Line 650: x_result := FND_API.G_TRUE;

646: exit;
647: end if;
648: elsif l_action = 'AUTOACKNOWLEDGE' then
649: if is_document_exist( x_parameters(1).parameter1,x_parameters(1).parameter2 )= FND_API.G_TRUE then
650: x_result := FND_API.G_TRUE;
651: exit;
652: end if;
653: elsif l_action='AUTOREPLYSPECIFIEDDOC' then
654: FOR m IN x_parameters.FIRST..x_parameters.LAST loop

Line 655: if is_document_exist( x_parameters(m).parameter1,x_parameters(m).parameter2 )= FND_API.G_FALSE then

651: exit;
652: end if;
653: elsif l_action='AUTOREPLYSPECIFIEDDOC' then
654: FOR m IN x_parameters.FIRST..x_parameters.LAST loop
655: if is_document_exist( x_parameters(m).parameter1,x_parameters(m).parameter2 )= FND_API.G_FALSE then
656: l_doc_exist_auto_reply := false;
657: exit;
658: end if;
659: end loop;

Line 662: x_result := FND_API.G_TRUE;

658: end if;
659: end loop;
660:
661: if ( l_doc_exist_auto_reply ) then
662: x_result := FND_API.G_TRUE;
663: exit;
664: end if;
665: else --NO validation on other action, so result is true, return parameters
666: x_result := FND_API.G_TRUE;

Line 666: x_result := FND_API.G_TRUE;

662: x_result := FND_API.G_TRUE;
663: exit;
664: end if;
665: else --NO validation on other action, so result is true, return parameters
666: x_result := FND_API.G_TRUE;
667: exit;
668: end if; --end if l_action = 'MES_CATEGORY_MAPPING'
669:
670:

Line 716: x_result := FND_API.G_TRUE;

712: end if;
713: y := y + 1;
714: End Loop;
715:
716: x_result := FND_API.G_TRUE;
717: exit;
718:
719: else --Action is AutoCreateSR, but TAG exists
720: if l_log_enabled then

Line 732: if is_valid( l_service_request_id )= FND_API.G_TRUE then

728: l_service_request_id := IEM_ROUTE_PUB.get_key_value
729: ( p_keyVals_tbl=>p_keyVals_tbl,
730: p_key_name=>'IEMNBZTSRVSRID');
731:
732: if is_valid( l_service_request_id )= FND_API.G_TRUE then
733:
734: x_action := l_action;
735: --Get parameter for template_id
736: y := 1;

Line 751: x_result := FND_API.G_TRUE;

747: end if;
748: y := y + 1;
749: End Loop;
750:
751: x_result := FND_API.G_TRUE;
752: exit;
753: --Action is UpdateSR, but no valid SR_id
754: else
755: if l_log_enabled then

Line 793: x_result := FND_API.G_TRUE;

789: if l_action = 'MES_CATEGORY_MAPPING' then
790: l_doc_total := get_document_total(x_parameters(1).parameter1);
791: if (l_doc_total > 0 ) then
792: --exit with correct result
793: x_result := FND_API.G_TRUE;
794: exit;
795: end if;
796: elsif l_action = 'AUTOACKNOWLEDGE' then
797: if is_document_exist( x_parameters(1).parameter1,x_parameters(1).parameter2 )= FND_API.G_TRUE then

Line 797: if is_document_exist( x_parameters(1).parameter1,x_parameters(1).parameter2 )= FND_API.G_TRUE then

793: x_result := FND_API.G_TRUE;
794: exit;
795: end if;
796: elsif l_action = 'AUTOACKNOWLEDGE' then
797: if is_document_exist( x_parameters(1).parameter1,x_parameters(1).parameter2 )= FND_API.G_TRUE then
798: x_result := FND_API.G_TRUE;
799: exit;
800: end if;
801: elsif l_action='AUTOREPLYSPECIFIEDDOC' then

Line 798: x_result := FND_API.G_TRUE;

794: exit;
795: end if;
796: elsif l_action = 'AUTOACKNOWLEDGE' then
797: if is_document_exist( x_parameters(1).parameter1,x_parameters(1).parameter2 )= FND_API.G_TRUE then
798: x_result := FND_API.G_TRUE;
799: exit;
800: end if;
801: elsif l_action='AUTOREPLYSPECIFIEDDOC' then
802: FOR m IN x_parameters.FIRST..x_parameters.LAST loop

Line 803: if is_document_exist( x_parameters(m).parameter1,x_parameters(m).parameter2 )= FND_API.G_FALSE then

799: exit;
800: end if;
801: elsif l_action='AUTOREPLYSPECIFIEDDOC' then
802: FOR m IN x_parameters.FIRST..x_parameters.LAST loop
803: if is_document_exist( x_parameters(m).parameter1,x_parameters(m).parameter2 )= FND_API.G_FALSE then
804: l_doc_exist_auto_reply := false;
805: exit;
806: end if;
807: end loop;

Line 810: x_result := FND_API.G_TRUE;

806: end if;
807: end loop;
808:
809: if l_doc_exist_auto_reply then
810: x_result := FND_API.G_TRUE;
811: exit;
812: end if;
813: else --NO validation on other action, so result is true, return parameters
814: x_result := FND_API.G_TRUE;

Line 814: x_result := FND_API.G_TRUE;

810: x_result := FND_API.G_TRUE;
811: exit;
812: end if;
813: else --NO validation on other action, so result is true, return parameters
814: x_result := FND_API.G_TRUE;
815: exit;
816: end if; --end if l_action = 'MES_CATEGORY_MAPPING'
817:
818:

Line 829: If FND_API.To_Boolean(p_commit) then

825: --End of API--
826: --==========--
827:
828: --Standard check of p_commit
829: If FND_API.To_Boolean(p_commit) then
830: COMMIT WORK;
831: End if;
832:
833: --Standard call to get message count and if count is 1 then get message info

Line 839: x_return_status := FND_API.G_RET_STS_ERROR;

835:
836: EXCEPTION
837: when NO_DATA_FOUND THEN
838: Rollback to Auto_Process_Email_PUB;
839: x_return_status := FND_API.G_RET_STS_ERROR;
840: FND_MESSAGE.SET_NAME('IEM','IEM_NO_ACTION');
841: FND_MSG_PUB.Add;
842: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
843:

Line 851: x_return_status := FND_API.G_RET_STS_ERROR;

847: end if;
848:
849: WHEN IEM_UNKNOWN_RULE_TYPE_EXP THEN
850: Rollback to Auto_Process_Email_PUB;
851: x_return_status := FND_API.G_RET_STS_ERROR;
852: FND_MESSAGE.SET_NAME('IEM','IEM_UNKNOWN_RULE_TYPE_EXP');
853: FND_MSG_PUB.Add;
854: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
855:

Line 861: WHEN FND_API.G_EXC_ERROR THEN

857: errorMessage := '[Unknown Rule type... p_rule_type=' || p_rule_type ||']' ;
858: FND_LOG.STRING(FND_LOG.LEVEL_EXCEPTION, 'IEM.PLSQL.IEM_RULES_ENGINE_PUB.AUTO_PROCESS_EMAIL', errorMessage);
859: end if;
860:
861: WHEN FND_API.G_EXC_ERROR THEN
862: Rollback to Auto_Process_Email_PUB;
863: x_return_status := FND_API.G_RET_STS_ERROR;
864: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
865:

Line 863: x_return_status := FND_API.G_RET_STS_ERROR;

859: end if;
860:
861: WHEN FND_API.G_EXC_ERROR THEN
862: Rollback to Auto_Process_Email_PUB;
863: x_return_status := FND_API.G_RET_STS_ERROR;
864: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
865:
866: if l_exception_log then
867: errorMessage := '[' || sqlcode || sqlerrm || ']' || ' Execution Error';

Line 871: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

867: errorMessage := '[' || sqlcode || sqlerrm || ']' || ' Execution Error';
868: FND_LOG.STRING(FND_LOG.LEVEL_EXCEPTION, 'IEM.PLSQL.IEM_RULES_ENGINE_PUB.AUTO_PROCESS_EMAIL.EXEC_ERROR', errorMessage);
869: end if;
870:
871: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
872: Rollback to Auto_Process_Email_PUB;
873: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
874: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
875:

Line 873: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

869: end if;
870:
871: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
872: Rollback to Auto_Process_Email_PUB;
873: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
874: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
875:
876: if l_exception_log then
877: errorMessage := '[' || sqlcode || sqlerrm || ']' || ' Unexpected Execution Error';

Line 883: x_return_status := FND_API.G_RET_STS_ERROR;

879: end if;
880:
881: WHEN OTHERS THEN
882: Rollback to Auto_Process_Email_PUB;
883: x_return_status := FND_API.G_RET_STS_ERROR;
884: IF fnd_msg_pub.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
885: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
886: END IF;
887: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);

Line 900: x_result varchar2(30) := FND_API.G_FALSE;

896: function is_valid ( p_value VARCHAR2 )
897: return VARCHAR2
898: is
899: l_value varchar2(256);
900: x_result varchar2(30) := FND_API.G_FALSE;
901: begin
902: l_value := TRIM(LTRIM(p_value));
903:
904: if l_value is null then

Line 905: x_result := FND_API.G_FALSE;

901: begin
902: l_value := TRIM(LTRIM(p_value));
903:
904: if l_value is null then
905: x_result := FND_API.G_FALSE;
906: else
907: x_result := FND_API.G_TRUE;
908: end if;
909:

Line 907: x_result := FND_API.G_TRUE;

903:
904: if l_value is null then
905: x_result := FND_API.G_FALSE;
906: else
907: x_result := FND_API.G_TRUE;
908: end if;
909:
910: return x_result;
911: end;

Line 975: x_result varchar2(30) := FND_API.G_FALSE;

971: return VARCHAR2
972: is
973: l_value varchar2(256);
974: l_total number :=0 ;
975: x_result varchar2(30) := FND_API.G_FALSE;
976: begin
977: l_value := TRIM(LTRIM(p_cat_id));
978:
979: if l_value is not null then

Line 997: x_result := FND_API.G_TRUE;

993:
994: end if;
995:
996: if ( l_total > 0 ) then
997: x_result := FND_API.G_TRUE;
998: else
999: x_result := FND_API.G_FALSE;
1000: end if;
1001:

Line 999: x_result := FND_API.G_FALSE;

995:
996: if ( l_total > 0 ) then
997: x_result := FND_API.G_TRUE;
998: else
999: x_result := FND_API.G_FALSE;
1000: end if;
1001:
1002: return x_result;
1003: end;