In this post, We will use the EM Console to create ESS Job metadata to call the Service Bus proxy services however the steps remain same for calling BPEL service too.
Configuration
During domain creation, we should select the following options to create ESS Managed Server and EM Plugin for ESS. EM Plugin for ESS enable us to monitor and manage submitted ESS jobs.
You should see the EM Console as shown below on successful domain creation and starting the Admin and ESS servers. Observe that Scheduling Services is shown having ESSAPP.
If you don’t select EM plugin for ESS option during domain creation, your EM console will look like below with no Scheduling Services.
You can do ESS health check using >:>/ess">>:>/ess">>:>/ess">http://<<hostname>>:<<port>>/ess which brings up the following screen.
Click Check Health for this ESS Server which submits a sample job and give us back the status of ESS server as shown below.
You can verify status of this sample job from Search Job Requests as shown below. The navigation to this page is given later in this post.
You can find more information inn ESS documentation here.
Creating Job Definition
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.
3 Responses to “SOA 12c–Creating ESS Job metadata (EM Console)”