Configuring Upload to File Server Hook (Optional)
The Distributed File Server Worker can be configured to allow the created visualization files to be stored to the file server directly, rather than transferred back to the main server. Workers in close proximity to the Windchill server (for example, on the same local area network) do not need to configure the hook because transferring the Visualization data does not put additional load on the WAN. To set up the File Server Hook, perform the following steps:
1. Create a Package - All the files needed to run the hook program need to be packaged. To do so, open a Windchill shell and change the directory to <Windchill>/codebase on the main server. Then invoke the following command:
ant -f wvsMakeJar.xml PackageUploadToFileServerHook
For cluster environments, execute the above command on the secondary node rather than the main node. The secondary node must have the following wt.properties defined:
java.rmi.server.hostname=<actual secondary server hostname>
wt.rmi.server.hostname=<cluster alias name>
This ensures that the File Server Worker Hook directs its Java RMI requests to the cluster load balancer, accessed using the <cluster alias name>, which will redirect the request to the foreground method server on a secondary node.
2. Transfer the Package to the Worker Machine - Invoking the command in the previous step creates a directory called UploadToFileServerHook in <Windchill>/codebase. This directory contains all the necessary files (the "package") necessary to run the hook. Transfer the UploadToFileServerHook directory to the worker machine.
3. Install the appropriate Java Runtime Environment. The hook program requires the same Java version that is installed on the method server. For example, if the method server is running Java 1.6, then install the Java 1.6 Runtime Environment on the worker machine.
4. Configure the UploadToFileServerHook Startup Script - In the UploadToFileServerHook directory, there are two startup scripts: uploadtofileserverhook.bat for Windows and uploadtofileserverhook.sh for UNIX. Open the startup script for your operating system in a text editor, and set all the required environment variables to their proper values. For example, the JAVA_HOME environment variable must be set to the location where the Java Runtime Environment is installed on this machine.
5. Test the Configuration - To determine whether the UploadToFileServerHook program has been configured properly, you can upload a test file to the file server. To perform the test, open a command shell and change directories to the location of the startup script. Then invoke the script with the following arguments:
uploadtofileserverhook.bat -TEST -SERVER <Windchill URL>
-USERNAME <worker_username> -PASSWORD <worker_password>
Here is an example of the script with sample data:
uploadtofileserverhook.bat -TEST -SERVER
http://mycompany.com/Windchill -USERNAME WorkerAUserName
-PASSWORD WorkerAPassword
The following is an example of the output displayed from a successful test. The output must contain the message "Upload complete."
UploadToFileServerHook started Wed Feb 06 14:12:17 EST 2008
Running in Test Mode
pvsFilepath=D:\UploadToFileServerHook\TestUploadToFileServerHook\test.pvs
Using properties specified by Program Arguments
Files to Upload to the File Server:
test.ol
Upload complete
Wrote Encoded CacheContentDescriptors to loaderoptions.txt
WARNING: Deletion of files bypassed per -BYPASS_DELETE
UploadToFileServerHook ended Wed Feb 06 14:12:18 EST 2008
If an error message such as ERROR : wt.fv.uploadtocache is displayed when running the test, then the file server is not configured properly. Be sure the file server is running and mounted, and that data can be uploaded to the file server successfully before performing the test again. See External File Vaults for more information.
6. Configure the Worker Recipe File to Execute the Hook - The worker's recipe file is usually located in the same directory as the worker startup script. For PROE, the recipe file is called proe2pv.rcp. Open the worker’s recipe file in a text editor (not the Recipe Editor), add the property adapter/externalProcessFinal, and set it equal to the location of the startup script for the hook configured in Step 4. When the worker is finished creating the visualization data, it calls the hook program defined by this property to upload the visualization data to the file server.
Windows example:
adapter/externalProcessFinal=C:\/UploadToFileServerHook\
/uploadtofileserverhook.bat
UNIX example:
adapter/externalProcessFinal=\/UploadToFileServerHook\
/uploadtofileserverhook.sh
* 
In both examples, be sure to note the backward slash and forward slash as the directory separator.
7. Verification - To verify the worker is calling the Upload to File Server Hook, publish a Dynamic Document in which the content resides on the specified file server. After publishing has completed, access WVS Job Monitor > Job Detail and find the line that says:
Feb 6, 2010 8:14:24 AM: Running external process
uploadtofileserverhook
If this line is not displayed, then the hook is not being called due to a configuration issue.
War dies hilfreich?