Introduction
Concurrent programs are commonly used within Oracle E-Business Suite as a mechanism to run an executable. Concurrent programs allow users to pass parameters to the executable, which enables it to behave in different ways. We are going to go through some recipes configuring and running concurrent programs. We are also going to show how you can view and write to log files and output files to record what is happening whilst the program is running. Before we get into that, there is a bit of important background knowledge that needs to be highlighted.
Firstly, in release 12, there are additional options when defining a concurrent program to integrate with business events. You can now raise an event at various points throughout the concurrent program lifecycle. This is an extremely useful feature for extending e-Business Suite. For example, developers can subscribe to events and from the event we can launch workflows, send messages to an advanced queue, or launch PL/SQL procedures.
There are some basic concepts that need to be explained before we get into creating concurrent programs and such like. In Oracle EBS, there are users defined on the system and that's how we gain access to the application. There are some pre-configured users such as sysadmin and we can also create our own users each time we want to provide access to someone else on the system. Users are assigned one or more responsibilities and these determine the access we have to the system in terms of the forms we can go into, the programs we can run, and the data we can see. A responsibility will have a menu associated with it which will define the forms that can be accessed. It will also have a request group associated with it which will determine which concurrent programs the responsibility can execute. This is a very basic overview and you are probably already familiar with these concepts. However, if you want to understand more then I suggest you do some more reading of the System Administration guides from the Oracle Release 12 Documentation Library portal available on the Internet.
A few other important points to note are as follows:
The responsibility that you will need to configure nearly everything relating to a concurrent program is Application Developer. The only thing you cannot do with this responsibility is give access to users. For this you will need to use the System Administrator responsibility. (Assign these responsibilities to your user if you do not have them already.)
You can launch concurrent programs through an online request, for it to be scheduled automatically or to be triggered programmatically by using Oracle's built-in APIs.
Concurrent programs can also be configured so that they can be made incompatible with other concurrent programs meaning that they cannot run simultaneously.
You can also group concurrent programs together and form a request set. This feature is useful if you need to create concurrent programs that are linked in some way but need to be run in a certain manner.
Concurrent programs can also be scheduled to run on a certain date or to be run on an ongoing basis indefinitely.
We are now ready to get started and in this chapter we will create a concurrent program that launches a PL/SQL procedure. We will look at the parameters that are used internally and we will also add our own parameters using value sets and a dependent value set. In addition, we will write to the log and output files to show runtime information used for logging and reporting. We will schedule the concurrent programs to run automatically at specified time intervals and will look at creating multiple concurrent programs and run them together as a request set. At the end of the chapter we will look at creating a different type of concurrent program.