This article takes you through the basics of submitting a Enterprise Scheduler Service job request using a web service call. This may be useful for various functional requirements, such as kicking-off specific processes, run extract or import jobs, or to generating BI Publisher reports.
This is done using ESSWebservice which is deployed to all instances of the ESS app (i.e. one per product), and contains operations such as submitRequest, cancelRequest, deleteRequest, as well as others to get the details from a specific request. Ensure you have the latest Patches4FA applies, and you can find its WSDL using the following URL:
The embedded video below demonstrates the process involved in submitting a new request using the SoapUI testing tool, however this article also goes into a little more detail.
As all jobs are run by their own application, you'll first need to make sure you connect to the right host. For example with an Oracle HCM Cloud job you'll need to use a host like https://hcm-[server][pod].oracleoutsourcing.com or for a Sales Cloud job you need to use https://crm-[server][pod].oracleoutsourcing.com.
Please note that many products have multiple applications running to support the complete environment. Look at the job definition (see #2 below) itself to verify which application it uses, and hence which host to use.
Every job has a definition which can be used to get the details for your web service request. Use the Setup and Maintenance menu from the Navigator, and select the task 'Manage Custom Enterprise Scheduler Jobs For [Your Product]'. This lists out the jobs within that particular product area. Click on the edit button for the job of interest and note down the Job Application Name value.
For reference the following is the complete list.
Just like it's native scheduling functionality, the ESSWebservice originates from the middleware technology and as such has some additional security configuration requirements when compared to the product web services from Fusion Applications. There is no additional technology, just adding the following to your request payload.
SoapUI allows you to add these easily. Once you have added your user account in the "Aut" tab at the bottom of the request window, right-click on the payload and select "Add WSS Username Token". From the popup choose the default "Specify Password Text". You will see the security header added to the XML. Next click the "WS A" tab at the bottom to the request window. From the properties shown WS-A should be enabled by default, however you need to scroll down and check "Randomly generate MessageId".
Now just complete the values in the request XML. In the example below the fields to note are highlighted in yellow, and as mentioned above you can get the values by editing the job definition on the Setup and Maintenance - 'Manage Custom Enterprise Scheduler Jobs For [Your Product]' task.
The following is an example for the Address Validation job hosted by the CRM application
The response from the above submitRequest operation simply returns the Job requestId, as shown below.
This can then be used in operations such as getRequestState to verify the current status. If you need more details on the request, use the getRequestDetails operation, as shown in the video. Note the web service also supports a callback onJobCompletion operation which notifies the client when a specific request reaches a specific status, to reduce the need to repeatedly make a status call.
The following generic error may be seen when testing the web service call, and below are some actions you can take to resolve it.
User [your username] does
For more information about the ESSWebservice please review the FMW Guide to Developing Applications for ESS - Chapter 16
If you are connecting to ESS from a design-time environment, particular from a SOA composite application, then also take a look at this A-Team article.