Content Management > PTC Server connection Setup > Configuring Arbortext Publishing Engine for the Windchill Visualization Service
  
Configuring Arbortext Publishing Engine for the Windchill Visualization Service
The Windchill Visualization Service (WVS) uses Arbortext Publishing Engine to publish XML and SGML documents stored in a PTC Server to outputs such as PDF and HTML. The best practice for configuring the interaction between WVS and Arbortext Publishing Engine is to use an Arbortext Publishing Engine sub-process pool that is dedicated to processing WVS requests. Refer to the Configuration Guide for Arbortext Publishing Engine for more information about Arbortext Publishing Engine sub-process pools.
To configure an Arbortext Publishing Engine sub-process pool to support the Windchill Visualization Service, you must modify the Arbortext Publishing Enginee3config.xml configuration file. This file is located at Arbortext-path\e3\e3\WEB-INF\e3config.xml.
The e3config.xml configuration file contains two objects that pertain to the Windchill Visualization Service. The first object is a RequestSelector object that tests for WVS requests and routes them appropriately. You do not need to modify this object. Following is that part of the configuration file:
<RequestSelector class="com.arbortext.e3.TestQueryMatch" id="test-wvs-class">
<Parameter name="query-name" value="class"/>
<Parameter name="query-pattern" value="com.arbortext.ptc.windchill.Compose"/>
</RequestSelector>
The second object is a SubprocessPool object that processes WVS requests. You must modify this object to enable Arbortext Publishing Engine sub-process pool support for WVS requests. Following is that part of the configuration file:
<SubprocessPool id="pool-wvs"
enabled="no"
maxBusyInterval="3600"
maxSubprocesses="2"
minSubprocesses="2"
>
<SubprocessContext>
</SubprocessContext>

<TestSet>
<Test name="test-wvs-class"/>
</TestSet>
</SubprocessPool>
Use Arbortext Editor or Arbortext Publishing Engine Interactive to modify the following attributes in the Windchill Visualization Service SubprocessPool object:
enabled — Set the value of this attribute to yes to enable the WVS sub-process pool.
maxSubprocesses — Set the value of this attribute to the number of Arbortext Publishing Engine sub-processes that you want enabled in the pool.
This value should match the number of Max Instances in the CAD Worker Execution Command page of the WVS CAD Configuration Wizard. See the Windchill Visualization Service documentation for more information about this wizard and other WVS configuration.
minSubprocesses — Set the value of this attribute to the same value as the maxSubprocesses attribute.
Setting these values to the same number minimizes the system overhead associated with launching and terminating Arbortext Publishing Engine sub-processes.
Configuring the WVS to Run with the Permissions of the Requesting User
If you are running a PTC Server at version 9.1 M010 or above, you can set up WVS so publishing will always run with the permissions of the user who requests the publish job. To do this, you must modify the site.xconf file to set the useexecuteas=true setting for wvs.properties, and set your Arbortext Publishing Engine server as a trusted host in wt.properties. You can then run xconfmanager to propagate the changes to the appropriate configuration files.
The following updates must be made to the site.xconf file by an administrator:
1. In wt.properties, add a property with name set to wt.auth.trustedHosts and value set to a whitespace separated list of the host names of the Arbortext Publishing Engine servers that will connect to this PTC Server to download content. For example
<Property name="wt.auth.trustedHosts" overridable="true"
targetFile="codebase/wt.properties" value="peserver01.company.com"/>
2. Also in wvs.properties, add useexecuteas\=true to the publish.cadconvert.ARBORTEXT property to ensure the publish job will run as the requesting user.
* 
Before you propagate this property, notice the propogation overrides the property found in codebase/wvs.properties.xconf. Ensure that the only difference in the property value is the addition of the parameter useexecuteas=true. All other parameters should stay the same as what you have defined in wvs.properties.xconf.
For example:
<Property name="publish.cadconvert.ARBORTEXT" overridable="true"
targetFile="codebase/wvs.properties"
value="com.ptc.wvs.server.publish.CadConvertARBORTEXT,
useworkerdownload=$(wt.home)$(wvs.dir.sep)auth.properties,useexecuteas=true,
types=PDF HTML WEB POSTSCRIPT HTMLHELP SGML XML RTF 3D,defaulttype=PDF"/>