BPEL Process Consuming a Web Service Generated by Peoplesoft Component Interface
(PeopleTools 8.47)
BPEL Process Consuming a Web Service Generated by PeopleSoft Component Interface
(PeopleTools 8.47)
Purpose
In this tutorial, you learn how to generate a Web service
for a PeopleSoft component by using PeopleSoft Component Interface. You also
learn how to create, deploy, and test a BPEL process to consume the WSDL and
invoke the operations exposed by the PeopleSoft component interface. You use
PeopleTools 8.47 for performing this task.
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 processes. Any Component in PeopleSoft
can be quickly and easily exposed as a Web Service. A PeopleSoft Web Service
exposes the same data and business logic as its on-line UI-based counter part.
This exposure is accomplished by creating a Component Interface (CI) to an existing
PeopleSoft Component.
The creation of the Web Service definition (CI) is done in
the PeopleTools Application Designer. Security to the Web Service is granted
via the PeopleSoft Internet Architecture (PIA) based security pages. Not only
is the CI available at runtime but PeopleSoft also exposes the design-time counter
part (WSDL) for the CI via PIA.
In this tutorial, you select a component interface that
is available in a PeopleSoft application and generate a WSDL for the component
interface. Typically component interfaces are secured using Permission Lists
in PeopleSoft. Before generating a WSDL, you need to ensure that the component
interface is part of a Permission List and that you are authorized to invoke
it.
PeopleSoft Component Interfaces have authorization at
a granular operation level. Most component interfaces expose a set of default
operations such as find, create, get, and update. You will be adding the selected
component interface called CONTACT_CI_001 to a Permission List called CSSPA008
and then invoke the Get() operation on the Component Interface. You enable all
users to invoke the Get() operation, or in other words, grant full access to
any user on this operation. The Get() operation receives Person ID as parameter
and returns Person details. After getting the WSDL, you create a BPEL process
to consume the web service to invoke the operations on the Component Interface.
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.2). You
can download the software from Oracle Technology Network web site.
3.
Have access to PeopleSoft Portal 8.90 with PeopleTools
v8.47.
If you don't have the exact same setup
as shown in this tutorial, you have to identify a component that is exposed
as a Component Interface. An example could be PERSON_DATA component in the HR
module. After the component is exposed, you need to add it to a permission list,
and provide authorization for your user Id (or alternatively for everyone).
After performing this step follow the remaining steps provided in this tutorial.
Exposing a Component
Interface using Application Designer
.
1.
Open Application Designer. Click
File/New on the menu or the button and select Component Interface from
the ensuing list in order to create the Component Interface (CI) object.
2.
A dialog box appears requesting the name of the Component for which the
Component Interface is being built. Search for and select the CONTACTS_COM
Component.
3.
The ensuing queries as to whether the properties (fields) in the underlying
Component should be exposed in this new CI. Select "Yes".
4.
The properties (fields) and the standard methods for the Component are
ready to be exposed. Click File/Save on the menu or the save icon
and name it CONTACTS_CI_001 to save the new Component Interface.
Connect to your PeopleSoftt instance URL and log in using appropriate
credentials. As mentioned earlier, this tutorial uses a Peopelsoft Portal instance
as an example, and the screenshots follow the example. You may see different
data in your screenns if you are using a different application module such as
HR or Finance.
Open a browser and provide appropriate URL to access your
PeopleSoft instance. Login with your user id and click Sign In. In this
tutorial, we use VP1 as username and password.
Checking Security Access to the Component Interface
1.
In the PeopleSoft portal home page, scroll down the Enterprise Menu
list to expand the PeopleTools > Portal > Security
> Permissions & Roles node. Click the Permission Lists
item.
2.
Enter CSSPA008 in the begins with field and click Search
to search for this Permission List.
Note: Note that this Permission List CSSPA008 used as an example
in this tutorial may not be available with your PeopleSoft instance.
To view all Permission Lists that are available for your Instance, simply
click the Search button without entering any details in the begins
with field. Choose one of the Permission Lists to associate your
component Interface.
3.
In the search result page, click the next arrow button to scroll through
the available tabs.
4.
Click the Component Interfaces tab to view the PeopleSoft Component
Interface name list within the CSSPA008 Permission List. Observe
that the component interface CONTACT_CI_001 is already added
to the list due to a previous step performed in this tutorial. You can
always add any CI to a permission list using the + button adjacent to
the CI to be added, as shown in the screenshot below.
5.
Click the Edit link corresponding to component interface ID
CONTACT_CI_001to verify current permissions on it.
6.
Ensure that your CI has been granted full access as shown below to
give everyone access to this CI. If your method access is Full Acess
then click Cancel, as you are not making any changes here. If
it is not, grant Full Acess on all the methods listed and click
OK to save the changes.
7.
Click Cancel to Continue to navigate out of this page. Note
that you have not made any changes to CI permissions in the permission
list CSSPA008, you just viewed the existing permissions hence no changes
are required. If you are prompted as below, click Cancel.
The WSDL is exposed in PeopleTools/PORTAL/Integration Broker/Web Services/WSDL Generator. (Enterprise Integration Points). You are now ready to generate the WSDL for your CI.
1.
In the Enterprise Menu list on the left side frame of your browser
window, expand PeopleTools -> Portal -> Integration Broker
-> Web Services node. Click the WSDL Generator link.
2.
Search for the Component Interface you want to expose as Web Service
or simply click the Lookup Web Services icon to view all the available
web services (component interfaces) and select the component interface
of interest.
Click CONTACT_CI_001 from the Component Interface list.
Click Search to generate WSDL to the selected CI. Observe the
list of methods available with this web service.
3.
Clicking the WSDL hyperlink exposes the WSDL for this Component Interface
Web Service.
The WSDL file opens in a browser window. Click File > SaveAs in
the browser window to save this as a WSDL file to your local machine
(e.g. CONTACT_CI_001.WSDL) as this will be used by the BPEL processor
later in this tutorial to consume this web service.
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 SOA Suite 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.
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, 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.
Build and deploy a BPEL process to invoke PeopleSoft component services
1.
a.
In the Application Navigator tab in JDeveloper,
right click Applications and select New Application from
the popup menu.
b.
Name the applcation as BPELPSFT8.47 and
accept all default settings.
Click OK.
c.
Select Cancel in the Create Project dialog
box. You will create BPEL project in the next step.
d.
Rigt click the application node BPELPSFT8.47 that
is created in the previous step and select New Project from
popup menu.
e.
Select Projects from Categories >
General and BPEL Process Project from the list on the
right pane, Click OK.
f.
In the BPEL Project Creation Wizard, name BPEL
project as BPEL2PS and choose Sychronous BPEL Process
asTemplate type from the dopdown list. Click Next.
g.
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.
2.
a.
Create a PartnerLink for the component interface
exposed from 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 beneath the header Partner Links. Note
that both sides of the designer window have sections in which partner
links can be placed.
c.
Enter the partnerlink name as CONTACT_CI_001.
Note that this is the component interface/web service you selected
to be exposed through PeopleSoft Component Interface, in a previous
step.
Click the browser WSDL icon to locate the PSFT
WSDL you saved earlier.
d.
Click Yes to the popup window that asks
whether you want to create a new WSDL file.
e.
Ensure Partner LinkType is CONTACT_CI_001Soap_PL
and select Parnter Role as CONTACT_CI_001SoapRole.
Click OK.
3.
Create an invoke activity for the PartnerLink.
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 immediately after 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. Set the name as Invoke_PS. Click Browse
PartnerLinks... icon next to Partner Link field.
Select CONTACT_CI_OO1 entry. Click OK.
d.
Select the Get_CompIntfc_CONATCT_CI_001() operation
from the drop down list.
e.
Click the Automatically create input variable
(first icon) to the right of 'Input Variable' field.
f.
Accept the default value.
g.
Click the Automatically create Output variable
(first icon) to the right of 'Output Variable' field.
Accept the default value. Click OK.
h.
The result is as shown below:
4.
Change the inbound message type:
a.
In the Structure pane in the bottom left of JDeveloper
designer, expand BPEL Structure -> Message type -> Process
WSDL to see BPEL2PSRequesMessage. Highlight it and right
click.
b.
In the popup menu select Edit Message Type.
Highlight the current Message Part Payload and click the
Edit button.
c.
In the Edit Message Part popup window,click
the Browse Elements ... icon for Element selection.
d.
In the Type Chooser window, select Project
WSDL Files-> CONTACT_CI_001.wsdl -> Inline Schemas -> xsd:schema
-> Get_CompIntfc_CONTACT_CI_001, and click OK.
Click OK to close the resulting windows.
5.
Change the outbound message type
a.
In the Structure pane in the bottom left of JDeveloper
designer, expand BPEL Structure -> Message type -> Process
WSDL to see BPEL2PSResponseMessage. Highlight it and
right click.
b.
In the popup menu, select Edit Message Type.
Highlight the current Message Part Payload and click the
Edit button.
c.
In the Edit Message Part popup window,click
the Browse Elements ... icon for Element selection.
d.
In the Type Chooser window, select Project
WSDL Files-> CONTACT_CI_001.wsdl -> Inline Schemas -> xsd:schema
->Get_CompIntfc_CONTACT_CI_001Response.
Click OK in the resulting windows to finish
the task.
6.
Create the SecurityHeader variable
a.
Create a new vairable to set Security Headers
required to invoke the component interface from the BPEL Structure
window.
In the Structure pane in the bottom left of JDeveloper designer,
expand BPEL Structure->Variables->Process->Variables.
Rright click and select Create Variable.
b.
In the popup window, give the variable name as
SecurityHeader. Select Message Type radion option
and click the Browse Message Types ... icon to select appropriate
message type.
c.
In the Type Chooser window, expand Message
Types > Project WSDL Files > CONTACT_CI_001.wsdl > Message
Types> SecurityHeaders as the message type. Click
OK.
Click OK to finish the variable creation
process.
d.
Drag an Assign activity from the Component
Palette and drop it in the flow below the RecieveInput activity.
e.
Double click the Assign activity icon, and enter
the name as SetSecurityHeaders in the General tab.
f.
Select the Copy Operation tab, click Create
drop down list, and select Copy Operation.
g.
In the From pane, select Expression
from the Type drop down list , and enter the expression "CBARAN"
in the Expression section. This is the value for the username.
In the To pane, select Variable
from the Type drop down list . Select Process > Variables
> SecurityHeader > Parameter > ns2:Security > ns2:UsernameToken
> ns2:Username to set the username value.
h.
Now, set the password. Activate the Copy Operation
tab, click Create drop down list, and select Copy Operation.
i.
In the From pane, select Expression
from the Type drop down list , and enter the expression "CBARAN"
in the Expression section. This is the value for the password.
In the To pane, select Variable
from the Type drop down list . Select Process > Variables
> SecurityHeader > Parameter > ns2:Security > ns2:UsernameToken
> ns2:Password to set the password value.
Click OK.
7.
Create an assign activity to copy request data to the PeopleSoft web
service.
a.
Select Assign activity from the Component
palette > Process Activities section, and drag and drop it into
the design panel before Invoke_PS activity, so that we can
copy the input to the Invoke input variable.
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 list.
d.
Define the copy rule, copy InputVariable payload
to parameter:
In the From pane, expand Variables >
InputVariable. Select Payload entry.
In the To pane, expand and select Process
> Variables > Invoke_PS_Get__ComIntfc__CONTACT_CI_001_InputVariable
> Parameter.Click OK.
Click OK to close the Create Copy Rule
window. Click OK to close the Assign window.
8.
Create an assign 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_PS activity, so that
we can copy the Invoke output 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 the copy rule, copy InputVariable payload
to parameter:
In the From pane, expand and select Variables
> Invoke_PS_Get__ComIntfc__CONTACT_CI_001_OutputVariable
> Parameter.
In the To pane, expand and select Process
> Variables > OutputVariable > payload.Click
OK.
Click OK to close the Create Copy Rule
window. Click OK to close the Assign window.
9.
Set the SecurityHeader variable to the Invoke activity
a.
Double click the Invoke_PS activity.
b.
Select the Adapters tab, and click the
Browse Variables... icon to select the Input Header Variable.
c.
Select SecurityHeader, and click OK.
10.
Click saveall button from the menu to save the BPEL process.
11.
Validate, compie and deploy the BPEL process.
a.
In the JDeveloper Applications Navigator window,
select and right click the BPEL project BPEL2PS.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.
Test The
BPEL Process to invoke the PeopleSoft Component Interface Web Service.
1.
Log into BPEL console with userid/password as oc4jadmin/welcome1:
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 BPEL2PS is
available as one of the deployed BPEL Processes on the BPEL server. Click
OK.
Click the process you deployed.
Click the Initiate tab to initiate a testing instance, if it is
not already active.
2.
Click the XML source radio button.
Note: the default selection is HTML Form to initiate testing.
But in this tutorial, you use XML source code.
3.
In the default SOAP message text area, change the <ns1:PERSON_ID/>
to <ns1:PERSON_ID>00046</ns1:PERSON_ID>.
Note: This tutorial uses CONTACT_CI as the component interface.
There exists a record for Person in the system used for this tutorial,
for ID 00046. If you are using the same CI, you need to find a valid person
id on your system. If you are using a different CI, then you need to input
valid data to test your instance.
Click Post XML Message button.
Observe that the test returns the details in XML format for employee
#00046. Click the Visula Flow icon to view the flow pattern in the BPEL
process.
4.
Observe the inflow and outlow arrows in and out of the receiveInput and
Invoke_PS 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 00046 that is supplied through initiate test process.
Identify the variable names you set in a previous step while creating
the BPEL process.
5.
Return to the Visual Flow diagram window and click the Invoke_PS
icon in the visual flow.
Observe the XML message. A 2-way operation Get__CompIntfc__CONTACT_CI_001
has been invoked on partner CONTACT_CI_001 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 00046 and the second
operation is where the output variable received the response (Person details
corresponding to Person_ID 00046).
In this tutorial, you have learned to generate WSDL for
a component through PeopleSoft Component Interface. You also learned to create
a BPEL process that sets that component interface as a partner and to create
activities to retrieve data corresponding to the specified component from PeopleSoft
instance. You then learned to verify the results by invoking the BPEL process
activities through BPEL Console.