TCC

Warehousing Documents

Someone had inquired about doing a data warehouse with TCC. I kind of chuckled because after I finished up my degree in 2022, to kill time and have fun I built one that all you really had to do was install MariaDB, Python & TCC and you had a quick and easy system that brought all the data from Taleo over to a MariaDB instance with Python handling the sticky work. Add to that the one that Taleo built themselves in 2013 and the one that the Cloud Connectors built… Well let’s just say there are options. Here is the original concept doc from Taleo and the last one that I did as a consultant prior to building the aforementioned Maria, Python, and TCC project so you can see what’s there.

XSL

XML > 2 > CSV

I was faced with the possibility of writing this from scratch and while I love a challenge, sometimes it’s easier to just post it:)

<?xml version="1.0" encoding="UTF-8"?>
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  version="2.0">

  <xsl:output method="text"/>

  <xsl:variable name="fields" 
                select="distinct-values(//file/*[not(*)]/name(.))"/>

  <xsl:template match="/">
    <!--header row-->
    <xsl:value-of select="$fields" separator=","/>

    <!--body-->
    <xsl:apply-templates select="*"/>

    <!--final line terminator-->
    <xsl:text>&#xa;</xsl:text>
  </xsl:template>

  <!--elements only process elements, not text-->
  <xsl:template match="*">
    <xsl:apply-templates select="*"/>
  </xsl:template>

  <!--these elements are CSV fields-->
  <xsl:template match="file/*[not(*)]">
    <!--replicate ancestors if necessary-->
    <xsl:if test="position()=1 and ../preceding-sibling::file">
      <xsl:for-each select="ancestor::file[position()>1]/*[not(*)]">
        <xsl:call-template name="doThisField"/>
      </xsl:for-each>
    </xsl:if>
    <xsl:call-template name="doThisField"/>
  </xsl:template>

  <!--put out a field ending the previous field and escaping content-->
  <xsl:template name="doThisField">
    <xsl:choose>
      <xsl:when test="name(.)=$fields[1]">
        <!--previous line terminator-->
        <xsl:text>&#xa;</xsl:text>
      </xsl:when>
      <xsl:otherwise>
        <!--previous field terminator-->
        <xsl:text>,</xsl:text>
      </xsl:otherwise>
    </xsl:choose>
    <!--field value escaped per RFC4180-->
    <xsl:choose>
      <xsl:when test="contains(.,'&#x22;') or 
                      contains(.,',') or
                      contains(.,'&#xa;')">
        <xsl:text>"</xsl:text>
        <xsl:value-of select="replace(.,'&#x22;','&#x22;&#x22;')"/>
        <xsl:text>"</xsl:text>
      </xsl:when>
      <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  </xsl:stylesheet>

And as a special added bonus. Here is the XSL to eliminate any extraneous information from the pipeline.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
	<xsl:output method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/>
	<!-- ======================================= -->
	<!-- Identity template -->
	<!-- ======================================= -->
	<xsl:template match="@*|node()">
		<xsl:copy>
			<xsl:apply-templates select="@*|node()"/>
		</xsl:copy>
	</xsl:template>
	<!-- ======================================= -->
	<!-- Exclude the file path attribute. -->
	<!-- ======================================= -->
	<xsl:template match="file">
		<xsl:copy>
			<xsl:apply-templates/>
		</xsl:copy>
	</xsl:template>
	<!-- ======================================= -->
	<!-- Exclude the content element. -->
	<!-- ======================================= -->
	<xsl:template match="file/content"/>
</xsl:stylesheet>

XSL

XSL – Max Date

Was having a devil of a time figuring out how to get the max date out of a node. This post enlightened me to the usage of XSL.

With XSLT 2.0 it is as easy as taking the min and max e.g.

<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xsd"
version="2.0">

<xsl:template match="/">
<xsl:variable name="dates" as="xsd:dateTime*"
select="dsQueryResponse/Rows/Row/@StartDate/xsd:dateTime(.)"/>
<xsl:text>Minimum date: </xsl:text>
<xsl:value-of select="min($dates)"/>
<xsl:text>; maximum date: </xsl:text>
<xsl:value-of select="max($dates)"/>
</xsl:template>

</xsl:stylesheet>

