Workday Examples - Mule 4

Anypoint Connector for Workday provides two financial management services examples that enable you to see how Workday Connector works in Anypoint Design Center’s Flow Designer.

Add a Fund to the Financial Management Service

This example uses the Invoke operation in the connector to insert a fund in the financial management service. You need access to Workday and your Workday user name, password, and tenant name to complete this example.

  1. In Design Center, click Create.

  2. Click Create new application to open Flow Designer.

  3. Specify a value for Project name, and click Create.

  4. In Let’s get started, select HTTP Connector and Listener.

  5. Click Next.

  6. For the target, search for "Workday" and select Workday Connector.

  7. In Operation, search for "fin" and select Financial Management.

  8. Click Done.

  9. In HTTP Listener, specify Path as a forward slash (/).

  10. Click the Transform card and click Script at the bottom of the card.

  11. Copy the following example and paste it into Transformation script:

    %dw 2.0
    output application/xml
    ns ns0 urn:com.workday/bsvc
      ns0#Put_Fund_Request @(ns0#Add_Only: true, ns0#version: "v34.0"): {
        ns0#Fund_Data: {
          ns0#Fund_Name: "I.M.F",
          ns0#Fund_Type_Reference: {
            ns0#ID @(ns0#'type': 'Fund_Type_ID'): "FUND_TYPE-6-3"
  12. Input to the Workday connector is as follows:

    <ns0:Put_Fund_Request xmlns:ns0="urn:com.workday/bsvc" Add_Only="true" version="v34.0">
          <ns0:ID type="Fund_Type_ID">FUND_TYPE-6-3</ns0:ID>
  13. In the Workday component, specify Operation as Put_Fund.

  14. Select Click here to set it up.

    Configuration example:

    • Configuration Name: My Workday Connection

    • Connection: Basic Authentication Api V34

    • Username: <my_workday_username>

    • Password: <my_workday_password>

    • Tenant Name: <my_workday_tenant_name>

    • Host Name: Defaults to

  15. Click Test to ensure your user name, password, and tenant name are correct in Workday.

  16. Click Save.

  17. Click + and, in Select a component, select Logger.

  18. Set Message to payload (or #[payload]).

  19. Click Test at the right of the taskbar.

  20. After the test is successful, click the down-arrow menu in the taskbar and select Deploy application.

  21. After the project is running, check for a response.

  22. Click your browser’s back button to return to the list of Design Center projects.

  23. Click the Project Type entry for your project to expand the Details menu on the right side, note the Deployment url value.

  24. In a browser, add the deployment URL to http://<Deployment_URL>:8081/fund and copy the URL to the address bar.

    You receive an XML response similar to:

    <wd:Put_Fund_Response xmlns:wd="urn:com.workday/bsvc" wd:version="v34.0">
        <wd:Fund_Reference wd:Descriptor="I.M.F">
            <wd:ID wd:type="WID">THE_WID_ID_NUMBER</wd:ID>
            <wd:ID wd:type="Fund_ID">FUND-6-399</wd:ID>

Create a Position Request

A financial position shows the current balances for assets, liabilities, and equity in an organization. This example builds on Add a Fund to the Financial Management Service for its use of Design Center to enable you to create an app project that makes a Workday position request:

  1. Create a Mule application in Design Center.

  2. Add and configure an HTTP Listener as a trigger for your flow.

  3. Set Path to /create_position and use the default configuration for the Listener connection.

  4. Add Transform, the Dataweave component to your flow.

  5. Provide this transformation script to DataWeave:

    %dw 2.0
    ns ns0 urn:com.workday/bsvc
    output application/xml
      ns0#Create_Position_Request: {
        ns0#Business_Process_Parameters: {
          ns0#Auto_Complete: true,
          ns0#Run_Now: true
        ns0#Create_Position_Data: {
          ns0#Supervisory_Organization_Reference: {
            ns0#ID @("ns0:type": "Organization_Reference_ID"): "SUPERVISORY_ORGANIZATION-6-226"
          ns0#Position_Data: {
            ns0#Job_Posting_Title: "General Manager"
          ns0#Position_Group_Restrictions_Data: {
            ns0#Availability_Date: "2019-07-06",
            ns0#Earliest_Hire_Date: "2019-07-08"
          ns0#Edit_Assign_Organization_Sub_Process: {
            ns0#Business_Sub_Process_Parameters: {
              ns0#Skip: true
          ns0#Request_Default_Compensation_Sub_Process: {
            ns0#Business_Sub_Process_Parameters: {
              ns0#Skip: true
          ns0#Assign_Pay_Group_Sub_Process: {
            ns0#Business_Sub_Process_Parameters: {
              ns0#Skip: true
          ns0#Assign_Costing_Allocation_Sub_Process: {
            ns0#Business_Sub_Process_Parameters: {
              ns0#Skip: true
  6. Input to the Workday connector is as follows:

    <ns0:Create_Position_Request xmlns:ns0="urn:com.workday/bsvc">
          <ns0:ID ns0:type="Organization_Reference_ID">SUPERVISORY_ORGANIZATION-6-226</ns0:ID>
          <ns0:Job_Posting_Title>General Manager</ns0:Job_Posting_Title>
  7. Select the connector.

  8. Select the web service and the operation with content. In this example the content is the payload.

    Ensure that the values are available as menu items in the Service and Operation fields. The names become available once the connector loads the metadata for them. Do not type the names manually.

  9. Set up, test, and save a Workday configuration for the connection to the Workday server, for example:

    • Configuration Name: My Workday Config

    • Connection: Basic Authentication Api V34

    • Username: my_user_name

    • Password: my_password

    • Tenant Name: my_tenant_name

    • Host Name:

      If the connection test is unsuccessful, correct any invalid connection parameters and retest the connection.

  10. Add Logger to your flow and set payload as the message.

  11. Deploy, sync, or run the app.

  12. To test the app, open http://<Deployment_url>:8081/create_position from a browser or from an app such as curl.

    The response is as follows:

    <wd:Create_Position_Response xmlns:wd="urn:com.workday/bsvc" wd:version="v34.0">
      <wd:ID wd:type="WID">WID_VALUE</wd:ID>
        <wd:ID wd:type="WID">WID_VALUE</wd:ID>
        <wd:ID wd:type="Position_ID">P-11158</wd:ID>

    The Logger displays this message:

    {Create_Position_Response={Event_Reference={ID=WID_VALUE}, Position_Reference={ID=P-11158}}}