Cloud Pak for Integration

Cloud Pak for Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only

App Connect Toolkit Integration with Workday REST API's 

Tue November 30, 2021 09:33 PM

Overview

This article shows how to build, configure, deploy, and run an App Connect Toolkit integration with the Workday system. The sample App Connect Toolkit flow will use Workday provided REST Staffing JSON swagger schema. The sample flow is a REST API that will retrieve Workday worker records.

Workday's JSON Swagger schemas can be downloaded from Workday community https://community.workday.com/sites/default/files/file-hosting/restapi/index.html. For this sample, i will be using the staffing.json, which contains Worker API's.

Workday Configuration

Register API Client for Integrations
Login to Workday, and search for "Register API Client for Integrations". Create one like below.


Make sure to select the Functional Areas that you are interested to integrate with, for example Staffing which contains API's related to the Workers. Also, make sure to add integration user wd-integration. 

Save ClientID, Secret. Obtain Refresh_Token, token_url as well. You will be using these later in the App Connect Toolkit flow.


Create Integration Security Group
Create integration security group "App Connect group", add wd-integration user to the group.

Grant Access to the Domains under Staffing Functional Area
In Workday, search for "Functional area", and filter on "Functional Area" > search for Staffing as below.
Click <More>, look for "worker data" domains. Select the first one (Active and terminated users), then edit security policy permissions as below.


Repeat the above step for each Worker Data: domains. 
Note: There may be a better way to grant access, but due to my lack of Workday knowledge I ended up granting access to each and every Worker Data domains. If access isn't granted then the API returns "S22 Permission Denied" error. 

Save changes
Select Admin's workbench > Security & Audit > Actions (Activate Pending Activity Changes). Write a comment, and "save".


App Connect Toolkit

Create Library
Create a library to hold Workday schema files. From the App Connect Toolkit Integration Perspective, create a Library Workday_JSON_Shared_Library), and add the downloaded staffing.json.

Import Project Interchange
The attached Project Interchange contains Rest API Message flow implementation. The flow retrieves Bearer token based on the ClientId, Secret, and the Refresh_Token which obtained earlier. The Bearer token is passed as the REST Request header of getWorkers Workday API. 
Note: This sample is retrieving the Bearer token on every request which is not needed. Need to adjust the flow to retrieve the Bearer token once, and store it in Environment and reuse. If the token is expired, then retrieve a new token and store.

Set the CLIENT_ID, CLIENT_SECRET, REFRESH_TOKEN, TOKEN_URL user-defined values at the flow level as below.

To use a different REST operation, simply drag the method from the Workday_JSON_Shared_Library on the left to the canvas on the right as below.

Build bar file
Create a bar file (x_invoke_workday_staffing_api.bar) and select/include the projects (x_invoke_workday_staffing_api, Workday_JSON_Shared_Library).

Deploying to IBM Cloud Pak for Integration
Login to IBM Cloud Pak for Integration > App Connect Dashboard > Create Server > Quick Start Toolkit Integration.
Drag and drop x_invoke_workday_staffing_api.bar file.

Click <Create> to create the Integration Server "tk-invoke-workday-worker-service".

Make sure the Integration is in Ready state.


Testing

Test the API by navigating to the Integration Server > Select the API (x_invoke_workday_worker_api). Pass Worker WID to retrieve a  Worker record, or leave blank to retrieve multiple Worker records.

Acknowledgements
I would like to thank Valerie Lampkin (Integration Technical Specialistfor reviewing the article. Valerie's feedback was helpful for fine-tuning the article.

Statistics
0 Favorited
46 Views
1 Files
0 Shares
11 Downloads
Attachment(s)
zip file
ACE_TK_WORKDAY_RESTAPI_INTEGRATION.zip   6 KB   1 version
Uploaded - Tue November 30, 2021