Nav
You are viewing an older version of this section. Click here to navigate to the latest version.

PeopleSoft Connector User Guide

Premium

The PeopleSoft Connector is a closed source connector that uses the Component Interface (CI) to communicate in real-time with the service. This is a component provided by Oracle’s People Tools.

Read more about Oracle’s PeopleTools.

Prerequisites

Because of how closely the connector is coupled with PeopleSoft, this document assumes you have:

  • A working knowledge of PeopleSoft.

  • Read the relevant documentation on Component Interfaces and Integration Scenarios for your PeopleTools version.

The definition and detailed explanation of the PeopleSoft terms and concepts used here are freely available in the PeopleBooks documentation set of your PeopleSoft installation.

This document assumes you are familiar with Mule, Anypoint Connectors, and Anypoint Studio Essentials. To increase your familiarity with Studio, consider completing one or more Anypoint Studio Tutorials. Further, this page assumes that you have a basic understanding of Mule flows and Mule Global Elements.

To use the PeopleSoft connector, you must have the following:

  • Anypoint Studio: if you don’t use Anypoint Studio for development, follow the instructions to install the PeopleSoft Maven dependencies into your pom.xml file .

  • Java 7: PeopleSoft connector does not work unless you are using JRE 1.7. Download JRE 1.7.

  • Component Interface: at least one Component Interface must be created and exposed within the PeopleSoft instance using the Application Designer.

  • PeopleSoft Java Object Adapter JAR File: the psjoa.jar library is compiled and provided by a PeopleSoft administrator, and is unique to each installation of PeopleSoft.

Component Interfaces (CI)

PeopleSoft’s Component Interfaces are a “one-way”, real-time interface to your PeopleSoft database instance. A component in PeopleSoft is a logical grouping of PeopleSoft pages representing a complete business transaction, such as Employee Onboarding. Component Interfaces expose the underlying APIs used by PeopleSoft Components and, therefore, ensure that validations, defaults, and business logic are preserved from the original definition of those components.

The Component Interfaces allow you to query PeopleSoft for specific records, update data, and create new instances of the records.

Attributes and Architecture

A component interface has the following four main attributes:

CI+archtecture

  • Component Interface Name: each component interface requires a unique name. The programs calling a component use the name of the component interface to access properties and methods. 

  • Keys (Get keys, Create keys, and Find keys): keys are special properties containing values that retrieve an instance (get keys) or a list of instances (find keys) of the component interface. You can add, remove, or change keys in PeopleSoft Application Designer. Keys are created automatically when you create a component interface.

    • Get keys: map to fields marked as search keys in the Components Search record.

    • Create keys: generated in CI when the Use tab on the Component Properties dialog allows the Add action.

    • Find keys: map to fields marked as both Alternate Search keys and Search Key in the Component Search Record.

  • Properties and Collections (Fields and Records): properties provide access to both component data and component interface settings. A property can correspond to a field or a scroll (collection). A component interface collection is a special type of property that corresponds to a scroll and contains fields and subordinate scrolls as defined in its underlying component. There are two types of properties:  

    • Standard properties are assigned automatically when a component interface is created. 

    • User-defined properties map to record fields on the PeopleSoft component and are displayed in the PeopleSoft Application Designer.

  • Methods: a method is a function that performs a specific task on a component interface at run time. There are two main types of methods: standard and user-defined.

    • Standard methods are those that are available for all component interfaces. The following are the standard methods that the connector supports:

      Method Description

      Create

      Add a new instance of the Component Interface to the PeopleSoft database. This is similar to clicking Add and entering the relevant keys through the PeopleSoft Web UI.

      Cancel

      Cancel an instance of the Component Interface. This is equivalent of the Cancel operation in the Web UI when working on a particular component.

      Find

      Search for any instances of the component that match the provided Search Keys. This returns a list of possible matches.

      Get

      Retrieve instances that match the specific keys you provide. This returns a single record or none at all.

      Save

      Save changes made to the component, new, or existing.

      The Save operation tries to update an existing record before creating a new one. For new records, the connector automatically populates the keys with default values provided by the PeopleSoft instance, thereby reducing the need for the user to provide the default key/values pairs.
    • User-defined methods are created in PeopleSoft Application Designer to provide added functionality to the component interface.

Read more about Oracle’s Component Interfaces.

Requirements

