Solved

Custom Package within Schedule DB Task

  • 10 August 2020
  • 8 replies
  • 848 views

Userlevel 2
Badge +5

Hi Guys

I’ve created a Custom api (using PLSQL Developer) and trying to setup a Database Task Schedule using same. Normally, i create DB task using PLSQL developer only but this time change of approach and thought of trying Schedule DB task.

Following below process:

Created a Package and made sure it got Module_ and lu_name_ declared within header (as suggested by @durette )

Step 1: create or replace package CB_MS_LEVEL_1_API is

              module_  CONSTANT VARCHAR2(25) := 'FNDBAS';
              lu_name_ CONSTANT VARCHAR2(25) := 'CbMsLevel1Api';

Step 2: Refreshed the Dictionary Cache

Step 3: Granted access to ifssys as well as to public

            GRANT EXECUTE ON cb_ms_level_1_api TO ifssys;

Step 4: Granted access to FND_USER

             BEGIN
             security_sys.grant_package('cb_ms_level_1_api','FND_ENDUSER');
             END;

Still when re-logged into IFS and checked Task Name within New Database Task Schedule i can’t trace the api.

What am i missing, any suggestions?

 

Thanks in advance

icon

Best answer by durette 10 August 2020, 17:54

View original

8 replies

Userlevel 7
Badge +18

The LU name doesn’t need the trailing “Api”. The _API suffix on the package name is a convention that gets added later.

Examples:

LU CustomerOrder ↔ Package CUSTOMER_ORDER_API

LU CustomerInfo ↔ Package CUSTOMER_INFO_API

 

Did you log out of Enterprise Explorer and log back in?

Can you see the package in the dictionary cache? Go to System Information and Utilities → Logical Units → Logical Unit and see if you can see it there. Alternatively, you can query the cache directly:

SELECT * FROM dictionary_sys_package WHERE lu_name = 'CbMsLevel1Api';

Did you refresh the security cache? (This shouldn’t matter, but it’s worth a shot.)

Userlevel 2
Badge +5

All sorted..thanks for your help @durette :thumbsup:

Userlevel 7
Badge +30

To others; please refer to KBA : Is there a way to run Custom APIs as scheduled database tasks ? if you still didn’t find the required answer here for your specific issue.

Userlevel 5
Badge +11

To others; please refer to KBA : Is there a way to run Custom APIs as scheduled database tasks ? if you still didn’t find the required answer here for your specific issue.

Thanks @Yasas_AK, but I am not authorised to view that page?

Userlevel 7
Badge +30

Hi @GPIE Could you please check again on URL : https://community.ifs.com/technical-issues-101/is-there-a-way-to-run-custom-apis-as-scheduled-database-tasks-2868?postid=12751#post12751
and also could you please try re-login again with your account and opening the link.

If still it is not visible please let me know again and I will inform our community lead. Thank you !

Userlevel 5
Badge +11

@Yasas_AK It now works after login. I haven’t had that issue before! Thanks.

Userlevel 7
Badge +30

Hi @GPIE Great thanks for verifying. It might probably be an issue with cache where although it may appear as logged in due to cache, but not really authenticated, so needs re-authentication.

Userlevel 4
Badge +11

@durette 

Thank you Kevin.

Your idea to check for the package in the IFS IEE Logical Unit window helped me to see that my LU name was one character too long so my package name had the “i” cut off of “API”.  It appears fine in Oracle, just not in IFS IEE.  I shortened my LU name, redeployed, and everything works as expected now.  

 

 

Reply