Contact Free trial Login

To Use Workday in Anypoint Studio

You can use this connector in Anypoint Studio by adding it as a dependency in your Mule application.

Install Connector in Studio

  1. Open your Mule project in Anypoint Studio.

  2. Add the connector as a dependency in the pom.xml file:

    <dependency>
      <groupId>org.mule.connectors</groupId>
      <artifactId>mule-workday-connector</artifactId>
      <version>9.0.0</version>
    </dependency>

Configure in Studio 7

  1. Drag and drop the connector to the Studio Canvas.

  2. Configure the Global element for the connector

    Field Description

    Username

    Enter the username to log in with.

    Password

    Enter the corresponding password.

    Tenant Name

    Enter the Workday Tenant ID. It usually has the suffix "pt_1" appended to it, such as "acme_pt1".

    Host Name

    Enter the host name of one of Workdayโ€™s Cloud Servers. Default value: impl-cc.workday.com.

    Custom Transport

    Connection Idle Timeout and Response Timeout, and set up a proxy connection.

To validate connectivity using the Test Connection button, the Workday connector uses an Identity_Management WSDL service with the Get_Workday_Account_Signons_Request operation. Ensure that your service account has permissions to operate on that service. If not, use of Test Connection fails.

Use Case: Studio

Get Workday Incident Table Keys

Create a Mule flow to get keys from the Incident table in your Workday instance.

  1. Create a new Mule Application on your Studio and select an HTTP Listener as a Source in the new flow.

  2. Add a new HTTP Listener Configuration global element:

    1. Fill Host and port parameters with the following values:

      Parameter Value

      Host

      0.0.0.0

      Port

      8081

    2. Click Save.

  3. Assign your new Global configuration to your HTTP Listener.

  4. Fill in HTTP Listener path with /incident/get value.

  5. Drag and drop a new Workday component on the flow.

  6. Configure the Workday connector global element with its environment values under General tab.

  7. Add a transform message before the Connector and add an output like this:

    %dw 2.0
    output application/xml
    ns ns0 urn:com.workday/bsvc
    ---
    {
    ns0#Put_Applicant_Request @(ns0#version: "v28.0"): {
    	ns0#Applicant_Data: {
    		ns0#Personal_Data: {
    			ns0#Name_Data: {
    				ns0#Legal_Name_Data: {
    					ns0#Name_Detail_Data: {
    						ns0#Country_Reference: {
    							ns0#ID @(ns0#"type": "ISO_3166-1_Alpha-2_Code"): payload.countryIDValue
    						},
    						ns0#First_Name: payload.firstName,
    						ns0#Last_Name: payload.lastName
    					}
    				}
    			},
    			ns0#Contact_Data: {
    				ns0#Email_Address_Data: {
    					ns0#Email_Address: payload.email,
    					ns0#Usage_Data @(ns0#Public: true): {
    						ns0#Type_Data @(ns0#Primary: true): {
    							ns0#Type_Reference: {
    								ns0#ID @(ns0#"type": "Communication_Usage_Type_ID"): "Home"
    							}
    						}
    					}
    				}
    			}
    		},
    		ns0#Recruiting_Data: {
    			ns0#Ineligible_for_Hire: false,
    			ns0#Positions_Considered_for_Reference: {
    				ns0#ID @(ns0#"type": "Position_ID"): payload.applicantPositionIDValue
    			}
    		},
    		ns0#Background_Check_Data: {
    			ns0#Status_Date: payload.statusDate,
    			ns0#Status_Reference: {
    				ns0#ID @(ns0#"type": "Background_Check_Status_ID"): payload.backgroundCheckStatusIDValue
    			}
    		}
    	}
    }
    }
  8. Save and run the project as a Mule Application.

  9. To test the app, navigate to http://127.0.0.1:8081/incident/get

To Increase Timeout in Studio

Depending on connectivity conditions while using Studio, there can be a timeout while obtaining metadata from the Workday connector.

Symptoms

There can be two types of errors for this condition:

org.mule.runtime.api.exception.MuleRuntimeException: Error while retrieving soap client id [Absence_Management]
  org.mule.runtime.api.exception.MuleRuntimeException: Error while retrieving soap client id [Absence_Management]
  Caused by: java.util.concurrent.ExecutionException:
  org.mule.wsdl.parser.exception.WsdlParsingException: Error processing
  WSDL file [https://wd3-impl-services1.workday.com/ccx/service/deakin_amu1/Absence_Management/v29.1?wsdl]:
  Unable to locate document at 'https://wd3-impl-services1.workday.com/ccx/service/deakin_amu1/Absence_Management/v29.1?wsdl&#39;.

Or:

org.mule.tooling.client.api.exception.TimeoutException: Mule Agent REST service timed out
  org.mule.tooling.client.api.exception.TimeoutException: Mule Agent REST service timed out
  javax.ws.rs.ProcessingException: java.net.SocketTimeoutException: Read timed out
  	at org.glassfish.jersey.client.HttpUrlConnector.apply(HttpUrlConnector.java:244)
  	at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:245)
  	at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:671)
  	at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:668)
  	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
  	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
  	at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
  	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:444)
  	at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:668)
  	at

Solution

When one of these conditions occurs, increase the values for Default Connection Timeout and Default Read Timeout in Studio at Preferences > Anypoint Studio > Tooling. Double the values, apply, and restart Studio.

Use Case: XML

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:workday="http://www.mulesoft.org/schema/mule/workday"
xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
	xmlns:http="http://www.mulesoft.org/schema/mule/http"
	xmlns="http://www.mulesoft.org/schema/mule/core"
	xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core
	http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http
http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/core
http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd
http://www.mulesoft.org/schema/mule/workday
http://www.mulesoft.org/schema/mule/workday/current/mule-workday.xsd">
	<http:listener-config name="HTTP_Listener_config" doc:name="HTTP Listener config" >
		<http:listener-connection host="0.0.0.0" port="8081" />
	</http:listener-config>
	<configuration-properties file="mule-app.properties"/>
	<workday:config name="Workday_Config" doc:name="Workday Config" >
		<workday:basic-connection username="${workday.username}"
		password="${workday.password}" tenantName="${workday.tenantName}"
		hostName="${workday.hostName}">
			<workday:transport >
				<workday:default-http-message-dispatcher-provider />
			</workday:transport>
		</workday:basic-connection>
	</workday:config>
	<flow name="payroll-gbr-get-form">
		<http:listener config-ref="HTTP_Listener_config" path="/" doc:name="/"  />
		<parse-template location="form.html" doc:name="Parse Template"  />
	</flow>
	<flow name="create-position" >
		<http:listener config-ref="HTTP_Listener_config" path="/create-position"
		doc:name="/create-position" />
		<logger level="INFO" doc:name="Logger" />
		<ee:transform doc:name="Transform Message" >
			<ee:message >
				<ee:set-payload ><![CDATA[%dw 2.0
output application/xml
ns ns0 urn:com.workday/bsvc
---
{
	ns0#Create_Position_Request @(ns0#version: "v28.0"): {
		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"): payload.organizationReferenceID
			},
			ns0#Position_Data: {
				ns0#Job_Posting_Title: payload.jobPostingTitle
			},
			ns0#Position_Group_Restrictions_Data: {
				ns0#Availability_Date: payload.availabilityDate,
				ns0#Earliest_Hire_Date: payload.earliestHireDate
			},
			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
				}
			}
		}
	}
}]]></ee:set-payload>
	</ee:message>
	<ee:variables >
	<ee:set-variable variableName="myPayload" ><![CDATA[%dw 2.0
output application/xml
ns ns0 urn:com.workday/bsvc
---
{
	ns0#Create_Position_Request @(ns0#version: "v28.0"): {
		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"): payload.organizationReferenceID
			},
			ns0#Position_Data: {
				ns0#Job_Posting_Title: payload.jobPostingTitle
			},
			ns0#Position_Group_Restrictions_Data: {
				ns0#Availability_Date: payload.availabilityDate,
				ns0#Earliest_Hire_Date: payload.earliestHireDate
			},
			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
				}
			}
		}
	}
}]]></ee:set-variable>
			</ee:variables>
		</ee:transform>
		<workday:invoke config-ref="Workday_Config" doc:name="Staffing-Create_Position"
		service="Staffing" operation="Create_Position">
			<workday:message >
				<workday:body ><![CDATA[#[vars.myPayload]]]></workday:body>
			</workday:message>
		</workday:invoke>
		<ee:transform doc:name="Transform Message" >
			<ee:message >
				<ee:set-payload ><![CDATA[%dw 2.0
output application/json
ns ns0 urn:com.workday/bsvc
---
{
	ID: payload.body.Create_Position_Response.Position_Reference[1]
}]]></ee:set-payload>
			</ee:message>
		</ee:transform>
		<logger level="INFO" doc:name="Logger"  />
	</flow>
</mule>

Was this article helpful?

๐Ÿ’™ Thanks for your feedback!

Edit on GitHub