For Hardware and software requirements, please visit MuleSoft.com.

Dependencies

The PeopleSoft connector requires the following dependencies:

Application/Service Version

Mule Runtime

3.6.x or higher

PeopleSoft

9.2

PeopleTools

8.53.02 or higher

Java

1.7.0_x

Anypoint Studio

5.2 or higher

PeopleSoft 9.2 includes several modules, such as: Human Capital Management (HCM), Financial Management (FM), Enterprise Services Automation (ESA), Supplier Relationship Management (SRM), Customer Relationship Management (CRM) and Campus Solution (CS).

Installing and Configuring

To use the PeopleSoft connector in a production environment, you must have either:

  • An Enterprise license to use Mule.

  • A CloudHub Starter, Professional, or Enterprise account.

Contact the MuleSoft Sales Team to obtain either of these. Read more about Installing an Enterprise License.

Installing

To install PeopleSoft connector in Anypoint Studio, follow the steps below:

Anypoint Studio Install Window

  • Click Next and accept the License Agreement.

  • Restart Studio when prompted.

  • Now, the PeopleSoft connector should appear in your Studio Palette:

    Anypoint Studio palette - PeopleSoft Connector

Read more about Installing Connectors.

Configuring

To use the PeopleSoft connector in your Mule application, you must configure a global PeopleSoft element that can be used by all the PeopleSoft connectors in the application.

Read more about Global Elements.

Setting up the Global Configuration

  1. Click the Global Elements tab at the base of the canvas.

  2. On the Global Mule Configuration Elements screen, click Create.

  3. In the Choose Global Type wizard, expand Connector Configuration and select PeopleSoft: Configuration and click Ok.

    Global Element Configuration Wizard

  4. Configure the parameters according to instructions below.

    Global Element Configuration

    Field Description

    Name

    Enter a name for the configuration with which it can be referenced later.

    Server

    Enter the URL of the server from where to access the services. It must comply with the form of HOST:PORT.

    Username

    Enter a username to log in to the PeopleSoft instance.

    Password

    Enter the password to log in to the PeopleSoft instance.

    Required dependencies

    Click Add File to attach the psjoa.jar file that is compiled from your PeopleSoft instance to your project’s Build path. Learn how to compile the psjoa.jar file.

    Global Element - Required dependencies

    After the psjoa.jar file is attached, the file will appear in the lib/peoplesoft directory of your project’s root folder.

    Dependencies folder

    If you provide the wrong file (either an invalid psjoa.jar or a completely different library), Studio displays the following error message:

    Global Element - Invalid dependencies

    The psjoa.jar file is unique to each installation of PeopleSoft. It is compiled and provided by your PeopleSoft administrator. If the psjoa.jar isn’t provided to you, follow the steps below to build the component interface bindings:

    1. Start PeopleSoft Application Designer and open any Component Interface definition.

    2. Select Build > PeopleSoft APIs to launch the Build PeopleSoft API Bindings dialog box.

    3. Under the Java Classes group box, select the Build check box. Specify the target directory in which you want the Java class source files to be created.

    4. Click OK to build the selected bindings. The files that constitute the bindings are built in the location that you specify. If the operation is successful, a Done message appears in the PeopleSoft Application Designer Build window.

    5. Compile the generated APIs using the following commands:

    For Windows:

    cd %PS_HOME%\class\PeopleSoft\Generated\CompIntfc
    javac −classpath %PS_HOME%\class\psjoa.jar *.java
    
    cd c:\pt8\class\PeopleSoft\ Generated\ PeopleSoft
    javac −classpath %PS_HOME%\class\psjoa.jar *.java

    For Mac/Linux:

    cd $PS_HOME/class/PeopleSoft/Generated/CompIntfc
    javac classpath $PS_HOME/class/psjoa.jar *.java
    
    cd $PS_HOME/class/PeopleSoft/Generated/PeopleSoft
    javac classpath $PS_HOME/class/psjoa.jar *.java
    Read more about compiling the PeopleSoft API in Building APIs in Java.
  5. Keep the Pooling Profile and the Reconnection tabs with their default entries. Click Test Connection to receive a Connection Successful message. If you receive an error, try the following resolutions based on the error message:

    1. Unsupported major/minor version 51.0: Indicates that you are running with a 1.6 JRE. To resolve this, ensure that you are running with Java 1.7 and restart Studio.

    2. java.lang.NoClassDefFoundError: psft/pt8/joa/ISession and java.lang.ClassNotFoundException: psft.pt8.joa.ISession: This exception indicates that you haven’t installed the psjoa.jar file. To access PeopleSoft Component Interface in your Mule flows, you must add the PeopleSoft Component Interface API to your project. Compile the API using the PeopleSoft Application Designer Build Window and provide the archive name as psjoa.jar. To resolve the issue, go back to the Required dependencies panel and select the corresponding JAR file.

  6. Configure your Component Interface White List according to the steps below:

    1. Click Create Object manually and click the button next to it.

      Global Element - White List

    2. In the pop-up window, select the (+) plus button to set the names of your component interfaces.

      Global Element - Object Builder

    3. Right-click a metadata item and select Edit the selected metadata field to set the values. You can also double-click each item to modify the value inline.

      Global Element - Object Builder Item

    4. Click OK to save the list.

  7. Click OK to save the global connector configurations.

  1. Ensure you have included the PeopleSoft namespaces in your configuration file.

    <mule xmlns="http://www.mulesoft.org/schema/mule/core"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:peoplesoft="http://www.mulesoft.org/schema/mule/peoplesoft"
          xsi:schemaLocation="
                   http://www.mulesoft.org/schema/mule/core
                   http://www.mulesoft.org/schema/mule/core/current/mule.xsd
                   http://www.mulesoft.org/schema/mule/peoplesoft
                   http://www.mulesoft.org/schema/mule/peoplesoft/current/mule-peoplesoft.xsd">
    
          <!-- here go your flows and configuration elements -->
    
    </mule>
  2. Create a global element for PeopleSoft configuration using the following global configuration code:

    <peoplesoft:config name="PeopleSoft" server="${mule.peoplesoft.server}" username="${mule.peoplesoft.username}" password="${mule.peoplesoft.password}" doc:name="PeopleSoft">
    Parameter Description

    name

    Enter a name for the configuration with which it can be referenced later.

    server

    Enter the URL of the PeopleSoft instance.

    username

    Enter a username to log into PeopleSoft.

    password

    Enter the password.

    doc:name

    The default value is PeopleSoft.

  3. Configure your Component Interface. Find the internal tag <peoplesoft:component-interface-ids-white-list ref="#[payload]"/> and replace it with the following code snippet:

    &lt;peoplesoft:component-interface-ids-white-list&gt;
        &lt;peoplesoft:component-interface-ids-white-list&gt;
            COMPONENT_INTERFACE_NAME_1
        &lt;/peoplesoft:component-interface-ids-white-list&gt;
        &lt;peoplesoft:component-interface-ids-white-list&gt;
            COMPONENT_INTERFACE_NAME_2
        &lt;/peoplesoft:component-interface-ids-white-list&gt;
    &lt;/peoplesoft:component-interface-ids-white-list&gt;
  4. Save the changes made to the XML file.

