First, we need to create Job Metadata so that we can execute the ESS job or schedule as and when required. Job Definition contains all required metadata to run the job. We can use JDevloper or EM Console to create job definition. In this post, we will demonstrate usin EM Console.

Right click on ESSAPP and select Job Definitions as shown below.

Click Create to proceed with creation of new ESS Job Definition.

Provide Job name and other information as shown below. We need to select Job Type as SyncWebserviceJobType as we want to call a service bus Proxy Service. Click Select Web Service to select the WSDL of service.

Provide WSDL URL and choose Web Service Type as Service Bus. Click OK.

Observe that the services listed in WSDL are shown. Select the Port Type and Operation as required which shows up the sample payload as shown below. Since we want to allow user to enter Customer ID, we have to parameterize payload using ESS_REQ token which is used to access request arguments. So in our case, we need to define an argument with name CustomerId.

Click OK and observe lot of System Properties are populated automatically as shown below.

To define argument for ESS job, click + icon in Application Defined Properties section to bring up following Popup. Given name as CustomerId and Type as String as shown below and click OK.

Now observe that a new Job Definition is created as shown below.

Submitting Job

We can manually submit ESS job or use a schedule to run it programmatically. For now, let us proceed with manual submission so right click ESSAPP and choose Submit Job Request as shown below.

Choose Job Definition by clicking search icon as shown below.

Click OK and enter value for CustomerID Job Parameter as shown below.

Click OK to submit ESS job and observe the status and log as shown below. Since it’s a simple service call, the ESS job did not take much time.

You can open log file shown above and verify the output as expected. Since it’s a sync call, we have received service response and same is logged.

To manage the submitted jobs, we can navigate to the Search Job Requests page using navigation shown below.

Here, you can search for submitted jobs using different search criteria and also can do Cancel, Hold and Resume of job depending on current status of Job.

Note: The use case considered here does not actually qualify as ESS job and not of batch job nature and used just for demonstration purpose. ESS is more suitable for batch jobs as you can schedule and run asynchronously in it’s own JVM.