The Enterprise Scheduler Service that is available in Fusion Middleware 12.1.3 supports a number of administration activities around the SOA Suite. We will look at one particular use case regarding environment management using the ESS. Suppose we have an inbound database adapter. Suppose we have created the PortalSlotRequestProcessor SOA composite that uses a database poller looking for new records in a certain table PORTAL_SLOT_ALLOCATIONS (this example comes from the Oracle SOA Suite 12c Handbook, Oracle Press). The polling frequency was set to once every 20 seconds. And that polling goes on and on for as long as the SOA composite remains deployed and active.
Imagine the situation where every day during a certain period, there is a substantial load on the SOA Suite, and we would prefer to reduce the resource usage from non-crucial processes. Further suppose that the slot allocation requests arriving from the portal are considered not urgent, for example because the business service level agreed with our account managers is that these requests have to be processed within 24 hours – rather than once every 20 seconds. We do not want to create a big batch, and whenever we can, we strive to implement straight through processing. But between 1 and 2 AM on every day, we would like to pause the inbound database adapter.
In this section, we will use the Enterprise Scheduler Service to achieve this. We will create the schedules that trigger at 1 AM every day, used for deactivating the adapter, and 2 AM, used for activating the adapter. In fact, in order to make testing more fun, we will use schedules that trigger at 10 past the hour and 30 past the hour. These schedules are then associated in the Enterprise Manager Fusion Middleware Control with the inbound database adapter binding PortalSlotRequestPoller.
An ESS Schedule is used to describe either one or a series of moments in time. A schedule can be associated with one or many Job definitions to come to describe when those jobs should be executed. A recurring schedule has a frequency that describes how the moments in time are distributed over time. A recurring schedule can have a start time and an end time to specify the period during which the recurrence should take place.
To create the schedules that will govern the inbound database adapter, open the EM FMW Control and select the node Scheduling Services | ESSAPP. From the dropdown list at the top of the page, select Job Requests | Define Schedules, as is shown in this figur
Click on the icon to create a new schedule. Specify the name of the schedule as At10minPastTheHour. Set the display name to “10 minutes past each hour”. The schedule has to be created in the package [/oracle/apps/ess/custom/]soa. This is a requirement for schedules used for adapter activation.
Select the frequency as Hourly/Minute, Every 1 Hour(s) 0 Minute(s) and the start date as any date not too far in the future (or even in the past) with a time set to 10 minutes past any hour.
Note that using the button Customize Times, we can have a long list of moments in time generated and subsequently manually modify them if we have a need for some exceptions to the pattern.
Click on OK to save this schedule.
Create a second schedule called At30minPastTheHour. The definition is very similar to the previous one, except for the start time that should 30 minutes past some hour.
Click OK to save this schedule definition.
Note that more sophisticated recurrence schedules can be created through the Java API exposed by ESS as well as through the IDE support in JDeveloper. These options that allow specific week days or months to be included or excluded can currently not set set through the EM FMW Control.
Apply Schedules for Activation and Deactivation of Inbound Database Adapter
Select node SOA | soa-infra | default | PortalSlotRequestProcessor – the composite we created in the previous chapter. Under Services and References, click on the PortalSlotRequestPoller, the inbound database adapter binding.
The PortalSlotRequestProcessor appears. Click on the icon for adapter schedules.
In the Adapter Schedules popup that appears, we can select the schedule that is to be used for deactivating and for activating the adapter binding. Use the At10minPastTheHour schedule for deactivation and At30minPastTheHour for activation. Press Apply Schedules to confirm the new configuration.
From this moment on, the inbound database adapter binding that polls table PORTAL_SLOT_ALLOCATIONS is active only for 40 minutes during every hour, starting at 30 minutes past the hour.
For example, at 22:14, the binding is clearly not active.
Test switching off and on of Database Adapter binding
When the schedules for activation and deactivation have been applied, they are immediately in effect. You can test this in the Dashboard page for the inbound database adapter binding, as is shown here
Here we see how a single record was processed by the adapter binding, insert at 10:09PM. Four more records were inserted into table PORTAL_SLOT_ALLOCATIONS at 10:13 and 10:14. However, because the adapter binding is currently not active, so these records have not yet been processed.
At 30 minutes past the hour – 10:30 in this case – the adapter becomes active again and starts processing the records it will then find in the table. Because the adapter was configured to pass just a single record to a SOA composite and not process more than two records in a single transaction, it will take two polling cycles to process the four records that were inserted between 10:10 and 10:30. These figures illustrate this.
The SOA composite instances that are created for these four records retrieved in two poll cycles:
and the flow trace for the instance at 10:30:09 looks like this – processing two separate database records:
When you check in the ESS UI in EM FMW Control, you will find two new Job Definitions, generic Jobs for executing SOA Suite management stuff:
In the Job Requests overview, instances of these jobs appear, every hour one of each. And the details of these job requests specify which adapter binding in which composite is the target of the SOA administrative action performed by the job.
13 thoughts on “SOA Suite 12c: Using Enterprise Scheduler Service to schedule deactivation and activation of inbound adapter bindings”
I am planning to create a java class and schedule it as ESS Job.
Do you have any sample or steps to do it?
Hi Lucas Jellema,
It was an nice post.Thanks for sharing it.I have an query.Is this feature (Actiation and deactivation of DBPoller) available for OSB projects.If so,please help me to create the schedules for the same.
That is a good question. Unfortunately, I do not have an answer for your right away. I will see if I can find out.
Great post. I have a question. I started looking at ESS at a possible replacement for other scheduling tools around in our organization. One of them being uc4 scheduler. Use cases for using the scheduler today is mostly to run batch jobs, SQL code, simple custom scripts and work flows are designed based on completion of previous jobs using uc4. Can ESS work outside Fusion Middleware as a standalone app to work as a scheduler? For eg, if I have to run some batch script once a day, can I schedule it via ESS without going through writing a SOA application using JDeveloper?
We cannot use the ESS to Schedule outside Fusion Middleware without writing a SOA application using JDeveloper as it is automatically installed with the SOA App of 18.104.22.168 version and the ESSAPP directly interacts with the adapter to communicate and to handles the functionality of the adapter for the particular timeframe being scheduled.
Do you now is feasible to establish frecuency of Request Job less than 1 minute?, i need to set it to 30 seconds.
Thanks for such a great post. Unfortunately I dont see scheduler option for my hello world process which is a simple WSDL based SYNC process. Here in my case, I have both SOA and ESS installed on same domain.
do we have to do additional setup for this demo ?
Sorry my mistake.. look like this option is only applicable for DB poller service.. I can see this now.
Cool feature but i have a few questions:
Where this schedule definition and the last execution is stored?
How this feature behaviour at a high frequency?
How this works with HA?
The data is stored in the SOA Infra schema in the internal database tables for the SOA Suite. Regarding the high volume and H/A questions I can only suggest you give it a try. I have no special information to share about these areas – except to say that it is not really any different from the behavior you will get with for example inbound file, JMS or database adapters.
Understood, we have a scenario that we will need to schedule a artifact(inbound dbAdapter or Scheduler with select outbound dbadapter) each 1 sec, I’m trying to look at the better approach to implement this solution. But I will do some tests with HA high frequency scheduled jobs and post it here.
I wanted to know if you have to schedule a web service between time frame how we will do that?
Let’s suppose i want to schedule a web service for every 10 minute between 7 am and 10 pm how i will do that? It is not a polling service.
I tried to check the incompatibility option as well but it is not helpful.
Can you please guide on strategy to design the scheduler.
I am getting below exception while testing Scheduler service in SOA 12c.
oracle.as.scheduler.RuntimeServiceException: ESS-01000 Failed to open runtime service. oracle.as.scheduler.runtime.RuntimeStoreCompatibilityException: ESS-01173 Runtime store status check failed; runtime store status: INVALID, schema name: BPM12C_ESS
ESS-01099 An error occurred invoking the RuntimeService MBean. oracle.jrf.PortabilityLayerException: oracle.as.scheduler.RuntimeServiceException: ESS-01000 Failed to open runtime service. oracle.as.scheduler.runtime.RuntimeStoreCompatibilityException: ESS-01173 Runtime store status check failed; runtime store status: INVALID, schema name: BPM12C_ESS.
Kindly help on this issue…
Comments are closed.