Upgrading From an Older Version

From 1.x.x to 2.0.0

Inside your flow, identify the peoplesoft:invoke-operation tag. It should look similar to the following snippet:

<peoplesoft:invoke-operation config-ref="PeopleSoft" doc:name="Find" type="CI_PERSONAL_DATA##Find"/>
  • Replace the parameter type with key.

  • Replace the operation symbol ## (double hash) with || (double pipe).

The final result should look like the following snippet:

<peoplesoft:invoke-operation config-ref="PeopleSoft" doc:name="Find" key="CI_PERSONAL_DATA||Find"/>

Using The Connector

PeopleSoft connector is an operation-based connector, which means that when you add the connector to your flow, you need to configure a specific operation, Invoke Component Interface, for the connector to perform. After you call the Invoke Component Interface, you can use the Component Name field to select a particular Component Interface and the Operation field to specify the method that you want it to execute. PeopleSoft connector allows you to perform five standard operations (Create, Find, Get, Save, Cancel) on each Component Interface (if available in your PeopleSoft instance), along with any CI-specific custom operations.

Use Cases and Demos

Listed below are the most common use cases for the PeopleSoft connector:

Find Employees

Retrieves one or more Employee records by invoking the Find operation of CI_PERSONAL_DATA

Get Employee

Retrieves the complete information of a single Employee Personal Data record by invoking the Get operation of CI_PERSONAL_DATA.

Save Employee

