Friday, April 10, 2015

TCC: Changing Entity Tree Depth

 

While working with the Taleo Connect Client, sometimes you will need to work with complex hierarchy levels in the Entity tree. I am talking of this tree structure on the right side of your TCC Designer:           Cleartext.blogspot.com

tmp8CB9

If you start opening up the levels in the entity, you can go down to four levels. That is the default setting after installation. To go further down, you will need to increase the depth of this entity tree. This is done via Window-> Preferences   Cleartext.blogspot.com

tmp6FA9

Try increasing the value of Depth , under the Client -> Design option. And restart the TCC exe. But do be careful, entering large values can cause your TCC client to crash.  When I entered a value of 10 and restarted, the exe would not open up. And it started throwing java heap related errors. The change you make is global , and will reflect in all the products in the Installation Pack.

This article first appeared on Cleartext.blogspot.com

Wednesday, April 8, 2015

TCC - Exporting Attachments

 

This is something I struggled a lot with, and I am posting this in the hope that the next person struggling with this will find it helpful.

Taleo Enterprise Edition has a complex data model, and this becomes a problem when it comes to mass updates/exports. They provide a windows tool called the Taleo Connect Client (TCC) for this purpose. But the tool does not provide any out-of-box option to export/import files and attachments. For this purpose, consultants were using a custom library called TCCCustomSteps. But there is very little documentation around the subject area, and automating it requires bat files.

cleartext.blogspot.com

1:First, download the TCCCustomSteps library. This used to be hosted on Taleo's knowledge exchange forum, but the links no longer work. You can download a copy from here.

2:Extract the jar files into the \extensions\exernaljars\ folder under your TCC installation.

image

3. There is a product defect in current releases of TCC, you will get jar files when you try to use the TCCCustomsteps library. The fix is to replace commons-lang-2.0.jar with commons-lang-2.6.jar [TCC installation folder]\lib\endorsed.

4. Restart your TCC client.

5. Set up your TCC export and configuration files. Choose XML as the output type in both the files, CSV won't do. In the Projections tab of the export file, map the filename and file contents fields.

image

image

6. Create your TCC config file now, you can choose to create it from the  export file created in the previous step. In the projections tab, remove the StripSoap step, and add an XSL transformation step. cleartext.blogspot.com

image

The XSL step is to filter out only the tags required for the ExtractFile step. Here is the contents of the XSL 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='FirstName']"/><xsl:value-of select="./to:field[@name='LastName']"/>_<xsl:value-of select="./to:field[@name='AttachedFiles,FileName']"/>
    </xsl:attribute>
    <xsl:element name="content">
        <xsl:value-of select="./to:field[@name='AttachedFiles,FileContent']"/>
    </xsl:element>
</xsl:element>

</xsl:template>
</xsl:stylesheet>

---------------------------------------------------------------------------------------------------------------------------------------

Here is the content of the XML file: cleartext.blogspot.com

---------------------------------------------------------------------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<files>
[RECORD_OUTPUT]
</files>

---------------------------------------------------------------------------------------------------------------------------------------

7. Add the TCCCustom Step in the config file. For this, add one more "Custom Step" in the "Post-Processing" tab, and select Custom step and "Default custom step" as options.

image

8. For Java Class, enter "com.taleo.integration.client.customstep.xml.ExtractAttachedFilePostStep". Add the remaining values are below:

image

9. Save the config file and run it. The first time you run the export, you might want to change the filter to select a single record and text the export. When the run completes, the file attached will be exported into the output folder.

cleartext.blogspot.com

And that is all. There are other classes in the JAR which can be used to change filters , convert to PDF, and further manipulate the xml file.

 

This article first appeared on cleartext.blogspot.com