Automated Publishing with Arbortext Layout Developer > PTC ALD in PTC Arbortext Publishing Engine > PTC ALD Activation File
  
PTC ALD Activation File
There is a small difference between the PTC Arbortext Layout Developer (PTC ALD) activation file used in PTC Arbortext Layout Developer— Enterprise and that required for PTC Arbortext Publishing Engine (PE).
In PTC Arbortext Layout Developer— Enterprise, activation files provided information about the job to the Scheduler. They consisted of a script to be run in the PTC ALD Agent to process the job.
Under PE, the activation file still provides a script for PTC ALD to run, but the script has been incorporated into an XML structure and extended to provide some flexibility. The script section of the PE activation file should retain the same format as the original PTC ALD script.
Activation File Structure
An example of an PTC ALD activation file in PE is shown below:
<?xml version="1.0"?>
<activation>
<input>
<file href="D:\Jobs\Data\0001\Job_0001.sgm"/>
<file href="D:\Jobs\Data\0001\figure_1.tif"/>
<file href="D:\Jobs\Data\0001\figure_2.jpg"/>
</intput>
<script type="js" href="D:\Jobs\Scripts\myPreScript" id="preScript"/>
<script type="app" id="activationFileContents">
<![CDATA[
^text_path=D:\Jobs\Data\0001\Job_0001.sgm
^save_file=D:\Jobs\Saved Files\Job_0001.3d
^print_file=D:\Jobs\Output\Job_0001.pdf
edit "D:\Jobs\Templates\template_1.3f"
]]>
</script>
<output>
<file name="D:\Jobs\Output\Job_0001.pdf"/>
<file name="D:\Jobs\Saved Files\Job_0001.3d"/>
</output>
</activation>
The file structure consists of five elements:
Element
Description
activation
The root element is a wrapper for the input, script and output elements.
activation contains:
input element (optional)
1 or more script elements
output element (optional)
input
The input element provides a list of files to be used by the script. Files listed in input are checked before the script is processed.
If any of the files listed by input are not present, the job will fail. With this method, a pre-publish check confirms that all required information is available before the job is processed.
input contains 0 or more file elements.
script
The script element contains one more scripts, provided as either script code within a CDATA section, or a link to an external script file.
script has three attributes:
type — indicates the language of the script, either js or app
The type determines which scripting engine is used to process the script in PTC ALD.
href — can provide a link to an external script file using an absolute path
If href is provided, the script element must be empty. If it is not empty, only the linked file will be run.
This option can only be used to reference JavaScript scripts — the value of type must be js.
id — provides the ID of the script in the log and job response
The activation element can contain one or more script elements. It is possible to run scripting before and after the PTC ALD activation script.
output
The output element provides a list of files to be used by the script. Files listed in output are checked after the script is processed.
If any of the files listed by output are not present, the job will fail.
output contains 0 or more file elements.
file
The file element is a child of both input and output.
file is used to provide the location of a file which is expected to be found either before or after the scripts have been run.
file has one attribute:
href — defines an absolute path to a file