Updates the fields of a single Employee Personal Data record by invoking the Save operation of CI_PERSONAL_DATA Component Interface.

Save Employee From CSV File

Updates a single Employee Personal Data record by invoking the Save operation of CI_PERSONAL_DATA Component Interface.

Save Position From CSV File

Updates a single Position Data record by invoking the Save operation of CI_POSITION_DATA Component Interface.

Tips

Test the Connection

Use the Test Connection feature to validate not only the connection to the PeopleSoft instance, but also the Component Interfaces defined in the White List.

  1. Open the PeopleSoft Global Element Configuration.

  2. Click the Test Connection button. If one ore more Component Interfaces names are invalid, you will get an error message.

  3. To solve this issue, just click the […​] button next to the Create Object manually option and provide the correct name for the Component.

DataSense Timeout

Avoid DataSense Timeout

The metadata retrieval for the Save operation takes longer than the rest of the operations. Therefore, Studio might throw a timeout exception with the message: "Problem while fetching metadata. The operation timed out and was not successful. You can configure this timeout in the Studio Preferences dialog."

DataSense Timeout

  1. Go to Windows > Preferences.

  2. Expand the Anypoint Studio menu and select DataSense.

  3. Set the option DataSense Connection Timeout (in seconds) to 120.

  4. Click Apply.

  5. Click OK.

DataSense Timeout Config

If you click the Refresh metadata link in your flow settings and wait a few moments, the metadata for the Save operation should now be correctly populated.

DataSense Timeout Fix

Adding to a Flow

  1. Create a new Mule Project in Anypoint Studio.

  2. Add a suitable Mule Inbound Endpoint, such as the HTTP listener or File endpoint, to begin the flow.

  3. Drag and drop the PeopleSoft Connector onto the canvas.

  4. Click on the connector component to open the Properties Editor.

    Flow Settings

  5. Configure the following parameters:

    Field Description

    Basic Settings

    Display Name

    Enter a unique label for the connector in your application.

    Connector Configuration

    Connect to a global element linked to this connector. Global elements encapsulate reusable data about the connection to the target resource or service. Select the global PeopleSoft connector element that you just created.

    Operation

    Select Invoke Component Interface from the drop-down menu.

    General

    Component Name

    Select the ID of the Components Interface you want to work with.

    Operation

    Select the operation you want to perform on the Component Interface previously defined. The PeopleSoft Connector lets you execute five standard operations on each Component Interface along with any CI-specific custom operations: Cancel, Create, Find, Get, Save.

    Payload

    • None: Select this option if the input parameters are not required for the operation.

    • From Message: Select this option to define the operation based on the incoming payload.

    • Create Object manually: Select this option to define the search values manually. Mule provides an editor to facilitate this task.

  6. Save your configurations.


Example Use Case

Retrieve a collection of employee records.

