Oracle® Fusion Middleware Developer's Guide for Oracle Enterprise Scheduling Service 11g Release 1 (11.1.1.6.0) Part Number E24713-01 |
|
|
PDF · Mobi · ePub |
This chapter describes how you can use the Oracle Enterprise Scheduling Service web service for accessing a subset of the Oracle Enterprise Scheduling Service runtime functionality.
This chapter includes the following sections:
Section 11.1, "Introduction to the Oracle Enterprise Scheduling Service Web Service"
Section 11.2, "Developing and Using ESSWebservice Applications"
Section 11.5, "Creating the ESSWebService Application and a SOA Project"
Section 11.7, "Adding the BPEL Process to Call the ESSWebService"
Section 11.9, "Securing the Oracle Enterprise Scheduling Service Web Service"
Oracle Enterprise Scheduling Service provides a rich set of functionality for enterprise level scheduling. This functionality includes support for the following operations:
Creating and managing Oracle Enterprise Scheduling Service metadata
Submitting and managing Oracle Enterprise Scheduling Service job requests
Configuring and managing Oracle Enterprise Scheduling Service
Client applications can use the Oracle Enterprise Scheduling Service web service (ESSWebservice) to access a subset of the Oracle Enterprise Scheduling Service runtime functionality. The ESSWebservice is provided primarily to support SOA integration, for example invoking Oracle Enterprise Scheduling Service from a BPEL process. However, any client that needs a web service to interact with Oracle Enterprise Scheduling Service can use ESSWebservice. ESSWebservice exposes job scheduling and management functionality for request submission and request management.
ESSWebservice is deployed within the Oracle Enterprise Scheduling Service application, where the application is a Java EE application within the Oracle Enterprise Scheduling Service runtime framework. Thus, the ESSWebservice is available on every node where Oracle Enterprise Scheduling Service is installed and deployed.
The ESSWebservice is a synchronous web service, such that all the operations invoked are synchronous operations. Since internally, the job execution model in Oracle Enterprise Scheduling Service is asynchronous, the APIs themselves do not need to be asynchronous. However, Oracle Enterprise Scheduling Service web service also provides the capability to retrieve the job completion events asynchronously (in a manner similar to implementing the Oracle Enterprise Scheduling Service EventListener contract in the core API layer).
The ESSWebservice WSDL describes the complete functionality for the ESSWebservice. Table 11-1 summarizes the operations available with ESSWebservice.
Table 11-1 Summary of Operations Available with ESSWebservice
Operation | Communication Type | Description |
---|---|---|
|
Synchronous |
Adds a post-processing action to a step in a job set request. This method is called prior to submitting the request. The method provides support for action previously supported by add_printer, add_notification, add_layout in concurrent processing. The parameters to these legacy routines are passed as arguments to addPPAction in the order in which they were declared in the original routine. For more information, see Section 11.8, "Using Additional ESSWebService Operations" |
|
Synchronous |
Similar to |
|
Synchronous |
Cancels the processing of a request that is not in a terminal state. |
|
Synchronous |
Marks a request in a terminal state for deletion. This does not physically remove any data, although the request will no longer be accessible by most methods. For parent requests, this operation will cascade to all children. |
|
Asynchronous |
Registers for an asynchronous status update when the request completes. A one-way operation with a separate asynchronous response. |
|
Synchronous |
Gets the runtime details of the specified request. |
|
Synchronous |
Retrieves the current state of the specified request. |
|
Synchronous |
Withholds further processing of a request that is in |
|
Synchronous |
Releases a request from the |
|
Synchronous |
Sets the status of an asynchronous java job. |
|
Synchronous |
Sets NLS environment options for a request. |
|
Synchronous |
Marshals arguments in the previous concurrent processing style into a Oracle Enterprise Scheduling Service properties for a step in a job set request. This operation is invoked prior to submitting a request. For more information, see Section 11.8, "Using Additional ESSWebService Operations". |
|
Synchronous |
Marshals arguments in the previous concurrent processing style into Oracle Enterprise Scheduling Service properties.This operation is invoked prior to submitting the request. The key of each argument is ARGUMENT_PREFIX#, where # is the ordinal value of the argument. For example ARGUMENT_PREFIX1="firstArg" and ARGUMENT_PREFIX2="secondArg". For more information, see Section 11.8, "Using Additional ESSWebService Operations". |
|
Synchronous |
Submits a new recurring job request (a request with a schedule). For more information, see Section 11.8, "Using Additional ESSWebService Operations". |
|
Synchronous |
Submits a new job request. For more information, see Section 11.4, "Use Case Using Oracle Enterprise Scheduling Service ESSWebservice from a BPEL Process" |
Oracle Enterprise Scheduling Service executes a job request, for example a Java type job request, in the context of the application that submitted the job. Typically, for development purposes, Oracle Enterprise Scheduling Service and client applications co-exist locally on any given node which allows Oracle Enterprise Scheduling Service to execute the job in the context of the target application. For the purposes of production, the client application and Oracle Enterprise Scheduling Service often reside on different servers.
A Java EE application that uses Oracle Enterprise Scheduling Service contains all the Oracle Enterprise Scheduling Service artifacts including the following:
Metadata, including a job type, a job definition, a schedule, and any other required metadata such as a job set.
Job implementation classes (for Java jobs).
A Required Oracle Enterprise Scheduling Service endpoint description (an MDB description in ejb-jar.xml).
Any clients interacting with Oracle Enterprise Scheduling Service using ESSWebservice need to provide such a Java EE application, such that Oracle Enterprise Scheduling Service can run jobs in the context of the correct target application. All such web service clients must know the name of the corresponding Java EE hosting application and should pass it to Oracle Enterprise Scheduling Service using the web service call wherever required (where this is required is defined in the WSDL).
The details for developing this hosting application are described in Chapter 5, "Use Case Oracle Enterprise Scheduling Service Sample Application (Deprecated)." Such an application is a regular Oracle Enterprise Scheduling Service client application, but the job request submission and other Oracle Enterprise Scheduling Service interactions may be skipped, as these calls are generated through the ESSWebservice.
When the Oracle Enterprise Scheduling Service functionality is accessed using the ESSWebservice web service, a corresponding hosting Java EE application needs to be available to Oracle Enterprise Scheduling Service. Even though clients can interact with Oracle Enterprise Scheduling Service remotely using the Oracle Enterprise Scheduling Service web service, the associated Java EE application must still be co-located with Oracle Enterprise Scheduling Service. This allows Oracle Enterprise Scheduling Service to execute job requests in the correct application context. Therefore ESSWebservice clients still need to develop, package and deploy a corresponding Java EE application that contains all the required Oracle Enterprise Scheduling Service artifacts. For information about developing an Oracle Enterprise Scheduling Service application, see Chapter 5, "Use Case Oracle Enterprise Scheduling Service Sample Application (Deprecated)."
For SOA clients all the SOA components such as a BPEL processor are deployed as a SOA composite. A SOA composite is not a Java EE application. The composite is executed using the SOA fabric runtime framework (within soa-infra).
For SOA components, create a separate Java EE hosting application that acts as the proxy between the composite and Oracle Enterprise Scheduling Service. This hosting application can either be created in a one-to-one association with one Oracle Enterprise Scheduling Service application for each composite deployed, or multiple composites can share a single Java EE hosting application. The Java EE hosting application contains all the desired Oracle Enterprise Scheduling Service artifacts.
As shown in the ESSWebservice WSDL, if clients want to be notified asynchronously on job completion they can invoke the getCompletionStatus()
operation. Upon job completion, Oracle Enterprise Scheduling Service will invoke the callback operation onJobCompletion()
following ws-addressing where ESSWebservice captures the caller's address in the incoming call. Clients should be capable of receiving the callback at any arbitrary time in future. Such a callback depends entirely upon the time required to complete the job. This is similar to the Oracle Enterprise Scheduling Service functionality for invoking a client's listener (that implements Oracle Enterprise Scheduling Service EventListener contract) upon job completion.
When you use getCompletionStatus()
clients must include certain required web service addressing headers (in particular the wsa:MessageID
and wsa:ReplyTo
headers). This allows the Oracle Enterprise Scheduling Service runtime to asynchronously notify the job completion status be sent to the correct ReplyTo
address. When you use getCompletionStatus()
from a BPEL process the SOA runtime automatically adds the required headers. When using getCompletionStatus()
programatically on the client side, using the web service proxies, then the web service client must set these addressing headers.
ESSWebservice does not support the following Oracle Enterprise Scheduling Service features:
Ad hoc Request Submission: ESSWebservice does not support ad hoc job request submission (ad hoc request submission is available using the EJB APIs). Therefore any job that is submitted using the ESSWebservice must have its corresponding definition, including a job type and job definition along with the schedule definitions created as metadata objects in the associated proxy application. The web service operation can then refer to such metadata objects using their identifier arguments as specified in the WSDL.
Query API: ESSWebservice does not expose the query APIs. Web service clients do not need to obtain the query information for Oracle Enterprise Scheduling Service requests. ESSWebservice web service clients do not provide generic monitoring and managing functionality that would require the use of query APIs.
The Oracle Enterprise Scheduling Service functionality is exposed as web service using an interface (SEI) annotated with the JAX-WS annotations. The implementation of this (SEI) web service invokes the common Oracle Enterprise Scheduling Service implementation layer. The ESSWebservice is exposed in Document/Literal/Wrapped mode for maximum interoperability.
Some of the data types used in ESSWebservice are not suitable to be used in web service directly. Such data types cannot be readily converted into corresponding XML representation. Therefore the Oracle Enterprise Scheduling Service web service layer defines wrapper classes around these data types that are exposed in the ESSWebservice, and visible in the WSDL. Otherwise in general, the web service layer reuses the existing data types where possible.
When Oracle Enterprise Scheduling Service is installed and running, you can obtain the WSDL definition file from the web services page at the following type of URL:
http://host:port/ess/esswebservice?WSDL
For example,
http://system1:7001/ess/esswebservice?WSDL
The following sections show use of ESSWebService from a BPEL process; in the BPEL process you use ESSWebService to submit a job request. The use case demonstrates one path for using Oracle Enterprise Scheduling Service for BPEL and SOA users. Experienced SOA users and designers may have other ideas for how work with Oracle Enterprise Scheduling Service using the web service. To submit an Oracle Enterprise Scheduling Service job request from a BPEL process, you need to deploy an application that provides the required Oracle Enterprise Scheduling Service artifacts. For this use case you can deploy the EssDemoApp
described in Chapter 5, "Use Case Oracle Enterprise Scheduling Service Sample Application (Deprecated)."
Using Oracle JDeveloper you create an application and the projects within the application that contain the code and support files for the application. To create the ESSWebService sample application, you do the following:
Create an application and an SOA project in Oracle JDeveloper
Configure the SOA project in Oracle JDeveloper
To work with Oracle Enterprise Scheduling Service you first create an application and an SOA project in Oracle JDeveloper.
To create EssWebApplication:
Click the New... icon.
In the New Gallery, in the navigator, expand General and select Applications.
In the Items area select SOA Application.
Click OK.
Use the Name your application window to enter the name and location for the new application and to specify the application template.
In the Application Name field, enter an application name. For this sample application, enter EssWebApplication
.
In the Directory field, accept the default.
Enter an application package prefix or accept the default, no prefix.
The prefix, followed by a period, applies to objects created in the initial project of an application.
Click Next.
In the Name your project dialog select SOA project options.
In the Project Name field, enter a project name or accept the default, Project1
.
On the Project Technologies tab, the Selected shuttle should show SOA.
Click Finish. This creates the EssWebApplication that contains an SOA project.
In the SOA composite application you need to add the ESSWebservice reference to make the web service available for a partner link in the SOA composite application.
You need to add the ESSWebService partner link to the SOA composite application.
To add the Oracle Enterprise Scheduling Service web service as a partner link:
In the Application Navigator open the ESSWebApplication and expand Project1 and then expand SOA Content.
In the Application Navigator select composite.xml.
Right-click and from the dropdown list select Open. This displays the composite as shown in Figure 11-1.
In the Component Palette from the SOA dropdown list, in the Service Adapters area select Web Service.
Drag-and-drop the web service icon to the External References lane in composite.xml. This displays the Create Web Service window, as shown in Figure 11-2.
In the Name field, enter a service name, or accept the default name.
In the Type field, from the dropdown list select Reference.
In the WSDL URL text field enter the value for the WSDL URL manually, for example:
http://host:port/ess/esswebservice?WSDL
In the SOA Resource Lookup dialog, click OK.
In the Create Web Service dialog, in the Port Type field, from the dropdown list select ESSWebService.
In the Create Web Service dialog, in the Callback Port Type select ESSWebServiceCallback from the dropdown list, as shown in Figure 11-3.
Select the check box Copy WSDL and its dependent artifacts into the project. This allows the local copy of the Oracle Enterprise Scheduling Service abstract WSDL and ESSTypes.xsd
files to be moved into the SOA composite project.
Note:
Keeping a local copy of a WSDL file may result in synchronization issues if the remote WSDL file is updated. Making a local copy of the remote WSDL file is therefore not recommended. However, doing so may be useful for certain scenarios such as offline designing.Click OK. Now the External References lane in composite.xml displays the new web service, as shown in Figure 11-4.
Now you need to add a BPEL Process to call the ESSWebService operations.
You need to add a BPEL process to use the ESSWebService.
To add a BPEL process to use the ESSWebService:
In the Application Navigator, in Project1 select composite.xml.
In the Component Palette, from the SOA dropdown list in the Service Components area select BPEL Process.
Drag-and-drop a BPEL process to the components swim lane. This displays the Create BPEL Process dialog, as shown in Figure 11-5.
Click OK. This adds the BPEL process to composite.xml, as shown in Figure 11-6.
In composite.xml, select BPELProcess1 and then select and drag the right arrow to create a reference to Service1, as shown in Figure 11-7.
Click the Save All icon to save the project files.
You need to change the schema of the BPEL process by opening up the corresponding XSD file in the xsd folder under the project. This step is a shortcut for the demonstration purposes for this sample application. In your own application, you would use the schema types required for the ESSWebservice operations. This allows the clients of the BPEL process, for this example a simplified test case, to provide all the necessary inputs (this is required because clients are based on BPEL process schema). This step allows you to map, or assign inputs for the web service. This step is only required to correctly generate the sample application. In real scenarios the BPEL process designer is responsible for defining or supplying the input schema, and mapping this to the web service inputs.
Note:
The steps outlined require manual changes, depending on the BPEL process you are working with and the particular naming you are using for your BPEL process. You can find the types that are required for ESSWebService operations in the ESSWebService WSDL file. It is also possible to individually add these types to the schema.To update the BPEL process schema:
In the Application Navigator, in Project1 expand the SOA Content folder and expand the xsd folder.
In the xsd folder, double-click the BPELProcess1.xsd file.
Select the Source tab.
Copy the EssWebService types so that the schema includes the contents shown in Example 11-1.
The ESSTypes.xsd
file and other WSDL artifacts exposed by the Oracle Enterprise Scheduling Service web service are imported into the composite and renamed esswebservice_XSD_<
XSD file name
>.xsd
.
Note:
The schema shown in Example 11-1 includes the application and project name. If you change the application name or the project name for this example, you also need to update the schematargetNamespace
and xmlns:
tns
elements to reflect the names that you use.In the BPELProcess1.xsd
file, refer to the artifacts created in Section 11.6, "Creating the ESSWebService Reference" that have been imported into the composite. The directory path should be relative the BPELProcess1.xsd
file. Example 11-1 shows the composite schema file with a reference to the web service artifacts.
Example 11-1 BPEL XSD Schema
<?xml version="1.0" encoding="UTF-8"?>
<schema attributeFormDefault="unqualified" elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-Instance"
xmlns:ns1="http://xmlns.oracle.com/scheduler/types"
targetNamespace="http://xmlns.oracle.com/
EssWebApplication/Project1/BPELProcess1"
xmlns:tns="http://xmlns.oracle.com/
EssWebApplication/Project1/BPELProcess1"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://xmlns.oracle.com/scheduler/types"
schemaLocation="../esswebservice_XSD_ESSTypes.xsd" />
<element name="process">
<complexType>
<xs:sequence>
<xs:element name="description" type="xs:string"/>
<xs:element name="jobDefinitionId" type="ns1:metadataObjectId"/>
<xs:element name="requestedStartTime" type="xs:dateTime"/>
<xs:element name="application" type="xs:string"/>
<xs:element name="requestParameters" type="ns1:requestParameters"/>
</xs:sequence>
</complexType>
</element>
<element name="processResponse">
<complexType>
<sequence>
<element name="result" type="string"/>
<element name="requestId" type="long"/>
<element name="state" type="ns1:state"/>
</sequence>
</complexType>
</element>
</schema>
Click the Save icon.
In the BPEL process you add an invoke activity to perform the Oracle Enterprise Scheduling Service web service submitRequest()
operation. In this step you need to select the input and output for the Invoke Activity by associating values with the Input and Output variables.
To add the Invoke activity to submit the request using ESSWebService:
In the Application Navigator, in Project1 expand SOA Content and select the BPEL file. For example, select BPELProcess1.bpel. This displays the BPEL swim lane as shown in Figure 11-8.
From the Component Palette, drag-and-drop an Invoke Activity and place the activity before callbackClient.
Link the invoke activity to the ESSWebService by selecting the right arrow and dragging it to the Partner Link Service1. This brings up the Edit Invoke dialog, as shown in Figure 11-9.
In the Edit Invoke dialog, in the Operation field, select submitRequest.
In the Variables field, click the Add icon next to the Input field.
The Create Variable dialog displays. Accept the default value and click OK.
In the Edit Invoke dialog, click the Add icon next to the Output field.
The Create Variable dialog displays. Accept the default value and click OK.
The new invoke link to Service1 displays.
Select the Invoke activity and double-click the name Invoke_1
to select the text entry field. In the text entry field enter submitRequest
, as shown in Figure 11-10.
You add an Assign activity and then assign inputs from the BPEL process to the submitRequest Invoke activity.
Note:
In most cases, the input payload of the BPEL process will not directly match the input payload of the submit Request web service. Coaxing into use of CopyList will only work in the scenarios where there is a one to one mapping of the input payload to the submit Request.For the mapping for an Assign activity with a Copy operation, the arguments correspond to the input parameters for Oracle Enterprise Scheduling Service submitRequest, as shown in Table 11-2. If your BPEL schema differs from the submitRequest message type, use Table 11-2 as a guide for how to populate the values manually with the Assign activity Copy operation.
Table 11-2 Submit Request Web Service Arguments for BPEL Assign Activity Mapping
Argument | Description |
---|---|
Description |
Context for the ad hoc submission of this job, such as the 'Order Import'. |
Application |
The application name can be the deployment name of the hosting Oracle Enterprise Scheduling Service application or it can be a logical application name. |
JobDefinitionId |
|
parameter(s) |
dataType: Value type for this parameter ( name: String containing the name of the parameter defined in the Oracle Enterprise Scheduling Service job definition. scope: String containing the named scope for this parameter - used only for job sets. value: Element containing the parameter's value |
To add an assign activity:
Drag-and-drop an Assign activity from the BPEL Activities area in the Component Palette to just before the Invoke Activity named submitRequest.
Select the Assign activity and double-click the name Assign_1 to enter new text. In the text entry box enter Job_Inputs
, as shown in Figure 11-11.
Add Copy for description JobDefinitionID requestedStartTime application:
Double click the new Assign activity named Job_Inputs
to show the Assign page with the Copy Operation tab, as shown in Figure 11-12.
Click the Add icon and from the dropdown list select Copy Operation, to add copy operations for variables. This displays the Create Copy Operation dialog.
In the Create Copy Operation dialog, expand and then navigate to select a copy operation for each input parameter (you only use a copy operation for description
, jobDefinitionID
, requestedStartTime
, and application
). This copies the input parameters to Invoke_1_submitRequest_InputVariable
parameters for the invoke activity. Figure 11-13 shows one of these copy operations.
Click OK to add the copy operation for description
.
In a similar manner, perform additional copy operations for the jobDefintionID
, requestedStartTime
, and application
parameters.
To add a copy list for RequestParameters:
Double click the Assign activity named Job_Inputs
to show the Assign page with the Copy Operation tab.
Click the Add icon and from the dropdown list select CopyList Operation..., to add CopyList operations for the requestParameters. This displays the Create CopyList Operation dialog.
In the Create CopyList Operation dialog, expand and then navigate to select a copylist operation for requestParameters
. To do this you navigate and select the parameter element, as shown in Figure 11-14.
In the Create CopyList Operation dialog, click OK.
In the Assign activity, click OK.
Figure 11-15 shows the BPEL Design page.
When BPEL Element Does Not Have Same Type as Oracle Enterprise Scheduling Service web service:
If your BPEL payload is not the same element type as that of the Oracle Enterprise Scheduling Service web service and you need to assign values to one or more job parameters, you can use the following approach.
Populate the first parameter element using copy operations, as done in previous steps.
Add or clone additional parameter elements using the Insert-After, as shown in Figure 11-16.
Populate the additional parameter elements using XPath array subscripting.
This action effectively copies the entire parameter element along with all sub-element values and appends it to the end of the XML array. In order to populate the values of the second job parameter, add additional copy operations and modify the XPath expressions in the bottom right of the dialog to add the appropriate array subscript [n]. where 'n' is the # of the parameter. Note that all XML arrays start with 1, not 0.
Add another Invoke activity and link it to Service1 to invoke the ESSWebService getCompletionStatus operation.
To add the Invoke activity for the getCompletionStatus operation:
From the Component Palette, drag-and-drop an Invoke activity and drop it after submitRequest and before callbackClient.
In the new Invoke activity, select the text entry area with the name Invoke_1, and enter the name, getStatusAsync
.
Link the invoke activity to Service1 by selecting the right arrow and dragging it to the Partner Link Service1. This displays the Edit Invoke dialog.
In the Edit Invoke dialog for getStatusAsync, in the Operation field, from the dropdown list select getCompletionStatus.
In the Input Variable field select the Add icon. This displays the create variable dialog, as shown in Figure 11-17.
In the Create Variable dialog, click OK. This displays the Edit Invoke dialog, as shown in Figure 11-18.
In the Edit Invoke dialog, click OK. This displays the new Invoke Activity getStatusAsync and the link to Service1.
Add a new Assign Activity after submitRequest to assign the RequestID and pass it to the getStatusAsync invoke activity.
To add the assign activity:
Drag-and-drop an Assign activity from the BPEL Activities area in the Component Palette to just after the Invoke Activity named submitRequest and before the Invoke Activity named getStatusAsync.
Select the Assign activity and double-click the name Assign_1 to select the text entry area. In the text entry area, enter RequestID
. Figure 11-19 shows the Assign activity.
Double click the new Assign activity, RequestID to show the Assign page with the Copy Operation tab.
Click the Add icon and select Copy Operation... from the dropdown list.
In the From area expand Invoke_1_submitRequest_OutputVariable and select requestID. Map this in the To area to the requestID
in getStatusAsync_getCompletionStatus_InputVariable
, as shown in Figure 11-20.
On the Edit Copy Operation dialog, click OK.
On the Copy Operation dialog, click OK.
On the BPEL Design page, click Validate Process. This displays the BPEL, as shown in Figure 11-21.
Add a Receive Activity and link it to the onJobCompletion ESSWEbService operation.
Add a receive activity:
Drag-and-drop a Receive activity from the BPEL Activities area in the Component Palette to a position after the getStatusAsync Invoke activity and before the callbackClient.
Select the text entry area in the Receive Activity named Receive_1
and enter onJobCompletion
, as shown in Figure 11-22.
Drag the right arrow from the receive activity onJobCompletion to Service 1. This displays the Edit Receive dialog, as shown in Figure 11-23.
In the Edit Receive dialog, in the Operation field from the dropdown list select onJobCompletion.
In the Variable field, click the Add icon. This displays the Create Variable dialog.
In the Create Variable dialog, click OK.
In the Edit Receive dialog, click OK. This adds an arrow from Service1 to the new Receive activity, onJobCompletion as shown in Figure 11-24.
Add an Assign activity to copy the result output from onJobCompletion to the output for the client. Assign all the results from onJobCompletion to the callbackClient input variable.
To add the result assign activity:
Drag-and-drop an Assign activity from the BPEL Activities area in the Component Palette to a position after the Receive activity onJobCompletion and before the callbackClient.
Select the Assign activity and double-click the name Assign_1 to enter new text. Enter the value Result
, as shown in Figure 11-25.
Double click the new Result Assign activity to show the Assign page with the Copy Operation tab.
Click the Add icon and select Copy Operation... from the dropdown list.
Navigate to select the variables, for the From area for onJobCompletion_onJobCompletion_InputVariable
and select resultMessage. In the To area, expand outputVariable and select client:result, shown in Figure 11-26.
In the Create Copy Operation dialog, click OK.
In the Assign area, click OK.
Click Validate Process.
The final BPEL is shown in Figure 11-27.
You can use other EssWebService operations, including:
When you want to submit a request with an associated schedule, you use the submitRecurringRequest
web service operation. For more information, see Section 11.8.1, "How to Invoke the ESSWebService submitRecurringRequest Operation."
When you want to marshal arguments in the previous concurrent processing style into Oracle Enterprise Scheduling Service properties, you use the setSubmitArgs
operation. This operation should be invoked prior to submitting a request. The key of each argument is submit.argument#
, where #
is the ordinal value of the argument, for example submit.argument1="firstArg"
and submit.argument2="secondArg"
. For more information, see Section 11.8.2, "How to Invoke the ESSWebService setSubmitArgs Operation."
When you want to add a post-processing action to a step in a job set request, you use the addPPAction
operation. This method is called prior to submitting the request. This operation provides support for action previously supported by add_printer
, add_notification
and add_layout
in concurrent processing. The parameters to these legacy routines are passed as arguments to addPPAction
in the order in which they were declared in the original concurrent processing routine. Section 11.8.3, "How to Invoke the ESSWebService addPPActions Operation"
In the BPEL process you add an invoke activity to perform the Oracle Enterprise Scheduling Service web service submitRecurringRequest()
operation. In this step you need to select the input and output for the Invoke Activity by associating values with the Input and Output variables. In order to submit jobs that repeat or will run at a later date that job must be submitted with an Oracle Enterprise Scheduling Service schedule which is constructed declaratively and stored in the metadata repository. Once the schedule has been defined, BPEL can submit jobs with that schedule through the submitRecurringRequest()
operation.
To add the Invoke activity to submit the request using ESSWebService:
In the Application Navigator, in Project1 expand SOA Content and select the BPEL file. For example, select BPELProcess1.bpel. This displays the BPEL swim lane.
From the Component Palette, drag-and-drop an Invoke Activity and place the activity in the process. This activity populates the request submission payload and submits it to the Oracle Enterprise Scheduling Service web service.
Select the Invoke activity and double-click the name Invoke_1
to select the text entry field. In the text entry field enter submitRecurringRequest
.
Link the invoke activity to the ESSWebService by selecting the right arrow and dragging it to the Partner Link Service1. This brings up the Edit Invoke dialog, as shown in Figure 11-28.
In the Edit Invoke dialog, in the Operation field, select submitRecurringRequest.
In the Edit Invoke dialog, in the Input field click the Add icon. This displays the Create Variable dialog and lets you create a scope-level variable to contain the request payload.
In the Create Variable dialog, click OK.
In the Edit Invoke dialog, in the Output field select the Add icon. This displays the Create Variable dialog and lets you create scope-level variable to contain the response payload.
In the Create Variable dialog, click OK.
In the Edit Invoke dialog, click OK. This displays the new invoke link to Service1, as shown in Figure 11-29.
To assign inputs for recurring request submission:
You add an Assign activity and then assign inputs from the BPEL process to the submitRecurringRequest Invoke activity. This allows you to populate the input variable with recurring request submission parameters.
Note:
In most cases, the input payload of the BPEL process will not directly match the input payload of the submit recurring request web service. Coaxing into use of CopyList will only work in the scenarios where there is a one to one mapping of the input payload to the submit Request.For the mapping for an Assign activity with a Copy operation, the arguments correspond to the input parameters for Oracle Enterprise Scheduling Service submitRequest, as shown in Table 11-3. If your BPEL schema differs from the submitRequest message type, use Table 11-3 as a guide for how to populate the values manually with the Assign activity Copy operation.
Table 11-3 Submit Recurring Request Web Service Arguments for BPEL Assign Activity Mapping
Argument | Description |
---|---|
Description |
Context for the ad hoc submission of this job, such as the 'Order Import'. |
Application |
The "application" name can be the deployment name of the hosting Oracle Enterprise Scheduling Service application or it can be a logical application name. |
JobDefinitionId |
|
parameter(s) |
dataType: Value type for this parameter ( name: String containing the name of the parameter defined in the Oracle Enterprise Scheduling Service job definition. scope: String containing the named scope for this parameter - used only for job sets. value: Element containing the parameter's value |
scheduleID |
|
It is possible to define multiple parameters to be passed to the Oracle Enterprise Scheduling Service job. When adding additional parameters to the Oracle Enterprise Scheduling Service service payload in BPEL, you must first add a new parameter element to the DOM using an 'Insert-After' of the original parameter element, then use array subscripting to populate that new parameter with the correct values. Repeat as needed.
First, copy and clone the existing parameter element back into the variable using the Insert-After operation. This creates a second parameter element in the XML array. For example, see Figure 11-30.
Second, create a new Copy operation and choose the parameter elements in the To/From areas of the dialog in the same manner as when copying values for the first parameter. However, in the lower right corner, change the XPath path to include a [2] (XML Arrays start at 1 and not 0) and click OK. Repeat as needed for each parameter required.
In the BPEL process you add an invoke activity to perform the Oracle Enterprise Scheduling Service web service setSubmitArgs()
operation.
To add the Invoke activity to use setsubmitArgs for a request using ESSWebService:
In the Application Navigator, in Project1 expand SOA Content and select the BPEL file. For example, select BPELProcess1.bpel. This displays the BPEL swim lane.
From the Component Palette, drag-and-drop an Invoke Activity and place the activity before callbackClient.
Link the invoke activity to the ESSWebService by selecting the right arrow and dragging it to the Partner Link Service1. This brings up the Edit Invoke dialog.
In the Edit Invoke dialog, in the Operation field select setSubmitArgs.
In the Edit Invoke dialog, in the Input field click the Add icon. This displays the Create Variable dialog.
In the Create Variable dialog, click OK.
In the Edit Invoke dialog, in the Output field select the Add icon. This displays the Create Variable dialog.
In the Create Variable dialog, click OK.
In the Edit Invoke dialog, click OK. This displays the new invoke link to Service1.
Select the Invoke activity and double-click the name Invoke_1
to select the text entry field. In the text entry field enter setSubmitArgs
.
From the Component Palette, drag-and-drop a Transform Activity and place the activity before the setSubmitArgs. This transformation maps the BPEL flow input variable to the setSubmitArgs input variable.
Open the transformation activity. On the Transformation tab, in the Source area click the Add icon. This displays the Source Variable dialog.
In the Source Variable dialog select inputVariable and click OK.
In the transformation activity, on the Transformation tab, in the Target Variable field select setSubmitArgs_setSubmitArgs_InputVariable as the target.
In the transformation activity, on the Transformation tab, in the Mapper File field, click Add to create a new mapper file.
This creates a mapper file, as shown in Figure 11-31. Note that a "for-each" construct can be inserted by dragging an item from the XSLT Constructs area of the Component Palette.
The transformation tool does not create exactly what is needed. You need to edit the XSLT source. In the source, find the following mapping.
<xsl:for-each select="/client:BPELProcess1ProcessRequest/client:arguments"> <arguments> <xsl:value-of select="."/> </arguments> </xsl:for-each>
Replace this with the following; add "tns:" as a qualifier to "arguments", resulting in the following fragment. Note that the transformation tool design tab may incorrectly complain that this is not a valid transformation:
<xsl:for-each select="/client:BPELProcess1ProcessRequest/client:arguments"> <tns:arguments> <xsl:value-of select="."/> </tns:arguments> </xsl:for-each>
Example 11-2 shows the complete transformation source file.
Example 11-2 Transformation Source for Set Submit Arguments Transformation
<?xml version="1.0" encoding="UTF-8" ?> <?oracle-xsl-mapper <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. --> <mapSources> <source type="WSDL"> <schema location="../BPELProcess1.wsdl"/> <rootElement name="BPELProcess1ProcessRequest" namespace="http://xmlns.oracle.com/EssWebApplication/ Project1/BPELProcess1"/> </source> </mapSources> <mapTargets> <target type="WSDL"> <schema location="../Service1.wsdl"/> <rootElement name="setSubmitArgs" namespace="http://xmlns.oracle.com/scheduler"/> </target> </mapTargets> <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.0.0(build 090113.2000.2412) AT [FRI FEB 06 08:27:53 PST 2009]. --> ?> <xsl:stylesheet version="1.0" xmlns:xpath20="http://www.oracle.com/XSL/Transform/java /oracle.tip.pc.services.functions.Xpath20" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/ business-process/" xmlns:client="http://xmlns.oracle.com/EssWebApplication /Project1/BPELProcess1" xmlns:oraext="http://www.oracle.com/XSL/Transform/java/ oracle.tip.pc.services.functions.ExtFunc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dvm="http://www.oracle.com/XSL/Transform/java/ oracle.tip.dvm.LookupValue" xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:med="http://schemas.oracle.com/mediator/xpath" xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip. mediator.service.common.functions .GetRequestHeaderExtnFunction" xmlns:ids="http://xmlns.oracle.com/bpel/services/ IdentityService/xpath" xmlns:tns="http://xmlns.oracle.com/scheduler" xmlns:xdk="http://schemas.oracle.com/bpel/extension /xpath/function/xdk" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xref="http://www.oracle.com/XSL/Transform/java /oracle.tip.xref.xpath.XRefXPathFunctions" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns0="http://xmlns.oracle.com/scheduler/types" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:socket="http://www.oracle.com/XSL/Transform/ java/oracle.tip.adapter.socket.ProtocolTranslator" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" exclude-result-prefixes="xsi xsl client plnk xsd ns0 wsdl tns soap12 soap mime xpath20 bpws oraext dvm hwf med mhdr ids xdk xref ora socket ldap"> <xsl:template match="/"> <tns:setSubmitArgs> <tns:requestParameters> <xsl:for-each select="/client:BPELProcess1ProcessRequest/client: requestParameters/ns0:parameter"> <ns0:parameter> <ns0:dataType> <xsl:value-of select="ns0:dataType"/> </ns0:dataType> <ns0:name> <xsl:value-of select="ns0:name"/> </ns0:name> <ns0:scope> <xsl:value-of select="ns0:scope"/> </ns0:scope> <ns0:value> <xsl:value-of select="ns0:value"/> </ns0:value> </ns0:parameter> </xsl:for-each> </tns:requestParameters> <xsl:for-each select="/client:BPELProcess1ProcessRequest/client:arguments"> <tns:arguments> <xsl:value-of select="."/> </tns:arguments> </xsl:for-each> </tns:setSubmitArgs> </xsl:template> </xsl:stylesheet>
In the BPEL process you add an invoke activity to perform the Oracle Enterprise Scheduling Service web service addPPActions()
operation.
To add the Invoke activity for addPPActions operation using ESSWebService:
In the Application Navigator, in Project1 expand SOA Content and select the BPEL file. For example, select BPELProcess1.bpel. This displays the BPEL swim lane.
From the Component Palette, drag-and-drop an Invoke Activity and place the activity before callbackClient.
Select the Invoke activity and double-click the name Invoke_1
to select the text entry field. In the text entry field enter addPPActions
.
Link the invoke activity to the ESSWebService by selecting the right arrow and dragging it to the Partner Link Service1. This brings up the Edit Invoke dialog.
In the Edit Invoke dialog, in the Operation field select addPPActions, as shown in Figure 11-32.
In the Edit Invoke dialog, in the Input field click the Add icon. This displays the Create Variable dialog.
In the Create Variable dialog, click OK.
In the Edit Invoke dialog, in the Output field select the Add icon. This displays the Create Variable dialog.
In the Create Variable dialog, click OK.
In the Edit Invoke dialog, click OK. This displays the new invoke link to Service1.
From the Component Palette, drag-and-drop a Transform Activity and place the activity before the addPPActions. This transformation maps the BPEL flow input variable to the addPPActions input variable.
Open the transformation activity. On the Transformation tab, in the Source area click the Add icon. This displays the Source Variable dialog.
In the Source Variable dialog select inputVariable and click OK.
In the transformation activity, on the Transformation tab in the Target Variable field select addPPActions_addPPActions_InputVariable as the target.
In the transformation activity, on the Transformation tab in the Mapper File field, click Add to create a new mapper file. This displays the XSL transformation file.
Create mappings as shown in Example 11-3.
The requestParameters come from the addPPActions, overriding what is in the transformation. The remainder of the input still comes from the BPEL flow input variable. Assign requestParametersReturn/ns2:parameter
of the addPPActions output variable to requestParameters/ns2:parameter
of the addPPActions input variable, as in the previous examples.
Example 11-3 addPPActions Transformations
<?xml version="1.0" encoding="UTF-8" ?> <?oracle-xsl-mapper <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. --> <mapSources> <source type="WSDL"> <schema location="../BPELProcess1.wsdl"/> <rootElement name="BPELProcess1ProcessRequest" namespace="http://xmlns.oracle.com/EssWebApplication/Project1/BPELProcess1"/> </source> </mapSources> <mapTargets> <target type="WSDL"> <schema location="../Service1.wsdl"/> <rootElement name="addPPActions" namespace="http://xmlns.oracle.com/scheduler"/> </target> </mapTargets> <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.0.0(build 090113.2000.2412) AT [FRI FEB 06 10:29:28 PST 2009]. --> ?> <xsl:stylesheet version="1.0" xmlns:xpath20="http://www.oracle.com/XSL/Transform/java/ oracle.tip.pc.services.functions.Xpath20" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:client="http://xmlns.oracle.com/EssWebApplication/Project1/BPELProcess1" xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc. services.functions.ExtFunc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue" xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:med="http://schemas.oracle.com/mediator/xpath" xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip. mediator.service.common.functions.GetRequestHeaderExtnFunction" xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath" xmlns:tns="http://xmlns.oracle.com/scheduler" xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xref="http://www.oracle.com/XSL/Transform/java/ oracle.tip.xref.xpath.XRefXPathFunctions" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns0="http://xmlns.oracle.com/scheduler/types" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip. adapter.socket.ProtocolTranslator" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" exclude-result-prefixes="xsi xsl client plnk xsd ns0 wsdl tns soap12 soap mime xpath20 bpws oraext dvm hwf med mhdr ids xdk xref ora socket ldap"> <xsl:template match="/"> <tns:addPPActions> <tns:requestParameters> <xsl:for-each select="/client:BPELProcess1ProcessRequest/client: requestParameters/ns0:parameter"> <ns0:parameter> <ns0:dataType> <xsl:value-of select="ns0:dataType"/> </ns0:dataType> <ns0:name> <xsl:value-of select="ns0:name"/> </ns0:name> <ns0:scope> <xsl:value-of select="ns0:scope"/> </ns0:scope> <ns0:value> <xsl:value-of select="ns0:value"/> </ns0:value> </ns0:parameter> </xsl:for-each> </tns:requestParameters> <xsl:for-each select="/client:BPELProcess1ProcessRequest/client:postProcessAction"> <tns:postProcessActions> <ns0:actionName> <xsl:value-of select="ns0:actionName"/> </ns0:actionName> <ns0:actionOrder> <xsl:value-of select="ns0:actionOrder"/> </ns0:actionOrder> <xsl:for-each select="ns0:arguments"> <ns0:arguments> <xsl:value-of select="."/> </ns0:arguments> </xsl:for-each> <ns0:fileMgmtGroup> <xsl:value-of select="ns0:fileMgmtGroup"/> </ns0:fileMgmtGroup> <ns0:description> <xsl:value-of select="ns0:description"/> </ns0:description> <ns0:onError> <xsl:value-of select="ns0:onError"/> </ns0:onError> <ns0:onSuccess> <xsl:value-of select="ns0:onSuccess"/> </ns0:onSuccess> <ns0:onWarning> <xsl:value-of select="ns0:onWarning"/> </ns0:onWarning> </tns:postProcessActions> </xsl:for-each> </tns:addPPActions> </xsl:template> </xsl:stylesheet>
In the BPEL process, you add an invoke activity to perform the Oracle Enterprise Scheduling Service web service addPPActions()
operation.
As shown in Example 11-4, you can add the following to the BPELProcess1.xsd
file to allow input for setStepsArgs
.
Example 11-4 Enabling Input for setStepsArgs
<xs:element name="stepArgs" type="ns1:stepArgs" minOccurs="0" maxOccurs="unbounded"/>
The main steps are as follows:
Create a transformation to map the BPEL flow input variable to the setStepsArgs input variable.
From BPEL Activities and Components, select Transform and place before setStepsArgs. Open the new transformation activity. Select inputVariable as the source and setStepsArgs_setStepsArgs_InputVariable as the target. Create a new mapper file. Create the mappings as shown in the SetStepsArgs
transformation example.
Create an assignment activity. In this example, you want the requestParameters to come from the previous step, addPPActions, overriding what is in the transformation. The remainder of the input still comes from the BPEL flow input variable. Assign requestParametersReturn/ns2:parameter
of the addPPActions output variable to requestParameters/ns2:parameter
of the setStepsArgs input variable, just as in previous examples.
In the BPEL process you add an invoke activity to perform the Oracle Enterprise Scheduling Service web service submitRecurringRequest()
operation. In this step you need to select the input and output for the Invoke Activity by associating values with the input and output variables.
To add the Invoke activity use setStepsArgs operation:
In the Application Navigator, in Project1 expand SOA Content and select the BPEL file. For example, select BPELProcess1.bpel. This displays the BPEL swim lane.
From the Component Palette, drag-and-drop an Invoke Activity and place the activity before callbackClient.
Select the Invoke activity and double-click the name Invoke_1
to select the text entry field. In the text entry field enter setStepsArgs
.
Link the invoke activity to the ESSWebService by selecting the right arrow and dragging it to the Partner Link Service1. This brings up the Edit Invoke dialog.
In the Edit Invoke dialog, in the Operation field select setStepsArgs as shown in Figure 11-33.
In the Edit Invoke dialog, in the Input field click the Add icon. This displays the Create Variable dialog.
In the Create Variable dialog, click OK.
In the Edit Invoke dialog, in the Output field select the Add icon. This displays the Create Variable dialog.
In the Create Variable dialog, click OK.
In the Edit Invoke dialog, click OK. This displays the new invoke link to Service1.
From the Component Palette, drag-and-drop a Transform Activity and place the activity before the setStepsArgs. This transformation maps the BPEL flow input variable to the setStepsArgs input variable.
Open the transformation activity. On the Transformation tab, in the Source area click the Add icon. This displays the Source Variable dialog.
In the Source Variable dialog select inputVariable and click OK.
In the transformation activity, on the Transformation tab in the Target Variable field select setStepsArgs_setStepsArgs_InputVariable as the target.
In the transformation activity, on the Transformation tab in the Mapper File field, click Add to create a new mapper file. This displays the XSL transformation file.
Create mappings as shown in Figure 11-34 using the mappings shown in Example 11-5.
Create an assignment activity. In this example, we want the requestParameters to come from the previous step, addPPActions, overriding what is in the transformation. There remainder of the input still comes from the BPEL flow input variable. Assign the requestParametersReturn/ns2:parameter of the addPPActions output variable to the requestParameters/ns2:parameter of the setStepsArgs input variable, just as in previous examples.
Example 11-5 Mapping Transformation for Set Steps Arguments Operation
<?xml version="1.0" encoding="UTF-8" ?> <?oracle-xsl-mapper <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. --> <mapSources> <source type="WSDL"> <schema location="../BPELProcess1.wsdl"/> <rootElement name="BPELProcess1ProcessRequest"namespace="http://xmlns. oracle.com/EssWebApplication/Project1/BPELProcess1"/> </source> </mapSources> <mapTargets> <target type="WSDL"> <schema location="../Service1.wsdl"/> <rootElement name="setStepsArgs" namespace="http://xmlns.oracle.com/scheduler"/> </target> </mapTargets> <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.0.0(build 090113.2000.2412) AT [FRI FEB 06 10:56:22 PST 2009]. --> ?> <xsl:stylesheet version="1.0" xmlns:xpath20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services. functions.Xpath20" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:client="http://xmlns.oracle.com/EssWebApplication/Project1/BPELProcess1" xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services. functions.ExtFunc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue" xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:med="http://schemas.oracle.com/mediator/xpath" xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service. common.functions.GetRequestHeaderExtnFunction" xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath" xmlns:tns="http://xmlns.oracle.com/scheduler" xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath. XRefXPathFunctions" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://xmlns.oracle.com/scheduler/types" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:socket="http://www.oracle.com/XSL/Transform/java /oracle.tip.adapter.socket.ProtocolTranslator" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" exclude-result-prefixes="xsi xsl client plnk xsd ns0 wsdl tns soap12 soap mime xpath20 bpws oraext dvm hwf med mhdr ids xdk xref ora socket ldap"> <xsl:template match="/"> <tns:setStepsArgs> <tns:requestParameters> <xsl:for-each select="/client:BPELProcess1ProcessRequest/client: requestParameters/ns0:parameter"> <ns0:parameter> <ns0:dataType> <xsl:value-of select="ns0:dataType"/> </ns0:dataType> <ns0:name> <xsl:value-of select="ns0:name"/> </ns0:name> <ns0:scope> <xsl:value-of select="ns0:scope"/> </ns0:scope> <ns0:value> <xsl:value-of select="ns0:value"/> </ns0:value> </ns0:parameter> </xsl:for-each> </tns:requestParameters> <xsl:for-each select="/client:BPELProcess1ProcessRequest/client:stepArgs"> <tns:stepArgsList> <xsl:for-each select="ns0:arguments"> <ns0:arguments> <xsl:value-of select="."/> </ns0:arguments> </xsl:for-each> <ns0:NLSOptions> <ns0:language> <xsl:value-of select="ns0:NLSOptions/ns0:language"/> </ns0:language> <ns0:numericCharacters> <xsl:value-of select="ns0:NLSOptions/ns0:numericCharacters"/> </ns0:numericCharacters> <ns0:territory> <xsl:value-of select="ns0:NLSOptions/ns0:territory"/> </ns0:territory> </ns0:NLSOptions> <xsl:for-each select="ns0:PPActions"> <ns0:PPActions> <ns0:actionName> <xsl:value-of select="ns0:actionName"/> </ns0:actionName> <ns0:actionOrder> <xsl:value-of select="ns0:actionOrder"/> </ns0:actionOrder> <xsl:for-each select="ns0:arguments"> <ns0:arguments> <xsl:value-of select="."/> </ns0:arguments> </xsl:for-each> <ns0:fileMgmtGroup> <xsl:value-of select="ns0:fileMgmtGroup"/> </ns0:fileMgmtGroup> <ns0:description> <xsl:value-of select="ns0:description"/> </ns0:description> <ns0:onError> <xsl:value-of select="ns0:onError"/> </ns0:onError> <ns0:onSuccess> <xsl:value-of select="ns0:onSuccess"/> </ns0:onSuccess> <ns0:onWarning> <xsl:value-of select="ns0:onWarning"/> </ns0:onWarning> </ns0:PPActions> </xsl:for-each> <ns0:stepPath> <xsl:value-of select="ns0:stepPath"/> </ns0:stepPath> </tns:stepArgsList> </xsl:for-each> </tns:setStepsArgs> </xsl:template> </xsl:stylesheet>
You can secure any of the Oracle Enterprise Scheduling Service web service operations using an Oracle Web Services Manager security policy.
For more information, see the "Securing and Administering WebLogic Web Services" chapter in the Oracle Fusion Middleware Security and Administrator's Guide for Web Services.
Securing the Oracle Enterprise Scheduling Service web service involves attaching one security policy to the method that calls the web service, and another to the asynchronous callback to the SOA composite.
Note:
Oracle Fusion Applications make use of an Oracle WSM feature called global policy attachments (GPA). Using GPA, policies are not attached locally, but are specified at a global level. At runtime, components simply inherit the global policy and Oracle WSM enforces it.Unlike local policy attachments (LPA), which need to be added at every web service client and server, global policy attachment (GPA) can be attached at a domain level. This makes it easy for the system administrator to have a uniform policy for all web services across the domain.
For more information about global policy attachments, see the "Securing Web Services Use Cases" chapter in the Oracle Fusion Applications Developer's Guide.
To secure the Oracle Enterprise Scheduling Service web service:
Open the SOA composite that calls the Oracle Enterprise Scheduling Service web service.
In the swim lane on the right, right-click the Oracle Enterprise Scheduling Service web service and select Configure WS Policies > For Request.
The Configure SOA WS Policies window displays.
In the Security field, click the add button to attach a security policy to the client.
Select the policy oracle/wss11_saml_token_with_message_protection_client_policy
or oracle/wss11_username_token_with_message_protection_client_policy
as shown in Figure 11-35, and click OK.
In the swim lane on the right, right-click the Oracle Enterprise Scheduling Service web service and select Configure WS Policies > For Callback.
The Configure SOA WS Policies window displays.
In the Security field, click the add button to attach a security policy to the callback method.
Select the policy oracle/wss11_saml_token_with_message_protection_service_policy
, as shown in Figure 11-36, and click OK.
Save your changes to the SOA composite file.
The security policy oracle/wss11_saml_token_with_message_protection_client_policy
secures the method that calls the Oracle Enterprise Scheduling Service web service. The security policy wss11_saml_token_with_message_protection_service_policy
secures the asynchronous callback method that the web service uses to call back the SOA composite.
Next, you deploy the BPEL process to the Oracle WebLogic Server as described in "Deploying SOA Composite Applications" in Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite. Following deployment, you can test the web service using Oracle SOA Console.
To test the web service:
Open a browser and go to the SOA Console at the following URL.
http://<machine>:<port>/soa-console
In the Applications area, select the deployed composite.
Click the Test dropdown and choose the service endpoint Test Client.
This an endpoint page where you can provide input to the BPEL process.
In the payload area, enter values for the job parameters.
Click Invoke.
Refresh the console page.
Click the latest instance ID to verify the progress of the BPEL file.