VOOZH about

URL: https://www.cdata.com/kb/tech/workday-cloud-mulesoft.rst

⇱ Integrate with Live Workday Data in MuleSoft (via CData Connect AI)


Integrate with Live Workday Data in MuleSoft (via CData Connect AI)

πŸ‘ Dibyendu Datta
Dibyendu Datta
Lead Technology Evangelist
Use CData Connect AI to connect to Workday from the MuleSoft Anypoint Platform to integrate live Workday data into custom reports and dashboards.

The MuleSoft Anypoint Platform enables the building, deployment, and management of APIs and integrations, facilitating seamless connectivity across applications and systems. When combined with CData Connect AI, it provides access to Workday data for visualizations, dashboards, and more. This article explains how to use CData Connect AI to create a live connection to Workday and how to connect and access live Workday data from the MuleSoft Anypoint Platform.

Prerequisites

Before configuring and using MuleSoft with CData Connect AI, you must first connect a data source to your CData Connect AI account. For more information, see the Connections section.

Additionally, you need to generate a Personal Access Token (PAT) on the Settings page. Be sure to copy it down, as it serves as your password during authentication.

About Workday Data Integration

CData provides the easiest way to access and integrate live data from Workday. Customers use CData connectivity to:

  • Access the tables and datasets you create in Prism Analytics Data Catalog, working with the native Workday data hub without compromising the fidelity of your Workday system.
  • Access Workday Reports-as-a-Service to surface data from departmental datasets not available from Prism and datasets larger than Prism allows.
  • Access base data objects with WQL, REST, or SOAP, getting more granular, detailed access but with the potential need for Workday admins or IT to help craft queries.

Users frequently integrate Workday with analytics tools such as Tableau, Power BI, and Excel, and leverage our tools to replicate Workday data to databases or data warehouses. Access is secured at the user level, based on the authenticated user's identity and role.

For more information on configuring Workday to work with CData, refer to our Knowledge Base articles: Comprehensive Workday Connectivity through Workday WQL and Reports-as-a-Service & Workday + CData: Connection & Integration Best Practices.


Getting Started


Configure Workday Connectivity for MuleSoft

Connectivity to Workday from MuleSoft is made possible through CData Connect AI. To work with Workday data from MuleSoft, we start by creating and configuring a Workday connection.

  1. Log into Connect AI, click Sources, and then click Add Connection
  2. πŸ‘ Adding a Connection
  3. Select "Workday" from the Add Connection panel
  4. πŸ‘ Selecting a data source
  5. Enter the necessary authentication properties to connect to Workday.

    To connect to Workday, users need to find the Tenant and BaseURL and then select their API type.

    Obtaining the BaseURL and Tenant

    To obtain the BaseURL and Tenant properties, log into Workday and search for "View API Clients." On this screen, you'll find the Workday REST API Endpoint, a URL that includes both the BaseURL and Tenant.

    The format of the REST API Endpoint is: https://domain.com/subdirectories/mycompany, where:

    • https://domain.com/subdirectories/ is the BaseURL.
    • mycompany (the portion of the url after the very last slash) is the Tenant.
    For example, in the REST API endpoint https://wd3-impl-services1.workday.com/ccx/api/v1/mycompany, the BaseURL is https://wd3-impl-services1.workday.com and the Tenant is mycompany.

    Using ConnectionType to Select the API

    The value you use for the ConnectionType property determines which Workday API you use. See our Community Article for more information on Workday connectivity options and best practices.

    APIConnectionType Value
    WQLWQL
    Reports as a ServiceReports
    RESTREST
    SOAPSOAP

    Authentication

    Your method of authentication depends on which API you are using.

    • WQL, Reports as a Service, REST: Use OAuth authentication.
    • SOAP: Use Basic or OAuth authentication.

    See the Help documentation for more information on configuring OAuth with Workday.

    πŸ‘ Configuring a connection (Salesforce is shown)
  6. Click Save & Test
  7. Navigate to the Permissions tab in the Add Workday Connection page and update the User-based permissions. πŸ‘ Updating permissions

Add a Personal Access Token