Find Employees Flow

  1. Create a new Mule Project in Anypoint Studio.

  2. Create a peoplesoft.properties file to hold your PeopleSoft credentials and place it in src/main/resources.

    
           
                   
                
    1
    2
    3
    4
    5
    6
    
    config.server=&lt;HOST:PORT&gt;
    config.username=&lt;USERNAME&gt;
    config.password=&lt;PASSWORD&gt;
    config.componentInterfaceEditHistoryItems=&lt;TRUE_OR_FALSE&gt;
    config.componentInterfaceInteractiveMode=&lt;TRUE_OR_FALSE&gt;
    config.componentInterfaceGetHistoryItems=&lt;TRUE_OR_FALSE&gt;
  3. Configure a Property Placeholder component and set the path to your credentials file.

    &lt;context:property-placeholder location="peoplesoft.properties"/&gt;
  4. Drag a HTTP endpoint onto the canvas and configure the following parameters:

    Parameter Value

    Display Name

    HTTP

    Connector Configuration

    If no HTTP element has been created yet, click the plus sign to add a new HTTP Listener Configuration and click OK (leave the values to its defaults).

    Path

    /find

  5. Drag the PeopleSoft connector next to the HTTP endpoint component and configure it according to the steps below:

    1. Add a new PeopleSoft Global Element by clicking the plus sign plus icon next to the Connector Configuration field.

    2. Configure the global element according to the table below:

      Parameter Description Value

      Name

      Enter a name for the configuration with which it can be referenced later.

      <Configuration_Name>

      Server

      The URL of the PeopleSoft instance

      ${config.server}

      Username

      The username credential to log into the PeopleSoft instance

      ${config.username}

      Password

      The password credential to log into the PeopleSoft instance

      ${config.password}

      Required dependencies

      Click Add File to attach the psjoa.jar file that is compiled from your PeopleSoft instance to your project’s Build path. Learn how to compile the psjoa.jar file.

      Server, Username and Password use property placeholder syntax to load the credentials in a simple and reusable way. Read more about this practice at Configuring Properties.
      &lt;peoplesoft:config name="PeopleSoft" server="${config.server}" username="${config.username}" password="${config.password}" doc:name="PeopleSoft"&gt;
  6. Click Test Connection to confirm that Mule can connect with the PeopleSoft instance. If the connection is successful, click OK to save the configurations. Otherwise, review or correct any incorrect parameters, then test again.

  7. Back in the properties editor of the PeopleSoft connector, configure the remaining parameters:

    Parameter Value

    Basic Settings

    Display Name

    Find Employees (or any other name you prefer).

    Connector Configuration

    PeopleSoft (the reference name to the global element you have created).

    Operation

    Invoke Component Interface

    General

    Component Name

    CI_PERSONAL_DATA (the component interface name that holds the employee data).

    Operation

    Find

  8. Check that your XML looks as follows:

    &lt;peoplesoft:invoke-operation config-ref="PeopleSoft" key="CI_PERSONAL_DATA||Find" doc:name="Find Employees" /&gt;
    Attribute Value

    config-ref

    PeopleSoft

    key

    CI_PERSONAL_DATA||Find

    doc:name

    Find

  9. Add a Transform Message (DataWeave) element between the HTTP endpoint and the PeopleSoft endpoint to map the structure required by the FIND method. (Alternatively, you may use a DataMapper element in place of a DataWeave element.) If DataSense is enabled, the input fields should be automatically populated:

    DataWeave - Input

  10. The input parameters expected by the FIND operation are:

    PeopleSoft Field Query Param Optional?

    KEYPROP_EMPLID

    id

    yes

    PROP_NAME

    name

    yes

    PROP_LAST_NAME_SRCH

    last_name

    yes

    PROP_NAME_AC

    name_ac

    yes

  11. Inside the DataWeave code, you can use a MEL expression to define a HTTP Query Param for all the fields. This way, each value can be dynamically set from the URL.

    DataWeave - Map To CI_PERSONAL_DATA

    
           
                   
                
    1
    2
    3
    4
    5
    6
    7
    8
    9
    
    %dw 1.0
    %output application/java
    ---
    {
            KEYPROP_EMPLID: inboundProperties['http.query.params'].id,
            PROP_NAME: inboundProperties['http.query.params'].name,
            PROP_LAST_NAME_SRCH: inboundProperties['http.query.params'].lastname,
            PROP_NAME_AC: inboundProperties['http.query.params'].nameac
    }
    Read more about MEL notation in Mule Expression Language Examples.
  12. Add an Object to JSON transformer after the PeopleSoft element to display the response in the browser.

  13. Add a Logger scope after the JSON transformer to print the data that is being passed to the PeopleSoft connector in the Mule Console. Configure the Logger according to the table below.

    Parameter Value

    Display Name

    Employee List (or any other name you prefer)

    Message

    #[payload] (the output from DataWeave)

    Level

    INFO

Example Use Case Code

Paste this code into your XML Editor to quickly load the flow for this example use case into your Mule application.


     
             
          
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;mule xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw" xmlns:context="http://www.springframework.org/schema/context"
      xmlns:http="http://www.mulesoft.org/schema/mule/http"
      xmlns:data-mapper="http://www.mulesoft.org/schema/mule/ee/data-mapper"
      xmlns:json="http://www.mulesoft.org/schema/mule/json"
      xmlns:file="http://www.mulesoft.org/schema/mule/file"
      xmlns:peoplesoft="http://www.mulesoft.org/schema/mule/peoplesoft"
      xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
      xmlns:spring="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.mulesoft.org/schema/mule/core"
      version="EE-3.7.0"
      xsi:schemaLocation="http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-current.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/peoplesoft http://www.mulesoft.org/schema/mule/peoplesoft/current/mule-peoplesoft.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd
