Contact Free trial Login

Example: Make a Position Request in Workday

This example creates Mule flow that makes a Workday position request.

  1. Create a Mule application as a project.

  2. Add and configure an HTTP Listener as a trigger for your flow, and set a Path such as:

    /create_position

    You can use the default configuration for the Listener connection.

    http listener position request example
  3. After the HTTP Listener, add the Transform Dataweave component to your flow.

  4. Provide a transformation script for the connector.

    %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: "2017-07-06",
            ns0#Earliest_Hire_Date: "2017-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
            }
          }
        }
      }
    }
    transform dataweave position request example
  5. Select the connector.

    select connector design center
  6. Select the web service and the operation with content. In this example the content is the payload.

    You need to 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.

    select operation design center
    workday configuration position request example
  7. 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 V32

    • Username: my_user_name

    • Password: my_password

    • Tenant Name: my_tenant_name

    • Host Name: impl-cc.workday.com

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

      workday configuration design center
  8. Add a Logger to the end of your flow that takes payload as the message.

    logger position request example
  9. Deploy, sync, or run the app.

  10. To test the app, open http://url.for.your.app:8081/create_position from a browser or from an app such as Postman.

    The response should look something like this:

    <wd:Create_Position_Response xmlns:wd="urn:com.workday/bsvc" wd:version="v32.1">
      <wd:Event_Reference>
      <wd:ID wd:type="WID">9cab4242420ddba1142ba11ad0c0d0g7</wd:ID>
      </wd:Event_Reference>
      <wd:Position_Reference>
        <wd:ID wd:type="WID">9cab4242420ddba1142ba11ad0c0d0g7</wd:ID>
        <wd:ID wd:type="Position_ID">P-11158</wd:ID>
      </wd:Position_Reference>
    </wd:Create_Position_Response>

    The Logger displays this message:

    {Create_Position_Response={Event_Reference={ID=9cab4242420ddba1142ba11ad0c0d0g7}, Position_Reference={ID=P-11158}}}

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.