When connecting to Connect AI through the REST API, the OData API, or the Virtual SQL Server, a Personal Access Token (PAT) is used to authenticate the connection to Connect AI. It is best practice to create a separate PAT for each service to maintain granularity of access.

  1. Click on the Gear icon () at the top right of the Connect AI app to open the settings page.
  2. On the Settings page, go to the Access Tokens section and click Create PAT.
  3. Give the PAT a name and click Create. πŸ‘ Creating a new PAT
  4. The personal access token is only visible at creation, so be sure to copy it and store it securely for future use.

With the connection configured and a PAT generated, you are ready to connect to Workday data from Mulesoft.

Connecting to CData Connect AI

Follow these steps to establish a connection from Mulesoft to CData Connect AI through the JDBC driver:

  1. Download and install the CData Connect AI JDBC driver.
    • Open the Integrations page of CData Connect AI.
    • Search for and select JDBC.
    • Download and run the setup file.
    • When the installation is complete, the JAR file can be found in the installation directory (inside the lib folder).
  2. Log into Mulesoft Anypoint Studio or launch the desktop application.
  3. Create a new Mulesoft project. πŸ‘ Create a new MuleSoft project
    πŸ‘ Add the project name
    The new project appears in a project folder. πŸ‘ The new project is created
  4. In the Mule Palette located on the right, drag an HTTP Listener to the Message Flow area. πŸ‘ Drag the HTTP Listener to the Message Flow area
  5. Click on the HTTP Listener to configure it. πŸ‘ Click on the HTTP Listener to configure it
  6. Click the + sign on the right of Connector configuration. The HTTP Listener config dialog appears.
  7. Configure the HTTP Listener, providing a Port on which to query your data, and click OK. πŸ‘ Add the port number to configure the HTTP Listener
  8. Provide a path on which to perform the actions. The HTTP Listener is now configured. πŸ‘ Provide a path to perform the actions
  9. In the Mule Palette on the right, type database in the search bar. πŸ‘ Search for database in Mule Palette search bar
  10. Drag the database operation you want to perform to the Message Flow area. For this example, we choose Select. πŸ‘ Drag the database operation in the Message Flow area
  11. Select Generic Connection from the Connection dropdown in the Database Config dialog. πŸ‘ Select Generic Connection from the Connection dropdown
  12. Click the Configure button to configure the JDBC driver. Select Use local file from the drop-down list. πŸ‘ Select Use local file from the dropdown
  13. Locate the CData Connect AI JAR file from the JDBC driver installation and click OK. πŸ‘ Add the CData Connect AI JAR file path
  14. Provide the following information:
    • URL: the URL for the connection, for example:
       jdbc:connect:Authscheme=Basic;user=username;password=PAT
      Note: the password is the PAT created in the Prerequisites section.
    • Driver class name: Enter the Driver class name as:
       cdata.jdbc.connect.ConnectDriver
      πŸ‘ Add the URL and the Driver class name
  15. Click Test Connection. πŸ‘ Click on Test Connection
  16. If the connection is successful, provide the SQL Query Text in the editor. You can see the table metadata on the right side in the Output tab. πŸ‘ Write the SQL Query
  17. In the Mule Palette, drag Transform Message to the Message Flow area. πŸ‘ Drag Transform Message to the Message Flow area
  18. Click Transform Message to configure it. Change the Output as follows: πŸ‘ Configure Transform Message
  19. Save your project and run it. In the console, Mulesoft starts initializing the dependencies. πŸ‘ Save and Run the project
  20. Once you see the message, "Message source 'listener' on flow your_project_name successfully started", you can start querying your data at the endpoint you provided. πŸ‘ Check for the 'Message source 'listener' on flow your_project_name successfully started' message to get started
  21. Query to check out the data using the Postman application (as shown below). πŸ‘ Send an API request from Postman to check the Workday data

SQL Access to Workday Data from Cloud Applications

Now you have a direct connection to live Workday data from MuleSoft Anypoint Platform. You can create more connections to ensure seamless data flow, automate business processes, and manage APIs - all without replicating Workday data.

To get real-time data access to hundreds of SaaS, Big Data, and NoSQL sources (including Workday) directly from your cloud applications, explore the CData Connect AI.