http://www.mulesoft.org/schema/mule/ee/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd"&gt;
        &lt;context:property-placeholder location="peoplesoft.properties"/&gt;
        &lt;spring:beans&gt;
        &lt;spring:import resource="classpath:DemoSpringBeans.xml"/&gt;
    &lt;/spring:beans&gt;
    &lt;peoplesoft:config name="PeopleSoft" server="${config.server}" username="${config.username}" password="${config.password}" doc:name="PeopleSoft"&gt;
        &lt;peoplesoft:component-interface-ids-white-list&gt;
            &lt;peoplesoft:component-interface-ids-white-list&gt;CI_PERSONAL_DATA&lt;/peoplesoft:component-interface-ids-white-list&gt;
            &lt;peoplesoft:component-interface-ids-white-list&gt;CI_POSITION_DATA&lt;/peoplesoft:component-interface-ids-white-list&gt;
        &lt;/peoplesoft:component-interface-ids-white-list&gt;
        &lt;reconnect count="3"/&gt;
    &lt;/peoplesoft:config&gt;
    &lt;asynchronous-processing-strategy name="Asynchronous_Processing_Strategy" maxThreads="5" minThreads="2" threadTTL="10" poolExhaustedAction="WAIT"
                                      doc:name="Asynchronous Processing Strategy"/&gt;
    &lt;http:listener-config name="HTTP_Listener" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/&gt;
    &lt;file:connector name="File" autoDelete="true" streaming="true" validateConnections="true" doc:name="File"/&gt;
    &lt;data-mapper:config name="Employee_Position_Data_to_CI_POSITION_DATA" transformationGraphPath="employee_position_data_to_ci_position_data.grf"
                        doc:name="Employee_Position_Data_to_CI_POSITION_DATA"/&gt;
    &lt;data-mapper:config name="Employee_Data_to_CI_PERSONAL_DATA" transformationGraphPath="employee_data_to_ci_personal_data.grf"
                        doc:name="Employee_Data_to_CI_PERSONAL_DATA"/&gt;

    &lt;flow name="Find_Employee_Flow"&gt;
        &lt;http:listener config-ref="HTTP_Listener" path="/find" doc:name="HTTP"/&gt;
        &lt;dw:transform-message doc:name="Map To CI_PERSONAL_DATA"&gt;
            &lt;dw:set-payload&gt;&lt;![CDATA[%dw 1.0
%output application/java
---
{
        KEYPROP_EMPLID: inboundProperties['http.query.params'].id,
        PROP_NAME: inboundProperties['http.query.params'].name,
        PROP_LAST_NAME_SRCH: inboundProperties['http.query.params'].lastname,
        PROP_NAME_AC: inboundProperties['http.query.params'].nameac
}]]&gt;&lt;/dw:set-payload&gt;
        &lt;/dw:transform-message&gt;
        &lt;peoplesoft:invoke-operation config-ref="PeopleSoft" key="CI_PERSONAL_DATA||Find" doc:name="PeopleSoft"/&gt;
        &lt;json:object-to-json-transformer doc:name="List&amp;lt;CI_PERSONAL_DATA&amp;gt; To JSON"/&gt;
        &lt;logger level="INFO" doc:name="Employee List" message="#[payload]"/&gt;
    &lt;/flow&gt;
&lt;/mule&gt;

Run Time

  1. Save and run the project as a Mule Application.

  2. Open a web browser and check the response after entering the URL http://localhost:8081/find?id=MULE&name=&last_name=&name_ac=. If in your PeopleSoft database there are records whose KEYPROP_EMPLID contains the value "MULE", you should get a JSON collection with those records. Otherwise, you receive an empty collection.


          
       
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[
    {
    "KEYPROP_EMPLID": "MULE0001",
    "PROP_NAME": "Muley",
    "PROP_LAST_NAME_SRCH": "The Mule",
    "PROP_NAME_AC": ""
    },
    {
    "KEYPROP_EMPLID": "MULE0002",
    "PROP_NAME": "Second Muley",
    "PROP_LAST_NAME_SRCH": "The Backup Mule",
    "PROP_NAME_AC": ""
    },
    ...
]
In this example, all input parameters for the FIND operation are optional. If none of them defined (http://localhost:8081/find?id=&name=&last_name=&name_ac=), then PeopleSoft will retrieve the first 300 records available (the maximum limited by the server).

Demo

You can download a fully functional example from this link.

See Also