Execution from Java

Execution of a Taleo Connect Client workflow from within another Java application is possible. The host application must match the environment constraints defined in the TaleoConnectClient.bat script and invoke the com.taleo.integration.client.Client.execute() method.

For Taleo Connect Client to execute correctly, the proper execution environment must be available. The following execution script is the minimal required configuration for a typical Windows installation:

SET IC_HOME="C:\Program Files\Taleo Connect Client";

SET CLASSPATH="%IC_HOME%\lib\taleo-integrationclient.jar";"%IC_HOME%\log";

java.exe

-Dcom.taleo.integration.client.install.dir="%IC_HOME%"

-Djava.endorsed.dirs="%IC_HOME%\lib\endorsed"

-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl

-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

-classpath %CLASSPATH% com.acme.integration.ACMEIntegrationProcess

The IC_HOME variable defines the installation directory of the Taleo Connect Client. This information is required because several libraries and resources are delivered with the installation bundle.

The classpath of the application is fairly simple because the taleo-integrationclient.jar contains the full classpath embedded in its manifest. This works fine with most JRE implementations. If any classpath problems occurs, you may also explicitly define the classpath by including all Java libraries (*.jar) in the lib and lib/endorsed folders. Of course, the classpath must also contain the required references to the host Java application.

In the Java invocation command itself, we first set the Taleo Connect Client installation directory explicitly. This is required mainly to locate the feature pack files. The next instruction ensures that the proper version of the Xerces XML parser is used. The final system property directs the Apache Jakarta Commons Logging project to use the Apache Log4J system. This is the reason why the log folder is part of the classpath, as the log4j.properties configuration file is located there. The invoked class com.acme.integration.ACMEIntegrationProcess is used here only as an example and should be replaced by the actual entry point of your Java application hosting the Taleo Connect Client.

The correct entry point to execute the Taleo Connect Client is: com.taleo.integra-tion.client.Client.execute(). The JavaDoc provided for this method in the docs/api folder of the product describes the behavior and parameter values.