Hi @jdoherty,
The step by step process of using custom procedure for database task is explained in the below link.
Hi @jdoherty,
The step by step process of using custom procedure for database task is explained in the below link.
That explains how to call a procedure from within an API. I don’t want to call it from within an API, I want to call it from outside an API,, one just created in the Oracle db in the normal way .
Hi @jdoherty ,
According to IFS standards it is not possible because in order to select a method from there you need to have a logical unit and a package (api).
https://docs.ifs.com/techdocs/foundation1/045_administration_aurena/230_bckgrnd_processing/020_database_tasks_itd/default.htm
Thanks & Best Regards,
Wimali
Thanks, that article is referring to Aurena though. I want to create the procedure in IFS EE. I assume it will not allow me to create it in EE either.
That’s OK, no prob. The only reason I don’t like calling procedures from within IFS packages is that I have to recompile the package when I add a new procedure to it and other procedures within the package are being accessed at the time of compilation and the compile gets stuck. I have to wait until everyone is out of the db. That would not occur with a standalone procedure.
Hi @jdoherty ,
Then you can create a new custom package rather than using a existing package
That’s OK, no prob. The only reason I don’t like calling procedures from within IFS packages is that I have to recompile the package when I add a new procedure to it and other procedures within the package are being accessed at the time of compilation and the compile gets stuck. I have to wait until everyone is out of the db. That would not occur with a standalone procedure.
I never thought about that advantage to Procedures (vs. Packages). Packages appear to be superior in just about every other way.
I assume that when you are developing/testing new functionality you are able to use a DEV or TEST environment -- compiling should be easier there, yes? Modularizing packages will help, too, as more packages means it is less likely that you are re-compiling code that is in-use. Finally, when you are ready to deploy the change to PROD, try it after hours or during other scheduled maintenance. That development workflow should probably be controlled in some way, regardless.
Not sure how much Package development you have done, but be sure to develop (and source control) separate files for the Package spec and body -- do not edit the spec and body directly in Oracle and compile in place. The main reason for this is that if multiple developers are working in one Package you can quickly run into data loss and versioning issues:
https://stevenfeuersteinonplsql.blogspot.com/2016/09/plsql-101-save-your-source-code-to-files.html
Good luck!
Joe Kaufman
when I add a new procedure to it and other procedures within the package are being accessed at the time of compilation and the compile gets stuck
You won’t get this issue if you remove the global variables. You will need them there so the dictionary cache gets updated and assigns your package to a module and logical unit, but the process that reads the code doesn’t mind if they’re commented out.
Lesson Learned: How to avoid ORA-04068: "existing state of packages has been discarded" | IFS Community
Creating a new package is a little bit of a pain. If you follow the example I put here, with the tweak I just mentioned, it includes all the extra steps that are necessary.
Is there a way to run Custom APIs as scheduled database tasks ? | IFS Community