DBA Data[Home] [Help]

APPS.IEM_RULES_ENGINE_PUB dependencies on FND_API

Line 279: IF NOT FND_API.Compatible_API_Call(

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

Line 285: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

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

Line 289: IF FND_API.to_Boolean( p_init_msg_list ) THEN

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

Line 294: x_return_status := FND_API.G_RET_STS_SUCCESS;

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

Line 335: x_result := FND_API.G_FALSE;

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

Line 391: x_result := FND_API.G_TRUE;

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

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

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

Line 424: x_result := FND_API.G_TRUE;

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

Line 465: x_result := FND_API.G_TRUE;

461: if l_action = 'MES_CATEGORY_MAPPING' then
462: l_doc_total := get_document_total(x_parameters(1).parameter1);
463: if (l_doc_total > 0 ) then
464: --exit with correct result
465: x_result := FND_API.G_TRUE;
466: exit;
467: end if;
468: elsif l_action = 'AUTOACKNOWLEDGE' then
469: if is_document_exist( x_parameters(1).parameter1,x_parameters(1).parameter2 )= FND_API.G_TRUE then

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

465: x_result := FND_API.G_TRUE;
466: exit;
467: end if;
468: elsif l_action = 'AUTOACKNOWLEDGE' then
469: 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='AUTOREPLYSPECIFIEDDOC' then

Line 470: x_result := FND_API.G_TRUE;

466: exit;
467: end if;
468: elsif l_action = 'AUTOACKNOWLEDGE' then
469: 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='AUTOREPLYSPECIFIEDDOC' then
474: FOR m IN x_parameters.FIRST..x_parameters.LAST loop

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

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

Line 482: x_result := FND_API.G_TRUE;

478: end if;
479: end loop;
480:
481: if l_doc_exist_auto_reply then
482: x_result := FND_API.G_TRUE;
483: exit;
484: end if;
485: else --NO validation on other action, so result is true, return parameters
486: x_result := FND_API.G_TRUE;

Line 486: x_result := FND_API.G_TRUE;

482: x_result := FND_API.G_TRUE;
483: exit;
484: end if;
485: else --NO validation on other action, so result is true, return parameters
486: x_result := FND_API.G_TRUE;
487: exit;
488: end if; --end if l_action = 'MES_CATEGORY_MAPPING'
489:
490: end if; --end if l_action = 'UPDSERVICEREQID'

Line 562: x_result := FND_API.G_TRUE;

558: end if;
559: y := y + 1;
560: End Loop;
561:
562: x_result := FND_API.G_TRUE;
563: exit;
564:
565: else --Action is AutoCreateSR, but TAG exists
566: if l_log_enabled then

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

575: l_service_request_id := IEM_ROUTE_PUB.get_key_value
576: ( p_keyVals_tbl=>p_keyVals_tbl,
577: p_key_name=>'IEMNBZTSRVSRID');
578:
579: if is_valid( l_service_request_id )= FND_API.G_TRUE then
580:
581: x_action := l_action;
582: --Get parameter for template_id
583: y := 1;

Line 597: x_result := FND_API.G_TRUE;

593: end if;
594: y := y + 1;
595: End Loop;
596:
597: x_result := FND_API.G_TRUE;
598: exit;
599: else
600: if l_log_enabled then
601: logMessage := '[Rule satisfied for Emailproc_id=' || l_emailproc_id || ' action='||l_action||'. But ServiceRequest ID is null. So continue eval next rule.';

Line 637: x_result := FND_API.G_TRUE;

633: if l_action = 'MES_CATEGORY_MAPPING' then
634: l_doc_total := get_document_total(x_parameters(1).parameter1);
635: if (l_doc_total > 0 ) then
636: --exit with correct result
637: x_result := FND_API.G_TRUE;
638: exit;
639: end if;
640: elsif l_action = 'AUTOACKNOWLEDGE' then
641: if is_document_exist( x_parameters(1).parameter1,x_parameters(1).parameter2 )= FND_API.G_TRUE then

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

637: x_result := FND_API.G_TRUE;
638: exit;
639: end if;
640: elsif l_action = 'AUTOACKNOWLEDGE' then
641: if is_document_exist( x_parameters(1).parameter1,x_parameters(1).parameter2 )= FND_API.G_TRUE then
642: x_result := FND_API.G_TRUE;
643: exit;
644: end if;
645: elsif l_action='AUTOREPLYSPECIFIEDDOC' then

Line 642: x_result := FND_API.G_TRUE;

638: exit;
639: end if;
640: elsif l_action = 'AUTOACKNOWLEDGE' then
641: if is_document_exist( x_parameters(1).parameter1,x_parameters(1).parameter2 )= FND_API.G_TRUE then
642: x_result := FND_API.G_TRUE;
643: exit;
644: end if;
645: elsif l_action='AUTOREPLYSPECIFIEDDOC' then
646: FOR m IN x_parameters.FIRST..x_parameters.LAST loop

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

643: exit;
644: end if;
645: elsif l_action='AUTOREPLYSPECIFIEDDOC' then
646: FOR m IN x_parameters.FIRST..x_parameters.LAST loop
647: if is_document_exist( x_parameters(m).parameter1,x_parameters(m).parameter2 )= FND_API.G_FALSE then
648: l_doc_exist_auto_reply := false;
649: exit;
650: end if;
651: end loop;

Line 654: x_result := FND_API.G_TRUE;

650: end if;
651: end loop;
652:
653: if ( l_doc_exist_auto_reply ) then
654: x_result := FND_API.G_TRUE;
655: exit;
656: end if;
657: else --NO validation on other action, so result is true, return parameters
658: x_result := FND_API.G_TRUE;

Line 658: x_result := FND_API.G_TRUE;

654: x_result := FND_API.G_TRUE;
655: exit;
656: end if;
657: else --NO validation on other action, so result is true, return parameters
658: x_result := FND_API.G_TRUE;
659: exit;
660: end if; --end if l_action = 'MES_CATEGORY_MAPPING'
661:
662:

Line 707: x_result := FND_API.G_TRUE;

703: end if;
704: y := y + 1;
705: End Loop;
706:
707: x_result := FND_API.G_TRUE;
708: exit;
709:
710: else --Action is AutoCreateSR, but TAG exists
711: if l_log_enabled then

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

719: l_service_request_id := IEM_ROUTE_PUB.get_key_value
720: ( p_keyVals_tbl=>p_keyVals_tbl,
721: p_key_name=>'IEMNBZTSRVSRID');
722:
723: if is_valid( l_service_request_id )= FND_API.G_TRUE then
724:
725: x_action := l_action;
726: --Get parameter for template_id
727: y := 1;

Line 741: x_result := FND_API.G_TRUE;

737: end if;
738: y := y + 1;
739: End Loop;
740:
741: x_result := FND_API.G_TRUE;
742: exit;
743: --Action is UpdateSR, but no valid SR_id
744: else
745: if l_log_enabled then

Line 782: x_result := FND_API.G_TRUE;

778: if l_action = 'MES_CATEGORY_MAPPING' then
779: l_doc_total := get_document_total(x_parameters(1).parameter1);
780: if (l_doc_total > 0 ) then
781: --exit with correct result
782: x_result := FND_API.G_TRUE;
783: exit;
784: end if;
785: elsif l_action = 'AUTOACKNOWLEDGE' then
786: if is_document_exist( x_parameters(1).parameter1,x_parameters(1).parameter2 )= FND_API.G_TRUE then

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

782: x_result := FND_API.G_TRUE;
783: exit;
784: end if;
785: elsif l_action = 'AUTOACKNOWLEDGE' then
786: if is_document_exist( x_parameters(1).parameter1,x_parameters(1).parameter2 )= FND_API.G_TRUE then
787: x_result := FND_API.G_TRUE;
788: exit;
789: end if;
790: elsif l_action='AUTOREPLYSPECIFIEDDOC' then

Line 787: x_result := FND_API.G_TRUE;

783: exit;
784: end if;
785: elsif l_action = 'AUTOACKNOWLEDGE' then
786: if is_document_exist( x_parameters(1).parameter1,x_parameters(1).parameter2 )= FND_API.G_TRUE then
787: x_result := FND_API.G_TRUE;
788: exit;
789: end if;
790: elsif l_action='AUTOREPLYSPECIFIEDDOC' then
791: FOR m IN x_parameters.FIRST..x_parameters.LAST loop

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

788: exit;
789: end if;
790: elsif l_action='AUTOREPLYSPECIFIEDDOC' then
791: FOR m IN x_parameters.FIRST..x_parameters.LAST loop
792: if is_document_exist( x_parameters(m).parameter1,x_parameters(m).parameter2 )= FND_API.G_FALSE then
793: l_doc_exist_auto_reply := false;
794: exit;
795: end if;
796: end loop;

Line 799: x_result := FND_API.G_TRUE;

795: end if;
796: end loop;
797:
798: if l_doc_exist_auto_reply then
799: x_result := FND_API.G_TRUE;
800: exit;
801: end if;
802: else --NO validation on other action, so result is true, return parameters
803: x_result := FND_API.G_TRUE;

Line 803: x_result := FND_API.G_TRUE;

799: x_result := FND_API.G_TRUE;
800: exit;
801: end if;
802: else --NO validation on other action, so result is true, return parameters
803: x_result := FND_API.G_TRUE;
804: exit;
805: end if; --end if l_action = 'MES_CATEGORY_MAPPING'
806:
807:

Line 818: If FND_API.To_Boolean(p_commit) then

814: --End of API--
815: --==========--
816:
817: --Standard check of p_commit
818: If FND_API.To_Boolean(p_commit) then
819: COMMIT WORK;
820: End if;
821:
822: --Standard call to get message count and if count is 1 then get message info

Line 828: x_return_status := FND_API.G_RET_STS_ERROR;

824:
825: EXCEPTION
826: when NO_DATA_FOUND THEN
827: Rollback to Auto_Process_Email_PUB;
828: x_return_status := FND_API.G_RET_STS_ERROR;
829: FND_MESSAGE.SET_NAME('IEM','IEM_NO_ACTION');
830: FND_MSG_PUB.Add;
831: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
832:

Line 840: x_return_status := FND_API.G_RET_STS_ERROR;

836: end if;
837:
838: WHEN IEM_UNKNOWN_RULE_TYPE_EXP THEN
839: Rollback to Auto_Process_Email_PUB;
840: x_return_status := FND_API.G_RET_STS_ERROR;
841: FND_MESSAGE.SET_NAME('IEM','IEM_UNKNOWN_RULE_TYPE_EXP');
842: FND_MSG_PUB.Add;
843: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
844:

Line 850: WHEN FND_API.G_EXC_ERROR THEN

846: errorMessage := '[Unknown Rule type... p_rule_type=' || p_rule_type ||']' ;
847: FND_LOG.STRING(FND_LOG.LEVEL_EXCEPTION, 'IEM.PLSQL.IEM_RULES_ENGINE_PUB.AUTO_PROCESS_EMAIL', errorMessage);
848: end if;
849:
850: WHEN FND_API.G_EXC_ERROR THEN
851: Rollback to Auto_Process_Email_PUB;
852: x_return_status := FND_API.G_RET_STS_ERROR;
853: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
854:

Line 852: x_return_status := FND_API.G_RET_STS_ERROR;

848: end if;
849:
850: WHEN FND_API.G_EXC_ERROR THEN
851: Rollback to Auto_Process_Email_PUB;
852: x_return_status := FND_API.G_RET_STS_ERROR;
853: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
854:
855: if l_exception_log then
856: errorMessage := '[' || sqlcode || sqlerrm || ']' || ' Execution Error';

Line 860: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

856: errorMessage := '[' || sqlcode || sqlerrm || ']' || ' Execution Error';
857: FND_LOG.STRING(FND_LOG.LEVEL_EXCEPTION, 'IEM.PLSQL.IEM_RULES_ENGINE_PUB.AUTO_PROCESS_EMAIL.EXEC_ERROR', errorMessage);
858: end if;
859:
860: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
861: Rollback to Auto_Process_Email_PUB;
862: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
863: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);
864:

