BPEL Process Consuming a Web Service Generated by Peoplesoft Component Interface
(PeopleTools 8.48)
BPEL Process Consuming a Web Service Generated by PeopleSoft Component Interface
(PeopleTools 8.48)
Purpose
In this tutorial, you learn how to expose a Web service and
generate corresponding WSDL for a PeopleSoft component by using PeopleSoft Component
Interface. You use PeopleTools 8.48 for performing this task. You also learn
how to create, deploy, and test a BPEL process to consume the WSDL and invoke
the exposed operations of the Web Service, using Oracle SOA Suite 10g BPEL Process
Manager.
Place the cursor over this icon to load and view all the screenshots for this tutorial.
(Caution: This action loads all screenshots simultaneously, so response time may be slow depending on your Internet connection.)
Note: Alternatively, you can place the cursor
over an individual icon in the following steps to load and view only the screenshot
associated with that step. You can hide an individual screenshot by clicking it.
Overview
This integration example highlights PeopleSoft as a Web Service
provider for use within Fusion Middleware BPEL Process Manager. BPEL PM is a
component of Oracle SOA Suite.
To expose a PeopleSoft Component as a web service, you first
need to generate Component Interface (CI) for the component. Many CIs are delivered
out of the box, and this number has increased with each release of PeopleSoft.
With PeopleTools 8.48 the process of generating WSDLs has been streamlined.
Refer to PeopleTools 8.48 documentation guides for additional details.
In this tutorial, you learn how to expose a Web service
for a PeopleSoft HR component PERSONAL_DATA by using its Component Interface
and to generate WSDL for the component interface. You learn how to create, deploy,
and test a BPEL process to consume the generated WSDL. This BPEL process invokes
the Get() operation within the Component Interface with Employee Number as input
parameter and returns corresponding Employee's Personal Data as synchronous
response.
Have installed Oracle SOA Suite 10g (10.1.3.1). You
can download the software from Oracle Technology Network web site.
2.
Have installed Oracle JDeveloper 10g (10.1.3.1). You
can download the software from Oracle Technology Network web site.
3.
Have access to HCM 9.0 with PeopleTools 8.48. You will
need to have your own local instance of PeopleSoft to run this tutorial.
The step by step procedure provided in this tutorial
refers to using PeopleTools 8.48. With a few modifications the same steps
should apply for any functional module running on PeopleTools 8.48. If
you are using a different module than HCM 9.0 (such as CRM or Financials),
you need to find an out of the box delivered Component Interface for that
module. You can use the PeopleSoft Interactive Service Repository (ISR)
hosted on Customer Connection (PeopleSoft support site) to discover interfaces
exposed by a particular realease of the product.
Open a browser and provide appropriate URL to connect to your PeopleSoftt
instance. Login with your user id and click Sign In. In this tutorial,
we use VP1 as username and password.
2.
Scroll down and click the PeopleTools link. Expand Integration
Broker > Configuration > Service Configuration. Verify the settings
on this page but don't make any changes. This information is used for
WSDL and SOAP endpoints as well as schema and service namespaces in a
later step in this tutorial.
3.
Navigate to PeopleTools > Integration Broker > Web Services
> CI-Based Services.
4.
Enter CI_PERSONAL_DATA in the Component Interface Name
field and click Search to search for the component interface. You can
use % symbol to enclose part of the string being searched for, as shown
in the following screenshot.
5.
Select the checkbox next to CI_PERSONAL_DATA and click the Review
CI Status button.
In the Review Status screen, observe the service name CI_CI_PERSONAL_DATA
and corresponding operations based on the component interface CI_PERSONAL_DATA.
Click the View Service Definition link to view detailed information
about the service.
This screen shows general service information of the service CI_CI_PERSONAL_DATA
including its operations and messages.
Note that none of the operations is Active. Ensure that the operations,
handlers, and routings for the service operation to be invoked are Active.
In the Existing Operations list > Operation.Default Version
column, click CI_CI_PERSONAL_DATA_G.V1.
6.
Set the default service operation as Active by selecting the Active
check box in the Default Service Operation Version section.
7.
Select the Handlers Tab to activate handlers on this service.
Change the status of the REQUESTHDLR handler to Active by
selecting Active from the Status drop-down list. Click Save.
Click OK in the Service Operation Saved pop-up box.
8.
Click the Routings tab to activate routings on this service.
To set the status for the selected Routing Definition to Active, select
the check box for the required routing definition and click the
Activate Selected Routings button.
Click OK in the "Service Operation Saved" pop-up box.
Click the Return to Service link from the bottom of the resulting
window.
9.
Notice that now status of the CI_CI_PERSONAL_DATA_G.V1 operation is
active (checked in the Status field). If you intend to use all the other
operations, this would be a good time to activate all by following the
above steps for actiating operations, handlers, and routing.
10.
To generate WSDL for the selected component, navigate to PeopleTools
> Integration Broker > Web Services > Provide Web Service
link in the left navigation menu.
The Provide Web Service Wizard starts. In Step 1, enter CI_CI_PERSONAL
in the Service Name search criteria field and click Search.
Service CI_CI_PERSONAL_DATA is displayed in the search result section.
Click Next.
11.
In Step 2 select the service operations you want to make available
for this web service. Even though you are going to use only the Get operation
(CI_CI_PERSONAL_DATA_G) in this tutorial, select the Select All
check box to make all operations available. (Note that the result set
you see on your screen may differ from that shown in the following screenshot.
You can scroll through the list of services using the left and right arrow
keys)
Click Next.
12.
In Step 3 review the web services to be created. To view the
generated WSDL, click View WSDL link corresponding to each Web
Service and click Return in the resulting window to return to the
Provide Web Service Wizard window. Click Next.
13.
In Step 4 you can optionally publish the web service to a UDDI
directory. You do not publish to UDDI registry in this tutorial. Click
Finish to generate WSDL for each selected service.
14.
The Confirm Results page displays a message that the service
has been exported and a corresponding WSDL has been inserted into the
repository. In the WSDL Generation log observe the generated WSDL URL
of the format http://<hostname>:7777/PSIGW/PeopleSoftServiceListeningConnector/CI_CI_PERSONAL_DATA.1.wsdl.
You will use this URL later in this tutorial to call this service from
BPEL Process Manager.
Open a notepad on your local machine. Copy the WSDL URL from the WSDL
Generation Log section and paste it in the notepad file. Save the file
as CI_CI_PERSONAL_DATA.1.wsdl to your local hard disk.
Note: You must save the WSDL URL into a notepad or some
other format at this point of time. If you do not save at this point,
you will need to run the wizard again to get this file.
With the above steps, you exposed a PeopleSoft Component Interface as
a web service. You can now invoke this web service for use with a wide
array of products. One of such examples of invoking it through BPEL process
is shown in the next sections of this tutorial.
Start SOA Suite: Click Start > Programs > Oracle-SOA >
Start SOA Suite.
2.
Start JDeveloper: Double click jdevw.exe file icon from the directory
where you installed JDeveloper.
3.
Create Application Server connection to your Oracle SOA Suite instance
from JDeveloper.
a.
In the Connection tab in JDeveloper designer,
right click on Application Server, Select New Application
Server Connection.
b.
The Application Server Connection wizard welcome
screen appears. Click Next.
c.
Step 1: Enter iAS10g as connection name.
d.
Choose Oracle Application Server 10g 10.1.3
from the Connection Type dropdown list. Click Next.
e.
Step 2: provide username as oc4jadmin
and password as welcome1. Click Next.
Note: Username and Password might be different
for your SOA instance. Use values appropriate for your instance
for the authorization/connection to be successful.
f.
Step 3: Configure server location and ports.
Choose to connect to signle instance.
Use localhost for Hostname and
home for OC4J Instance (or values as appropriate
to your SOA instance). The OPMN port number and OC4J instance
name can be found from Application Server control web page. The
port number is usually 6003 and OC4J name is ususally home.
Click Next.
g.
Step 4: Click Test Connection button to test
connectivity to SOA instance. After receiving the success information,
click Next.
If you observe error message, click Back
button and verify the values provided in the previous steps.
h.
Click Finish to exit the wizard and complete
the Application Server connection creation.
i.
In the connection tab in JDeveloper,
right click on Integration Server, Select New Integration
Server Connection.
j.
The Integration Server Connection wizard welcome
screen appears. Click Next.
k.
Step 1: Enter OBE_Interation as Integration
Server Connection name.
l.
Step 2: select iAS10g as the Application
Server from the dropdown list (Application Server name provided
in step c above), and confirm the Port Number. Note that the port
number is HTTP port number used to access SOA Suite web console.
Click Next.
m.
Step 3: Click Test Connection to test
the connectivity. After receiving the success information, click
Next.
If you observe error message, click Back
button and verify the values provided in the previous steps.
n.
Click Finish to close the wizard and
complete the Integration Server creation.
Start JDeveloper. If it has been started, skip
this step.
b.
In the Application Navigator tab in JDeveloper,
right click Applications and select New Application from
the popup menu.
c.
Name the applcation as PSFTHCM90 and accept
all default settings.
Click OK.
d.
Select Cancel in the Create Project dialog
box. You will create BPEL project in the next step.
e.
From the Application Navigator tab, right click
the application node PSFTHCM90 that is created in the previous
step and select New Project from popup menu.
f.
Select Projects from Categories >
General and BPEL Process Project from the list on the
right pane. Click OK.
g.
In the BPEL Project Creation Wizard, name BPEL
project as PersData and choose Sychronous BPEL Process
asTemplate type from the dopdown list. Click Next.
Click Finish in Input/Output Elements
page. You will define the input/output message type in a later step.
h.
Observe the BPEL process diagram in BPEL desiger
as shown below.
i.
To save your work click the Save All button
in JDeveloper menu bar.
2.
Create a Partner Link to invoke operations on the exposed Web Service
a.
Create a PartnerLink for the web service that
was exposed earlier through PeopleSoft.
From the BPEL Designer window, click Component
Palette and select Services menu from the dropdown list
to find PartnerLink selection.
b.
Drag and drop PartnerLink service onto
the designer panel anywhere in the Sercices section. Note
that both sides of the designer window have sections in which partner
links can be placed.
c.
Open file CI_CI_PERSONAL_DATA.1.wsdl you
saved in a previous step in this tutorial, copy the WSDL URL from
that file and paste it in JDeveloper Create Partner Link
window > WSDL Settings section > WSDL File field.
Press the ENTER key.
Note that the Name and Partner Link
Type fields are automatically populated. Select CI_CI_PERSONAL_DATA_Provider
in the Partner Role field as shown below:
Change Name of the partner link to CI_CI_PERSONAL_DATA.
Click OK.
3.
Create an Invoke activity to invoke operations on the Web Service
a.
In the Component Palette panel, select
Process Activities from the dropdown list and locate Invoke.
b.
Drag and drop an Invoke activity onto the
canvas below the receiveInput activity.
c.
Invoke window appears where you set properties
for this activity. If not, double click Invoke icon to open the
setting window.
a.
Set Invoke Name to Invoke_PersDataCI.
Click Browse PartnerLinks... icon next to Partner Link
field to open the Partner Link Chooser popup window.
b.
Select CI_CI_PERSONAL_DATA to create
the Partner Link and click OK.
You may select the + icon adjacent to CI_CI_PERSONAL_DATA
to expand the node and view the available operations on that
service. The loading process may take a long time.
c.
In the Invoke window, select CI_CI_PERSONAL_DATA_G
from the Operation drop down window. This is the Get()
operation exposed within the CI.
Note: This WSDL definition operation list
is retrieved from the PeopleSoft server through the WSDL URL
you provided in a previous step. Hence the response time to
load this inofrmation depends on your network connection and
availability of the PeopleSoft instance.
d.
Click the Automatically create input
variable (first icon) to the right of the Input Variable
text field to create a global variable for this activity.
Accept the Default values and click OK.
e.
Click the Automatically create Output
variable (first icon) to the right of the Output Variable
text field to create a global variable for this activity.
Accept the Default values and click OK.
Click OK to close the Invoke window.
4.
Change the Inbound MessageType
Now we change the BPEL process inbound MessageType to match the Partner
Link requesting message.
a.
In the Structure pane from bottom left frame of
JDeveloper window, expand BPEL Structure -> Message type ->
Process WSDL to see PersDataRequestMessage. Highlight
it and right click.
In the popup menu select Edit Message Type.
Note: If the Structure window does not appear,
select Structure from the View Menu. If that doesn't work, click
your mouse to a Partner Link swim lane to refresh the JDeveloper
windows.
b.
In the Edit Message Type popup window, highlight
the current Message Part Payload and click the Edit
button.
c.
In the Edit Message Part window,click
the Browse Elements ... icon for Element selection.
d.
In the Type Chooser window, expand Partner
Links -> CI_CI_PERSONAL_DATA -> CI_CI_PERSONAL_DATA.1.wsdl
-> Inline Schemas -> xsd:schema.
Select Get_CompIntfc_CI_PERSONAL_DATA.
Click OK
Click OK on all the resulting windows
to complete the task of setting inbound message type.
5.
Change the Outbound MessageType
Now we repeat the above steps for an outbound message type
a.
In the Structure pane from the bottom left frame
of JDeveloper, expand BPEL Structure -> Message type ->
Process WSDL to see PersDataResponseMessage. Highlight
it and right click.
In the popup menu select Edit Message Type.
b.
In the Edit Message Type window, highlight
the current Message Part Payload and click the Edit
button.
c.
In the Edit Message Part window,click
the Browse Elements ... icon for Element selection.
d.
In the Type Chooser window, expand Partner
Links -> CI_CI_PERSONAL_DATA -> CI_CI_PERSONAL_DATA.1.wsdl
-> Inline Schemas -> xsd:schema.
Select Get_CompIntfc_CI_PERSONAL_DATAResponse.
Click OK
Click OK on all the resulting windows to complete
the task of setting inbound message type.
6.
Create an Assign activity to copy request data to the PeopleSoft
Web Service
a.
Select Assign activity from the Component
palette > Process Activities section. Drag and drop it into the
design panel between the receiveInput and Invoke_PersDataCI
activities, so that the value received from the receiveInput activity
can be copied to an input variable that will be used by the Invoke
activity.
b.
Double-click the Assign icon that you
just dropped to view the Assign window. Click the Gerneral
tab, enter CopyInput in the Name field. Click Apply.
c.
Click Copy Operation tab, click Create,
and select Copy Operation from the drop down.
To:, expand and select Process >
Variables > Invoke_PersDataCI_CI_CI_PERSONAL_DATA_C_InputVariable
> Parameter.Click OK.
Click OK to close the Create Copy Rule
window. Click OK to close the Assign window.
7.
Create an Assign activity to copy response data from the PeopleSoft
Web Service
a.
Select Assign activity from the Component
palette > Process Activities section, and drag and drop it
into the design panel after the Invoke_PersDataCI activity,
so that the output from the invoke activity can be copied to an
Output variable.
b.
Double-click the Assign icon that you
just created, to view the Assign window. Click the Gerneral
tab, enter CopyOutput in the Name field, and click Apply.
c.
Click Copy Operation tab, click Create
and then select Copy Operation from the drop down list.
d.
Define your Copy Rule to match the following:
From: expand and select Variables >
Invoke_PersDataCI_CI_CI_PERSONAL_DATA_C_OutputVariable >
Parameter
To: Process > Variables > OutputVariable
> payload.
Click OK.
Click OK to close the Create Copy Rule
window. Click OK to close the Assign window.
8.
Click Save All button to save the BPEL project.
9.
Validate, compile and deploy the BPEL process.
a.
In the JDeveloper Applications Navigator window,
select and right click the BPEL project PersData.jpr you
just created. Select Deploy->OBE_Integration ->
Deploy to default domain.
b.
Observe a message in the message pane of JDeveloper
(at the right bottom of the window) that the deployment is successful.
You will see a BUILD SUCCESSFUL message in that window.
You can test your BPEL project by initiating a request from the BPEL
Console.
a.
Open a browser window and view the BPEL Console
(http://<hostname>:8888/BPELConsole or Start > All Programs
> Oracle SOA Suite > Oracle BPEL Process Manager > BPEL
Control) to verify that the process PersData is available
as one of the deployed BPEL Processes on the BPEL server. Login
using username/password appropriate to your SOA instance. Click
OK.
b.
In the Oracle Enterprise Manager 10g BPEL Control
window, click the PersData process from the Deployed BPEL
Processes list.
c.
This takes you to the Initiate tab of the PersData
BPEL Process where you will see a HTML form to initiate a test
instance. In this tutorial, You use the XML Source format instead
of HTML format. Click the XML Source radio button, which
creates a textarea to enter a XML message.
d.
In the SOAP message TextArea, replace the input
value entry <ns1:KEYPROP_EMPLID/>
entry with <ns1:KEYPROP_EMPLID>0043</ns1:KEYPROP_EMPLID>
The EMPLID is where you plug in PeopleSoft
Employee ID. This tutorial uses 0043 as an example which exists
in the sample HR system. You should use an ID that exists in your
local PeopleSoft HR instance.
Click the Post XML Message button.
e.
Observe that the test returns the personnel
details in XML format for employee 0043, indicating successful
execution of the Get__() operation of the selected Component Interface.
Scroll down the window and click the Visula
Flow icon to view the flow pattern in the BPEL process.
f.
Observe the inflow and outlow arrows in and out of the receiveInput
and Invoke_PersDataCI activities, in the visual flow. If you click
on those activities, you will be able to observe the request and
response information. Click the receiveInput icon in the
visual flow.
Observe the XML message where message payload has its input variable
assigned a value 0043 that is supplied through initiate test process.
Identify the variable names you set in a previous step while creating
the BPEL process.
g.
Return to the Visual Flow diagram window and click the Invoke_PersDataCI
icon in the visual flow.
Observe the XML message. A 2-way operation CI_CI_PERSONAL_DATA_G
has been invoked on partner CI_CI_PERSONAL_DATA that was created
as a partner link in the BPEL process in a previous step in this
tutorial.
The first operation is where the input variable is set to value
0043.
The second operation is where the output variable received the
response (Person details corresponding to ID 0043).
One variation of this tutorial is to set
security on Component Interfaces. This tutorial has not defined security for
the CI_PERSONAL_DATA component interface. In most production systems, each CI
would be secured with a Permission List. To work with such a system, you would
open the Permission List in PIA, to which the CI is attached to, and then grant
access to your user id. To learn how to set security using Permission Lists,
refer to Oracle By Example Tutorial BPEL Process Consuming a Web Service
Generated by PeopleSoft Component Interface (PeopleTools 8.47) or the tutorial
on the PeopleSoft Best Practice Center that describes the steps for PeopleTools
8.47 (CONTACT CI). The steps for 8.48 are similar.