`

Integration with PeopleSoft Applications using Oracle SOA Suite 11g BPEL

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL

Table of Contents

1 LAB OVERVIEW ...... 3 2 GETTING STARTED ...... 4 2.1 Starting Oracle SOA Suite and JDeveloper ...... 4 3 CREATE THE BPEL PROCESS ...... 5 3.1 Create the BPEL Workspace and Project ...... 5 3.2 Create the PeopleSoft Partner Link...... 12 3.3 Create an Invoke activity ...... 15 3.4 Create an Assign activity ...... 18 3.5 Create a Transform activity ...... 20 3.6 Create the Business Rules ...... 23 3.7 Validating, Compiling and Deploying the BPEL Process ...... 37 4 TESTING ...... 39 4.1 Invoking the Component Interface Service from BPEL ...... 39 5 ADDITIONAL CREDIT ...... 41 5.1 BPEL Console ...... 41 5.2 JDeveloper ...... 41 5.3 PeopleSoft CI ...... 42

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL

1 Lab Overview

This lab demonstrates native Web services integration to PeopleSoft using Oracle BPEL Process Manager. There are two major mechanisms to integrate with PeopleSoft using Web services; one is using Component Interfaces (CI) and the other using Application Messaging. This lab focuses on Component Interfaces. Oracle BPEL Process Manager (and other products such as Enterprise Service Bus) can just as easily integrate with Application Messaging.

For more hands-on tutorials, check out the Oracle By Example Tutorials on the PeopleSoft and Fusion Middleware Best Practice Center on Oracle Technology Network: http://www.oracle.com/technology/tech/fmw4apps/peoplesoft

In this Lab:

• You will use a WSDL generated from a Component Interface for PeopleSoft HR component PERSONAL_DATA • The WSDL will be consumed by a BPEL Process • A BPEL Process will invoke the Get() operation within the WSDL and pass in Emp #. • The result will be a Sync response from PeopleSoft with Employee‘s Personal Data, containing only the fields we mapped out (using the transformation). • A business rule is then invoked to set the SecurityCheck flag depending on the employee‘s country of residence.

For the purpose of this lab, we have chosen not to secure the Component Interface (CI). However, in production environments, you would generally secure the CI, and the BPEL process would also then have to pass in and validate a userid and password combination.

The WSDL URL for PeopleSoft CI (PERSONAL_DATA) is pre-generated using the Provide Web Service Wizard in PIA (browser). The WSDL URL, which is an output of the wizard, is available for you to use for this lab. If you have time after your lab is complete, you may log into PeopleSoft to see how this was generated. There are instructions in the advanced credit section.

Software Used:

• PeopleSoft HCM 9.0 with PeopleTools 8.48 • Oracle SOA Suite version 11gR1 (available for download from OTN ) • Oracle JDeveloper version 11gR1 (available for download from OTN ) • All lab content and software are also available from FMW Best Practice Center for PeopleSoft at o http://www.oracle.com/technology/tech/fmw4apps/peoplesoft • Also check out FMW Best Practice Centers for E-Business Suite, Siebel and PeopleSoft o Web Search => Best Practice Center Siebel PeopleSoft E-Business Suite JD Edwards

The PeopleSoft server is connected to the local lab environment.

Questions:

• Nishit Rao [email protected] • Srikant Subramaniam [email protected]

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 3

2 Getting Started 2.1 Starting Oracle SOA Suite and JDeveloper

1. Enter the following in a command window. This will start up the WebLogic Admin and Managed servers automatically as shown in the next two screen shots.

cd C:\Oracle\Middleware\

start_all.cmd 180

Successful startup of the Admin Server.

Successful startup of the Managed Server

2. Verify that the Admin and Managed servers have started up as shown above.

3. Start K JDeveloper Studio 11.1.1.1.0

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 4 3 Create the BPEL Process 3.1 Create the BPEL Workspace and Project

1. Choose File > New

2. Select Applications in the Categories tree and SOA Application from the Items list. Click OK to continue.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 5

3. Name the Application as BPELPSFT . Click Next.

4. Enter EmplInfo as the Project Name. Click Next .

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 6 5. Select the Composite with BPEL template. Click Finish .

6. Set the Process Name to EmplInfo and select Synchronous BPEL Process as shown.

7. Click on the icon next to the Input field to browse the input elements.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 7 8. Click on the Import Schema File icon.

9. Click on the Browse Resources icon.

10. Locate the schema file in your folder (C:\FMW4Apps K LabFiles K PeopleSoft) and click OK .

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 8 11. Accept defaults on the next two screens by clicking OK.

12. Select GET_EMPLOYEE_INFORMATIONProcessRequest and click OK .

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 9 13. Click on the icon next to the Output field to browse the output elements.

14. Select GET_EMPLOYEE_INFORMATIONProcessResponse and click OK .

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 10 15. Click OK.

16. The BPEL process diagram should look as shown.

17. File > Save All to save your work.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 11 3.2 Create the PeopleSoft Partner Link

1. Drag and drop a PartnerLink activity from the BPEL Services drop down list to the designer window as shown.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 12 2. In the Create Partner Link window, enter the PeopleSoft WSDL URL in the WSDL File field and press the ENTER key. Oracle BPEL Process Manager will load WSDL from PeopleSoft repository.

The URL is:

http://hr848.us.oracle.com:7777/PSIGW/PeopleSoftServiceListeningConnector/ CI_CI_PERSONAL_DATA.1.wsdl

Note: This is case sensitive.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 13 3. The Name and Partner Link Type fields are automatically populated.

4. Select CI_CI_PERSONAL_DATA_Provider in the Partner Role field as shown below.

5. Click OK.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 14 3.3 Create an Invoke activity

1. Drag and drop an Invoke from the BPEL Activities and Components drop down list to the designer window (after the receiveInput activity) as shown.

2. Double-click the Invoke icon to open the Invoke window.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 15 3. In the Invoke window:

a. Set Invoke Name to Invoke_PSFT

b. Click on icon next to the Partner Link field and select CI_CI_PERSONAL_DATA.1

c. Click OK

d. Set Operation to CI_CI_PERSONAL_DATA_G. This is the Get () operation within the CI.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 16 e. Click on the icon next to the Input Variable text field to create a global variable for this activity. Accept defaults. Click Apply and then OK . f. Click on icon next to the Output Variable text field to create a global variable for this activity. Accept defaults. Click Apply , followed by OK .

g. Ensure your invoke window looks as shown. Click OK.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 17 3.4 Create an Assign activity

1. Drag and drop an Assign activity from BPEL Activities and Components drop down list to between the receiveInput and Invoke_PSFT activities as shown.

2. Double click on the recently added Assign icon.

3. Click on the General tab and enter CopyInput in the Name field.

4. Click Apply

5. Click the Copy Operation tab

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 18 6. Select Copy Operation from the drop down list.

7. Create the Copy Operation as shown. Click OK .

8. Click OK to close the Create Copy Rule window.

9. Click OK to close the Assign window.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 19 3.5 Create a Transform activity

1. Drag and drop a Transform activity from the BPEL Activities and Components drop down list to between the Invoke_PSFT and replyOutput activities.

2. Double-click the recently added Transform icon.

3. Click the General tab and Enter TransformOutput in the Name field.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 20 4. Click the Transformation tab and click on the icon to create a new transformation.

5. Select the Source Variable from the drop down list as shown. Click OK.

6. Select the Target Variable from the drop down list as shown. Click OK .

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 21 7. Click on the Source tab.

8. We will replace the existing mappings with the XSLT from a local file. In the Source window, Ctrl-A to select the entire text, followed by Ctrl-X to delete.

9. Open the TransformOutput.xsl file (located in your folder C:\FMW4Apps K LabFiles K PeopleSoft) using Notepad . ( Note: Do not use IE to open the XSL file. It has to be opened only with a text editor, such as Notepad.)

10. Ctrl-A to select the contents of the notepad file, followed by Ctrl-C to copy. Paste into the Source window using Ctrl-V.

11. Click on the Design tab to see the mappings.

12. Click File > Save All .

13. Go back to the BPEL Process by clicking on the EmplInfo.bpel tab

14. This completes the creation of the BPEL process.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 22 3.6 Create the Business Rules

In this section, we‘ll be adding a Business Rule to our BPEL process. The Rule will determine if a SecurityCheck flag will be set to —Yes“ or —No“ based on the employee‘s country of residence.

1. Open up —Composite.xml“ from your project space, this gives us a visual view of the project artifacts we have created thus far in our project,

=>

2. In keeping with the graphical development style, we drag and drop the —Business Rule“ component to the Components area (middle white pane) from the Service Components section.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 23 3. A Dialog box would automatically appear and this is where we define our new Business Rule. Name the Rule as SecurityCheckRule . Click on the button to define our Inputs and Outputs layouts of the Business Rule,

4. You may use your own inputs/outputs layout (a.k.a. XSD) in your environment, but for this lab, we have provided the XSD for you. Click on the Import Schema File icon.

5. Click on the Browse Resources icon.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 24

6. Locate the schema file at C:\FMW4Apps K LabFiles K PeopleSoft) and click OK.

7. Accept defaults on the next two screens by clicking OK.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 25

8. Select BusinessRuleInput and click on OK.

9. Select Output

10. Select BusinessRuleOutput and click on OK.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 26

11. Ensure your screen looks as follows. Click OK ,

12. We‘ve defined the inputs/output layout. Next, we will actually create the rules. Double-click the newly created — SecurityCheckRule “ yellow Component to open the Rule editor.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 27

13. Select Ruleset_1 and click on button to Create Rule, use the system generated name (—Rule_1“)

14. Now we need to modify the If and Then statements. Single-Click the — “ statement to highlight the edit area, and then Single-Click again. Select — BusinessRule Input .country “ from the drop-down list of values.

15. Keep Operator as — == “, then Single-Click on — “, and type in the static value of — USA “, including the double quotes. (Use the ENTER key instead of the Tab key to exit the data entry field).

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 28

16. In the THEN clause, Single-Click — “, and select — assert new “,

17. Click on — “, and select — BusinessRuleOutput “,

18. Click on — “ to bring up the Properties window. Double click on the — country “ row‘s —Value “ column and from the drop-down list select — BusinessRule Input .country “.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 29

19. Double click on the —securityCheckRequried“ row‘s —Value“ column and enter — YES “.

20. Repeat Steps 13-19, with the following changes:

• Choose the — != “ operator for step 15 • Enter —NO“ in step 19

21. Click File > Save All .

22. We‘ve finished creating our rule. Next, we need to incorporate the Rule into our BPEL flow. Go back to composite.xml (you can see the tab for it in the middle of the JDeveloper area).

23. Once there, Single-Click on the —EmplInfo“ Component, notice the two yellow arrows now appears (once you clicked on it), signifying the inputs and outputs to this component.

24. Now take a look at the —SecurityCheckRule“ Component, notice the blue arrow on the left of the box.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 30

25. Connect the EmplInfo BPEL component‘s "OUTPUT" Yellow arrow (the one on the right) to the SecurityCheckRule‘s blue "Input" arrow by clicking, holding and drag the line from one to another. The result should now looks like this,

26. Once you let go of your mouse, the resulting composite.xml should look like this.

27. We will next create a variable in the —Structure“ panel to hold our output variable that we will need to display on the screen. Go back to —EmlInfo.bpel“ tab.

28. Go to the lower left corner and find the — Structure “ box, and expand the — Variables “.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 31

29. Click on the to create a new variable, name it — SecurityCheck “, and select — Element “ type.

30. Click on the magnifying glass next to Element and choose then choose BusinessRuleOutput . Click OK, followed by another OK.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 32

31. Now you are ready to add the Business Rule to the BPEL flow. Drag and drop the Business Rule component from the Component Palette on the right-hand area to the location just after the —TransformOutput “.

32. Enter the name as SecurityCheck and select SecurityCheckRule from the Dictionary drop-down list.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 33

33. Once it‘s selected, you will need to assign the PeopleSoft Web Service‘s output —Country“ value to this Business Rule‘s input, so click on the —Assign Input Facts“ area‘s button.

34. Setup the Copy Operation:

From:

Variable > Invoke_PSFT_CI_CI_PERSONAL_DATA_G_OutputVariable > parameter > Get__CompIntfc__CI_PERSONAL_DATAResponse > COLL_ADDRESS_TYPE_VW > COLL_ADDRESSES > PROP_COUNTRY

To

com_globalcompany_ns_securitycheck_rules_BusinessRuleInput > BusinessRuleInput > Country

Click OK.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 34

35. Click on the —Assign Output Facts“ area‘s button, and map the outputs as shown. Click OK.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 35

36. (Similar to what we did in Section 3.4), drag and drop an Assign component from the Component Palette to just after the Business Rule component (SecurityCheck) in the BPEL flow. Name the step as —Assign_Display“ and set up the copy operation as shown.

37. This completes the Business Rule configuration and we are ready to deploy. Click File > Save All .

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 36

3.7 Validating, Compiling and Deploying the BPEL Process

1. The completed BPEL process should resemble the following figure.

2. Right-click the EmplInfo BPEL Project.

3. Select Deploy  EmplInfo  FMWApps as shown.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 37

4. Click OK on the next screen ( SOA Deployment Configuration Dialog ) to accept defaults and set off the compilation process (this could take a few minutes).

5. Enter username/password ( weblogic/welcome1 ).

6. This will deploy the BPEL process to the local Application Server and could take a minute or two. Click on the Deployment tab (at the bottom of the screen) to view the progress.

7. Deployment was successful.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 38

4 Testing 4.1 Invoking the Component Interface Service from BPEL

1. Log into the Oracle Enterprise Manager Console at: http://localhost:7001/em

2. The default Username is weblogic and the default Password is welcome1

3. Click on the EmplInfo process in the SOA Deployments.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 39 4. Click on the Test tab to initiate a test instance.

5. Enter PU001 in the input field and click on Test Web Service. (Other valid inputs are: PJ001 œ PJ010, PN001 œ PN010).

6. The following is displayed for employee # PU001, indicating a successful invocation of the PeopleSoft CI. Note that SecurityCheck is set to YES according to the rules we defined.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 40 5 Additional Credit

5.1 BPEL Console

Go back to BPEL Dashboard and look at completed process instances.

Check the executed flow diagram of completed instances. Click on each step in the process to see the XML data flowing through the step. 5.2 JDeveloper

Explore the different activities you can use in a BPEL process.

Look at Process Activities and you will find an array of nodes to use. The Human Task flow node can be used to include human approval steps and assign tasks to people.

To further explore the XSL transformations, which were used earlier (in this lab):

1. Double click on Transformation_1.xsl

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 41

2. This brings up the graphical interface and the mappings are depicted as shown.

5.3 PeopleSoft CI

The goal here is to see how the WSDL is generated in PeopleSoft, and see the definitions for the PERSON_DATA CI.

1. Go to http://hr848.us.oracle.com:7777/psp/ps/?cmd=login and login as UID / PWD = PS / PS

2. Navigate to PeopleTools œ Integration Broker œ Web Services œ CI Based Services .

3. Enter % CI_PERS% as shown below. You will see a list of CI. Choose CI_PERSONAL_DATA. Click on the Search button at bottom.

4. Select the checkbox next to CI_PERSONAL_DATA and click on the Review CI Status button.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 42

5. Click on View Service Definition . This screen shows general service information, including its operations and messages.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 43

The Provide Web Service link allows you to generate the WSDL URL (which is what we used in BPEL Partnerlink).

We will not be running the wizard here as accidental changes could alter the configuration and prevent others from completing the lab.

At your leisure, you can go to PeopleSoft and FMW Best Practice Center on Oracle Technology Network and check out the hands-on tutorials. There-in you will find BPEL tutorials (and more) with detailed steps on PeopleSoft end of the configuration.

Integration with PeopleSoft Applications Using Oracle SOA Suite 11g BPEL 44