Line 862: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

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

Line 872: x_return_status := FND_API.G_RET_STS_ERROR;

868: end if;
869:
870: WHEN OTHERS THEN
871: Rollback to Auto_Process_Email_PUB;
872: x_return_status := FND_API.G_RET_STS_ERROR;
873: IF fnd_msg_pub.Check_Msg_Level(FND_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN
874: FND_MSG_PUB.Add_Exc_Msg(G_PKG_NAME, l_api_name);
875: END IF;
876: FND_MSG_PUB.Count_And_Get(p_count => x_msg_count, p_data => x_msg_data);

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

885: function is_valid ( p_value VARCHAR2 )
886: return VARCHAR2
887: is
888: l_value varchar2(256);
889: x_result varchar2(30) := FND_API.G_FALSE;
890: begin
891: l_value := TRIM(LTRIM(p_value));
892:
893: if l_value is null then

Line 894: x_result := FND_API.G_FALSE;

890: begin
891: l_value := TRIM(LTRIM(p_value));
892:
893: if l_value is null then
894: x_result := FND_API.G_FALSE;
895: else
896: x_result := FND_API.G_TRUE;
897: end if;
898:

Line 896: x_result := FND_API.G_TRUE;

892:
893: if l_value is null then
894: x_result := FND_API.G_FALSE;
895: else
896: x_result := FND_API.G_TRUE;
897: end if;
898:
899: return x_result;
900: end;

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

960: return VARCHAR2
961: is
962: l_value varchar2(256);
963: l_total number :=0 ;
964: x_result varchar2(30) := FND_API.G_FALSE;
965: begin
966: l_value := TRIM(LTRIM(p_cat_id));
967:
968: if l_value is not null then

Line 986: x_result := FND_API.G_TRUE;

982:
983: end if;
984:
985: if ( l_total > 0 ) then
986: x_result := FND_API.G_TRUE;
987: else
988: x_result := FND_API.G_FALSE;
989: end if;
990:

Line 988: x_result := FND_API.G_FALSE;

984:
985: if ( l_total > 0 ) then
986: x_result := FND_API.G_TRUE;
987: else
988: x_result := FND_API.G_FALSE;
989: end if;
990:
991: return x_result;
992: end;