You want to fetch the employee details from Workday. You need to configure an XML request and then connect to Workday through a service call using the Get Worker Details operation to fetch the employee details from Workday.
In this example, configure a service call to perform the Get Worker Details operation to read the employee information, such as first name, last name, and date of birth, based on the Workday employee ID.
To read the employee information from a Workday source, perform the following steps:
1Create a Workday connection in Application Integration.
2Configure the input and output fields required to read worker details from Workday.
3Assign values to the fields in the process.
4Configure a Workday service call in the process.
5Specify the elements required in the response XML.
6Run the process.
The following image shows the configured process on the canvas:
Step 1: Create a Workday connection
Create a Workday connection in Application Integration to connect to Workday. Configure the connection to use the Get Workers operation in Workday. Use the connection in a process to access the employee details.
You can create a Workday connection from the Design Home page in the Process Designer.
1Select New > Connection.
2Select Workday V2 as the Type.
3Enter a name and description for the connection.
4Enter the Secure Agent on which the connection must run.
5Enter the Workday connection properties.
The OData Enable option is not applicable for Workday connection.
6Test the connection.
7Save and publish the connection.
You can click the Metadata tab to view the Workday metadata that the connection accesses in Workday.
Step 2: Configure the input and output fields
Assign the input fields that you want to pass in a request to Workday and then specify the output fields that you want the Workday service to return.
1To create a request input field to read worker details from Workday, perform the following steps:
aSpecify an input field name, iGetworkersRequest.
bFrom the list, select WD.
cSelect Get_Workers_RequestType.
2Specify the worker ID in Workday for which you want to capture the employee details. To add the iwid input variable, select Text option.
The following image shows the input fields that you need to create:
3Specify the Workday output fields, oFirstname, oLastname, and oDateofBirth, to capture the first name, last name, and date of birth of the employee.
The following image shows the output fields that you need to create:
Step 3: Assign values to the input and output fields
After you create the input and output fields, assign values to input and output fields for the Get Workers Request operation. Use the Assignment Step to set the value to the fields.
Configure the Assignment step to add the Workday input variable field iGetworkersRequest.
1To create an Assignment Step, click on the Assignments tab.
2Click Add Field to assign Target and Value for the field. Provide name iGetworkersRequest and select Formula as the Value of the iGetworkersRequest input field.
The following image shows the assignment of the iGetworkersRequest input field:
3In Expression Editor, select the iGetworkersRequest in the Fields tab.
4Specify the input values for the Worker Reference ID Type as WID and the value for the WID to read the employee information from the Workday input variable.
The following image shows the request XML for the Get Workers operation:
Step 4: Configure a service call
Create a Workday service call in the Process Designer to use the Workday connection that accesses the Get Workers operation.
1Configure the Service step in the process to configure the input to the Workday input parameter.
The following image shows the Service step configuration:
2Configure the input field in the Service step to read from the Workday input variable. Perform the following steps:
aAdd a Get_Workers input field, Get_Workers_Request.
bOn the Input Fields tab, select Field as the source of the Workday input field value, and then select the iGetWorkersRequest input field.
The following image shows the configuration of the input field in the Service step:
Step 5: Select the fields in the Workday response
The configured Get Workers request returns a Workday response. Add fields that you require in the response structure from Workday.
To add the fields, perform the following steps:
1Create an Assignment Step.
2Click Add Field to assign the following names and specify Field as the source value for each of the fields.
- oFirstname
- oLastname
- oDateofBirth
3Select the corresponding paths from where you want to fetch the data from a specific level in the hierarchy tree.
The following image shows the configured fields in the response and their corresponding paths in the hierarchy:
Step 6: Run the process
After you save the process, the new process appears on the Processes tab.
1Click the Start tab in the Process Properties dialog box
2Enable the Allow anonymous access option.
3Select the process in the Design Home page and copy the Service URL.
4Use the Service URL to run the process.
The process runs and the Secure Agent fetches the employee details.