Integration Special Interest Group Meeting 2014
Agenda Introductions Oracle Speaker Sharad Thankappan Selected Topics in Integration PeopleSoft/Taleo Integration Questions Questions
Extracting Documents from Taleo
Extracting a document/attachment using TCC There are many use cases for needing to extract a document/attachment out of Taleo Uploading Onboarding Documents to down stream systems Copying applications to 3 rd party systems Extracting candidate resumes Archiving / Transferring requisitions
Extracting a document/attachment using TCC Two options available 1) Extract raw document code with TCC and use Taleo provided TCCCustomSteps library 2) Extract raw document code with TCC and convert using an external program or custom code (e.g. Java)
Option 1 TCCCustomSteps Benefits TCC can produce attachments without further manipulation Issues Library is poorly documented, and not officially supported, not maintained Not customizable Requires usage of specific libraries
Option 2 Custom Code Benefits Document conversion is fully customizable Can use your own libraries Negatives Requires custom coding
Extracting a document using TCC Custom Step Library Example Your mileage may vary, no warranties or guarantees.
Setting Up You will need to install the following libraries into [TCC Directory]/extensions/externaljars TCCCustomSteps Library http://knowledgeexchange.taleo.com/docs/doc-3910 Other required libraries now accessible from the same link as above Direct Links dom4j-1.6.1.jar http://dom4j.org/dom4j-1.6.1/ jaxen-1.1.jar http://jaxen.codehaus.org/ Commons lang 2.6 http://commons.apache.org/lang/
Available Documentation
Create export script Determine the content required including fields required for file name First Name Last Name Requisition Number File Name File Content Keep it simple!
Create export script Export Mode = XML Report Set filters to ensure you are only including the applicable records Last Run Date CSW Step/Status Restriction Onboarding/Transitions Task Completion
Example Export Script
If you were to run this right now
Preparing the Output I have found that using an XSL transform on the output has the best success with the TCCCustomStep File export Might be able to export without transform
XSL Transform Post Step
XSL Transform File <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform" xmlns:to="http://www.taleo.com/ws/integration/toolkit/2005/07" xmlns:util="http://www.mavixconsulting.com/2013/xsl/transform" exclude-result-prefixes="to util"> <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/> <xsl:template match="to:record"> <xsl:element name="file"> <xsl:attribute name="path"> <xsl:value-of select="./to:field[@name='requisitionnumber']"/>_<xsl:value-of select="./to:field[@name='firstname']"/><xsl:value-of select="./to:field[@name='lastname']"/>_<xsl:value-of select="./to:field[@name='filename']"/> </xsl:attribute> <xsl:element name="content"> <xsl:value-of select="./to:field[@name='filecontent']"/> </xsl:element> </xsl:element> </xsl:template> </xsl:stylesheet>
XML Template File <?xml version="1.0" encoding="utf-8"?> <files> [RECORD_OUTPUT] </files>
If you were to run this right now Simplified XML with file name and content One file element per document
ExtractAttachedFilePostStep
Voila!
Using Subqueries
Using Subqueries Two types of sub queries 1. In column / complex projection Acts as a simple entity, must have a single response for the parent query Example: Last requisition filled date 2. Separate Table / join Able to join two sets of data using a separate query and then explicitly joining them on a key Can be used to do an outer join Example: Extract of all requisitions including any hires if applicable
In Column / Complex Projection <quer:projection alias="requisitionfilleddate" xmlns:quer="http://www.taleo.com/ws/integration/query"> <quer:query alias="requisitionfilleddate" projectedclass="application"> <quer:projections> <quer:projection> <quer:castasdate> <quer:maximum> <quer:field path="requisition,requisitionevent,eventdate"/> </quer:maximum> </quer:castasdate> </quer:projection> </quer:projections> <quer:filterings> <quer:filtering> <quer:equal> <quer:field ownerquery="main" path="contestnumber"/> <quer:field path="requisition,contestnumber"/> </quer:equal> </quer:filtering> <quer:filtering> <quer:equal> <quer:field path="requisition,requisitionevent,workactionnumber"/> <quer:integer>16</quer:integer> </quer:equal> </quer:filtering> </quer:filterings> </quer:query> </quer:projection>
Sub query / Join
Sub query / Join Can control the type of join equal Inner Join equalallownull Outer Join
Sub query / Join Must refer to the element in the separate table Use the entity ID to make the connection <quer:projection alias="hiredcandidatenumber" xmlns:quer="http://www.taleo.com/ws/integration/query"> <quer:projection ref="shiredcandidatenumber"/> </quer:projection>
Upgrading TCC
Upgrading TCC Script Upgrades Check data model Every 2 years seems to work with keeping current TCC Executable Updates Install in separate directory Try against staging first Net change setup must be run again
Using Web Services to Create a Candidate
Creating a Candidate Using Web Services Web Services is a method of communicating between two machines over the web (HTTP or HTTPS) 3 Major components to a Web Service request Endpoint (URL address sending the request to) Operation (POST/GET/PUT/etc.) Payload (the commands/message to send)
Taleo SOAP Taleo Web Services is SOAP based Payload is always XML based Operation is always POST All functions available are described in WSDL Documentation on how to get started with Taleo Web Services on My Oracle Support
Web Services: Simple The simplest way to use Taleo Web Services is to use a tool like SOAP UI to send an XML message to a Taleo endpoint XML message is static and typically is changed manually Can be scripted using simple languages like PHP
Web Services: Complex All SOAP Web Services have WSDLs describing the functionality of the services Most programming languages (Java,.Net, PHP, etc.) can convert WSDLs into classes/objects to interact with This allows for dynamic creation of Taleo objects to send to the end point
Create a candidate with source lock <soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema"> <soap:body> <create xmlns="http://www.taleo.com/ws/tee800/2009/01/candidate"> <candidate> <EmailAddress xmlns="http://www.taleo.com/ws/tee800/2009/01/import">general.referral@invalidemail.com</emailaddress> <FirstName xmlns="http://www.taleo.com/ws/tee800/2009/01/import">general</firstname> <LastName xmlns="http://www.taleo.com/ws/tee800/2009/01/import">referral</lastname> <TalentUser xmlns="http://www.taleo.com/ws/tee800/2009/01/import"> <TalentUser> <Profile> <ProfileInformation> <RecruitmentSource> <RecruitmentSource> <Identifier searchtype="search" searchvalue="ref-11760"/> </RecruitmentSource> </RecruitmentSource> </ProfileInformation> </Profile> </TalentUser> </TalentUser> <Credentials xmlns="http://www.taleo.com/ws/tee800/2009/01/import"> <Credentials> <Username>general.referral@invalidemail.com</Username> <Password>example@123</Password> </Credentials> </Credentials> </candidate> </create> </soap:body> </soap:envelope>
Match existing candidate to requisition with source lock <soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema"> <soap:body> <update xmlns="http://www.taleo.com/ws/tee800/2009/01/candidate"> <candidate> <Number searchtype="search" searchvalue="1018351" searchtarget="." xmlns="http://www.taleo.com/ws/tee800/2009/01/import"/> <Applications xmlns="http://www.taleo.com/ws/tee800/2009/01/import"> <Application> <ProfileInformation> <ProfileInformation> <RecruitmentSource> <RecruitmentSource> <Identifier searchtype="search" searchvalue="ref-11780" searchtarget="."/> </RecruitmentSource> </RecruitmentSource> </ProfileInformation> </ProfileInformation> <Requisition> <Requisition> <ContestNumber searchtype="search" searchvalue="120077" searchtarget="."/> </Requisition> </Requisition> </Application> </Applications> </candidate> </update> </soap:body> </soap:envelope>
Create & Match Candidate to Requisition with source lock <soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema"> <soap:body> <create xmlns="http://www.taleo.com/ws/tee800/2009/01/candidate"> <candidate> <EmailAddress xmlns="http://www.taleo.com/ws/tee800/2009/01/import">awesome_candidate@invalide mail.com</emailaddress> <FirstName xmlns="http://www.taleo.com/ws/tee800/2009/01/import">awesome</firstname> <LastName xmlns="http://www.taleo.com/ws/tee800/2009/01/import">candidate</lastname> <TalentUser xmlns="http://www.taleo.com/ws/tee800/2009/01/import"> <TalentUser> <Profile> <ProfileInformation> <RecruitmentSource> <RecruitmentSource> <Identifier searchtype="search" searchvalue="ref-11760"/> </RecruitmentSource> </RecruitmentSource> </ProfileInformation> </Profile> </TalentUser> </TalentUser> <Applications xmlns="http://www.taleo.com/ws/tee800/2009/01/import"> <Application> <ProfileInformation> <ProfileInformation> <RecruitmentSource> <RecruitmentSource> <Identifier searchtype="search" searchvalue="ref-11760"/> </RecruitmentSource> </RecruitmentSource> </ProfileInformation> </ProfileInformation> <Requisition> <Requisition> <ContestNumber searchtype="search" searchvalue="120106" searchtarget="."/> </Requisition> </Requisition> </Application> </Applications> <Credentials xmlns="http://www.taleo.com/ws/tee800/2009/01/import"> <Credentials> <Username>awesome_candidate@invalidemail.com</Username> <Password>thisisapassword@123</Password> </Credentials> </Credentials> </candidate> </create> </soap:body> </soap:envelope>
OHUG Global Conference 2014 Thank you for attending. Please remember to complete your evaluation of this session in the mobile app by selecting the thumbs up icon in the session. Each session evaluation submission in the mobile app equals one entry into a raffle for $75 gift cards!