Submitting an ESS Job Request from BPEL in SOA 12c

Introduction

SOA Suite 12c added a new component: Oracle Enterprise Scheduler Service (ESS). ESS provides the ability to run different job types distributed across the nodes in an Oracle WebLogic Server cluster. Oracle Enterprise Scheduler runs these jobs securely, with high availability and scalability, with load balancing and provides monitoring and management through Fusion Middleware Control. ESS was available as part of the Fusion Applications product offering. Now it is available in SOA Suite 12c. In this blog, I will demonstrate how to use a new Oracle extension, “Schedule Job”, in JDeveloper 12c to submit an ESS job request from a BPEL process.

 

Set up a scheduled job in Enterprise Scheduler Service

1. Create a SOA composite with a simple synchronous BPEL process, HelloWorld.
2. Deploy HelloWorld to Weblogic.
3. Logon to Fusion Middleware Enterprise Manager.
4. Go to Scheduling Services -> ESSAPP -> Job Metadata -> Job Definitions. This takes you to the Job Definitions page.

2

 

5. Click the “Create” button, this takes you to Create Job Definition page. Enter:

Name: HelloWorldJob

Display Name: Hello World Job

Description: Hello World Job

Job Type: SyncWebserviceJobType

Then click “Select Web Service…”. It pops up a window for the web service.

39

6. On the “Select Web Service” page, select Web Service Type, Port Type, Operation, and Payload. Click “Ok” to finish creating job definition.

8

Secure the Oracle Enterprise Scheduler Web Service

The ESS job cannot be run as an anonymous user, you need to attach a WSM security policy to the ESS Web Service:

1. In Fusion Middleware Enterprise Manager, go to Scheduling Services -> ESSAPP, right click, select “Web Services”.

3

2. In Web Service Details, click on the link “ScheduleServiceImplPort”.

4

3. Open tab “WSM Policies” and click on “Attach/Detach”.

5

4. In “Available Policies”, select “oracle/wss_username_token_service_policy”, click “Attach” button to attach the policy and then click on “Ok” to finish the policy attachment.

6

5. You should see the policy attached and enabled.

7

Create a SOA Composite to Submit a HelloWorldJob

1. Create a new SOA Application/Project with an asynchronous BPEL (2.0) process, InvokeEssJobDemo, in JDeveloper 12c.

2. Create a SOA_MDS connection.

14

3. Enter SOA MDS database connection and test connection successfully.

15

4. Add a Schedule Job from Oracle Extensions to InvokeEssJobDemo BPEL process.

16

5. Double click the newly added Schedule Job activity. This brings up the Edit Schedule Job window.

6. Enter Name “ScheduleJobHelloWorld”, then click “Select Job” button.

17

7. This brings up the Enterprise Scheduler Browser. Select the MDS Connection and navigate down the ESS Metadata to find and select “HelloWorldJob”.

18

8. To keep it simple, we did not create a job schedule. So there is no job schedule to choose. If you have job schedules defined and would like to use them, you can choose a Schedule from the MDS connections.

9. Set Start Time as current date time, and click OK.

19

10. You may see this pop up message.

20

11. Click “Yes” to continue. In the next several steps we will replace WSDL URL with concrete binding on the reference binding later to fix this.

12. In EM, go to Scheduling Services -> Web Services.

21

13. Click on link “SchedulerServiceImplPort”

22

14. Click on link “WSDL Document SchedulerServiceImplPort”.

23

15. It launches a new browser window displaying the ESSWebService wsdl. WSDL URL is in the browser address.

24

16. Update EssService WSDL URL.

25

17. You need to attach WSM security policy to EssService request.

26

18. Add Security Policy: oracle/wss_username_token_client_policy.

27

19. Setting up the credential store for policy framework is beyond the scope of this blog. We will use a short cut, the default weblogic user and password, as Binding Properties on the EssService reference binding to which the security policy is attached.

40

 

20. Build and deploy InvokeEssJobDemo.

21. Test InvokeEssJobDemo web service.

29

22. It should show that the web service invocation was successful.

34

23. Launch flow trace. We can see that Job 601 was successfully submitted.

32

24. Go ESSAPP -> Job Requests -> Search Job Requests. Find Job 601. Job was executed successfully.

35

 

Summary

In this blog, we demonstrated how to set up a SOA web service ESS job and how to invoke ESS web service to submit a job request from BPEL process in SOA Suite 12c.

 

Add Your Comment