Integrating with Taleo Enterprise Edition using Integration Cloud Service (ICS)

Introduction

Integration Cloud Service (ICS) provides Oracle SaaS customers with pre-defined to connections to most SaaS subscriptions and zero-code integration features to quickly connect SaaS applications. Oracle Taleo provides talent management functions as Software as a service (SaaS). Taleo often needs to be integrated with other human resource systems. For customers looking to use ICS for integration with Taleo, let’s look at an integration pattern using Taleo Connect Client (TCC).

Main Article

Integration using Taleo Connect Client(TCC) is recommended for bulk integration. To jump to a sub-section directly, click one of the links below.

Taleo Connect Client (TCC)
Integrating Taleo with EBS using ICS and TCC
Launching TCC client through a SOAP interface

 


Taleo Connect Client (TCC)

As stated previously, TCC provides the best way to integrate with Taleo Enterprise. TCC has design editor to author exports and imports and run configurations. It also could be run from command line to execute the import or export jobs. A link to another post introducing TCC is provided in References section.

Figure3

Figure 1

Figure 1 shows a logical view of a solution using TCC and ICS. In this case, ICS orchestrates the flow by interacting with HCM and Taleo.   TCC is launched remotely through SOAP service. TCC and SOAP launcher service are deployed to an IaaS compute node running Linux or on an on-premise node along with ICS connectivity agent.


Integrating Taleo with EBS using ICS and TCC

Let’s look at a solution to integrate Taleo and EBS Human resources module, using ICS as the central point for scheduling and orchestration. This solution is suitable for on-going scheduled updates involving few hundred records for each run. Figure 2 represents the solution.

Figure4

Figure 2

TCC is deployed to a host accessible from ICS. The same host runs a J-EE container, such as WebLogic or Tomcat. The launcher web service deployed to the container launches TCC client upon a request from ICS. This service can receive or send data file content as base64-encoded string. TCC client, depending on the type of job, either writes a file to a temp folder or reads a file from the temp folder.  The temp folder could be local or on a shared file system, depending on high-availability requirements.  Here are the steps performed by the ICS orchestration.

  • Invoke launcher service to run a TCC export configuration. Wait for completion of the export.
  • Launcher service executes the export and returns the output as base64 string in SOAP response.
  • Wire file content to a ICS temporary file and loop through contents. For each row, transform the data and invoke EBS REST adapter to add the record. Stage the response from EBS in a ICS temporary file.
  • Invoke launcher to run a TCC import configuration, along with contents of  ICS temporary file as base64 string. Wait for completion of the import.
  • At this point, bi-direction integration between Taleo and EBS is complete.

This solution demonstrates the capabilities of ICS to seamlessly integrate SaaS applications and on-premise systems. ICS triggers the job and orchestrates export and import activities in single flow. When the orchestration completes, both, Taleo and EBS are updated. Without ICS, the solution would contain a disjointed set of jobs that could be managed by different teams and might require lengthy triage to resolve issues.


Launching TCC client through a SOAP interface

Taleo Connect Client could be run from command line to execute a configuration to export or import data. A Cron job or Enterprise Scheduling service (ESS) could launch the client. However, enabling the client to be launched through a service will allow a more cohesive flow in integration tier and eliminate redundant scheduled jobs.

Here is a sample java code to launch a command line program. This code launches TCC code and wait for completion, capturing the command output. Note that the code should be tailored to specific needs and suitable error handing, and, tested for function and performance.

package com.test.demo;
import com.taleo.integration.client.Client;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class tccClient {
    public boolean runTCCJoB(String strJobLocation) {
        Process p=null;
        try {
            System.out.println("Launching Taleo client. Path:" + strJobLocation);
            String cmd = "/home/runuser/tcc/scripts/client.sh " + strJobLocation;
            p = Runtime.getRuntime().exec(cmd);
	//Read both Input and Error streams.
            ReadStream s1 = new ReadStream("stdin", p.getInputStream());
            ReadStream s2 = new ReadStream("stderr", p.getErrorStream());
            s1.start();
            s2.start();
            p.waitFor();
            return true;
        } catch (Exception e) {
            //log and notify as appropriate
            e.printStackTrace();
            return false;
        } finally {
            if (p != null) {
                p.destroy();
            }
        }
    }
}