You can run XSLT 2.0 in the COM world (e.g. JScript/VBScript, VB(A))
with AltovaXML tools http://www.altova.com/altovaxml.html and in the
.NET world with Saxon 9 (http://saxon.sourceforge.net/).
Sample dataset:

<dsQueryResponse>
<Rows>
<Row ProjectName="Elvis" StartDate="2009-10-01T04:00:00Z"
TargetDate="2009-12-21T04:00:00Z" Overall_x0020_Status="On Track"
_x0025__x0020_Complete=".8" />
<Row ProjectName="Dolly" StartDate="2009-09-11T04:00:00Z"
TargetDate="2009-12-01T04:00:00Z" Overall_x0020_Status="On Track"
_x0025__x0020_Complete=".66" />
<Row ProjectName="CCR" StartDate="2009-09-21T04:00:00Z"
TargetDate="2009-11-21T04:00:00Z" Overall_x0020_Status="Manageable
Issues" _x0025__x0020_Complete=".90" />
<Row ProjectName="Stones" StartDate="2009-09-15T04:00:00Z"
TargetDate="2009-12-28T04:00:00Z" Overall_x0020_Status="Project
Concern" _x0025__x0020_Complete=".50" />
</Rows>
</dsQueryResponse>
TCC

Taleo – Company Logo

In Taleo, if you are going to create a PDF of the offer letter, you have to do so ‘on the fly’ like the system does. A lot of times, you’ll need the image for the token {Other.CompanyLogos1}. But where do you find this image? While logically you’d believe that there’s a media link someplace to see what they are, you’d be half right. It’s not in the system but if you use http://zonename.taleo.net/custom/images/company_logo_XX.gif with XX being 01 – 30, you can see them.

The ramifications of doing it this way are that if you change the image, it’s updated for any link using that image. This means if you change the image it will change on anything that references that gif.

TCC

TCC_Touchpoints

It’s been so long since I’ve worked without these that I forgot that it’s not part an parcel of an implementation if said implementation was done long enough ago. I first got acquainted with TCC in late 2005 and the TCC_Touchpoints weren’t released until November of 2009.

So without further ado, here is the documentation on it as well as an empty touchpoints to get you started.

Uncategorized

ListAgg for One to Many Concatenation

I’ve had to do this for a couple of reasons, mainly job types and such in the talent user entity and then again in any one to many users like groups and types.

<quer:projection id="listAggJobType" alias="JobType">
	<quer:query projectedClass="Application" alias="talentUserJobType">
		<quer:projections>
			<quer:projection alias="talentUserJobType_list" projectedValueType="string">
			<quer:customFunction name="listagg">
				<quer:field path="Candidate,TalentUser,JobTypes,Description"/>
				<quer:string> ~ </quer:string>
			</quer:customFunction>
			</quer:projection>
		</quer:projections>
		<quer:filterings>
			<quer:filtering>
				<quer:equal>
					<quer:field path="Number"/>
					<quer:field ownerQuery="MainQuery" path="Number"/>
				</quer:equal>
			</quer:filtering>
		</quer:filterings>
	</quer:query>
</quer:projection>

Rant

Adobe Idiots

Usually I blog at the end of the day after all the events are complete. It gives me time to reflect on what happened and try to highlight what went on in my world that day.

Today, I found out that the assassin and horrible layout in Acrobat reader is a feature introduced by an update. I haven’t really had to pay attention to it as I really haven’t been using it like I would working full time. And now that I’m using Acrobat reader again, it turns out the bookmarks being on the right side cannot be changed unless you turn off the new version. Can you believe that?

After you change back they ask you why and I was happy to explain how dissatisfied I was and I was proud of myself for omitting the foul language I was spouting when I found out what this horrible ‘update’ was.

Docker

Docker Course

While I use docker internally in my domain, I haven’t yet gotten it into the ‘production’ realm. To that end I stumbled across a link to this course on Reddit that should help solidify my understanding and professionalize my usage of the docker suite of tools.

PowerShell

PowerShell – Execution Policies

Just as an FYI, when you try to run your first PS script file, you will more than likely run afoul of the execution policies which are in place to prevent you from accidentally doing much damage by allowing one of these bad boys to run unchecked. So your first order of business is to cruise over here and familiarize yourself with the policies and then fire up PowerShell as an administrator and run this:

Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser

Now you’ll be able to run scripts.

Windows 11

Windows 11 – Restore Context Menu

I got a new laptop and it’s got Windows 11 on it and the right-click (context) menu is a bit goofy and needs to be reset to the old way. Luckily Microsoft seems to understand there would be issues with this new methodology and published a fix to set it back and even remove that if so desired.