Here is a sample service for a launcher service using JAX-WS and SOAP.

/**
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
**/

package com.oracle.demo;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.util.Base64;
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;

/**
 *
 * @author manikri
 **/
@WebService(serviceName = "tccJobService")
public class tccJobService {
    /**
     * Run TCC client with export configuration file provided in JobPath. Then,
     * get contents of file provided in FilePath
     *
     * @param JobPath
     * @param FilePath
     * @return String with results of execution
     */
    @WebMethod(operationName = "runTCCExportJob")
    public TCCResponse runTCCExportJob(@WebParam(name = "JobPath") String JobPath, @WebParam(name = "FilePath") String FilePath) {
        try {
            //tccClient().runTCCJob(JobPath);
            TCCResponse objTCCResponse = new TCCResponse();
            objTCCResponse.setStrTCCReponse(new tccClient().runTCCJoB(JobPath));

            //If the job succeeded, Read file and convert to base64
            if (objTCCResponse.getStrTCCReponse().contains("FAILED")) {
                objTCCResponse.setStrFileBase64("");
            } else {
                File originalFile = new File(FilePath);
                String encodedBase64 = null;
                FileInputStream fileInputStreamReader = new FileInputStream(originalFile);
                byte[] bytes = new byte[(int) originalFile.length()];
                fileInputStreamReader.read(bytes);
                encodedBase64 = Base64.getEncoder().encodeToString(bytes);

                objTCCResponse.setStrFileBase64(encodedBase64);
            }
            return objTCCResponse;
        } catch (Exception ex) {
            ex.printStackTrace();
            TCCResponse objTCCResponse = new TCCResponse();
            objTCCResponse.setStrTCCReponse("FAILED:" + ex.getMessage());
            objTCCResponse.setStrFileBase64("");
            return objTCCResponse;
        }
    }

    /**
     * Write content of Base64 input to file specified by FilePath. Then, run
     * TCC client with import configuration file provided in JobPath.
     *
     * @param JobPath
     * @param FilePath
     * @param Base64Content
     * @return String with results of execution
     **/
    @WebMethod(operationName = "runTCCImportJob")
    public String runTCCImportJob(@WebParam(name = "JobPath") String JobPath, @WebParam(name = "FilePath") String FilePath, @WebParam(name = "Base64Content") String Base64Content) {
        try {

            //Write file to the path     
            byte[] data = Base64.getDecoder().decode(Base64Content);
            OutputStream stream = new FileOutputStream(FilePath);
            stream.write(data);

            //Launch the client
            return new tccClient().runTCCJoB(JobPath);
        } catch (Exception ex) {
            ex.printStackTrace();
            return "FAILED:" + ex.getMessage();
        }
    }

}

Finally, below are some SOAP requests that could be sent from an ICS orchestration, to launch TCC client.

To run an export job:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:demo="http://demo.oracle.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <demo:runTCCExportJob>
         <JobPath>candidate-experience-import_cfg.xml</JobPath>
         <FilePath>/home/oracle/tcc/datafiles/Candidates.csv</FilePath>
      </demo:runTCCExportJob>
   </soapenv:Body>
</soapenv:Envelope>

To run an import job:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:demo="http://demo.oracle.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <demo:runTCCImportJob>
         <JobPath>/home/oracle/tcc/jobdefinitions/TCC-EBSUpdate_cfg.xml</JobPath>
         <FilePath>/home/oracle/tcc/datafiles/TCCImportFile.csv</FilePath>
         <Base64Content>MTU3MDIsMTAwMDAxDQoxNTcyMiwxMDAwMDINCjE1ODIyLDEwMDAwMw0K</Base64Content>
      </demo:runTCCImportJob>
   </soapenv:Body>
</soapenv:Envelope>

Attachment:

 

Summary

This post addressed details of enabling integration with Taleo Enterprise Edition through ICS. It explained a demo solution based on the recommended pattern using TCC and provided code snippets and steps to launch TCC client via web service. At the time of this post’s publication, ICS does not offer Taleo-specific adapter. A link to current list of supported adapters is provided in references section.

 

References

· Getting started with Taleo Connect Client (TCC) – ATeam Chronicles

· Taleo business edition REST API guide

· Latest documentation for Integration Cloud Service

· Currently available ICS adapters

· TCC wrapper service Netbeans project

 

Add Your Comment