AdditionalFilesPostPublishDelegate
The AdditionalFilesPostPublishDelegate is used with any CAD application that is supported by Windchill, and that can create the type of files indicated in the publish rules.
Once publishing is complete and a representation is stored, the AdditionalFilesPostPublishDelegate copies the content (additional files) of the representation to a WTDocument. This gives enterprise control and visibility of the published content separately from the CAD Document structure, while maintaining a record of the association through a PublishedContentLink. Also, the additional files may be deleted from the original representation using the delete-original <post-publish> parameter.
Furthermore, if the WTDocument already exists, the delegate code iterates the WTDocument, thus providing a means to track the history through the iteration history of the WTDocument.
The tables below list the valid <post-publish> parameter names for the AdditionalFilesPostPublishDelegate and describes how each parameter is used.
Required Parameters
The following parameters are required for the AdditionalFilesPostPublishDelegate class.
Parameter Name
Definition
delegate
Must be com.ptc.wvs.server.publish.AdditionalFilesPostPublishDelegate.
name
The Name of the WTDocument that the AdditionalFilesPostPublishDelegate is to create or iterate. The Name must be unique among all Objects of its Type in order to guarantee that the delegate finds the right Object to iterate. There are four substitution macros that can be used to create the WTDocument name: {ADDITIONAL_FILE_PRIMARY_BASENAME}, {ADDITIONAL_FILE_PRIMARY_EXTENSION}, {ADDITIONAL_FILE_SECONDARY_BASENAME}, and {ADDITIONAL_FILE_SECONDARY_EXTENSION}. These macros are replaced by the primary/secondary file's base name and the primary/secondary file extensions, respectively. For example, if the following post-publish element is used:<post-publishname="name"> Additional_File_For_{AUTHORING_APP}_{EPM_NUMBER}_{ADDITIONAL_FILE_PRIMARY_BASENAME}_{ADDITIONAL_FILE_PRIMARY_EXTENSION}</post-publish>with a part named "01-52108.PRT", the WTDocument is named:Additional_File_For_PROE_01-52108.PRT_step_01-52108_prt_stpWhere the authoring application is "PROE", the EPM number is "01-52108", the additional file basename is "step_01-52108_prt" and the additional file extension is "stp".
Optional Parameters
The following parameters are optional for the AdditionalFilesPostPublishDelegate class.
Parameter Name
Definition
additional-file-primary
The text associated with this attribute is a Java regular expression that matches the name of the additional file that is to be added to the WTDocument as primary content. The regular expression must always resolve to select a single file. If the regular expression resolves to more than one file, a random file is selected.
additional-file-secondary
The text associated with this attribute must be a Java regular expression that matches the name of all additional files that are to be added to the WTDocument as secondary content.
delete-original
This is an additional attribute that can be added to a post-publish element that already contains an additional-file-primary or additional-file-secondary attribute. If this attribute is set to "true" then the original files that match the regular expression are deleted from the original representation
number
The number of the object that the AdditionalFilesPostPublishDelegate is to create/iterate. If specified, the Number must be unique among all Windchill Objects of this Type. If not specified, the Number is automatically generated.
type
The type of object that the PostPublishDelegate is to create. If specified, the Type can be specified by its Logical Identifier and must be a soft-type of wt.doc.WTDocument. If not specified, the AdditionalFilesPostPublishDelegate creates a wt.doc.WTDocument.
title
Title of the WTDocument.
description
Description of the WTDocument.
container-oid
The object identifier string of the container to use for initial creation of the WTDocument.If this value is not specified, container-name is checked; if both are not specified, the WTDocument is placed in the same context as the EPMDocument being published.
container-name
The Path (see example below) to the container or the name (string value) of the container to use for initial creation of the WTDocument. If a name is used and that name does not exist, or there is more than one container with that name, Post-publishing is stopped and an error message is displayed. Container-name is only checked if container-oid is not set. If this value and container-oid are not specified, the WTDocument is placed in the same context as the EPMDocument being published.
Example: /wt.inf.container.OrgContainer=PTC/wt.projmgmt.admin.Project2=TestProj
folder
The folder path for initial creation of the WTDocument.
In Windchill 10.2 M020 and later, if the folder is not specified, it uses the folder path of the representable. If the folder does not exist in the context specified, the missing folders in the path is created. For example:
To specify the root folder:/ /default/Default
* 
Specifying the root folder using default is not case sensitive. All subfolders are case sensitive.
To specify a first-level folder under the root folder:/MyFolder /Default/MyFolder/default/MyFolder
To specify multi-level folders, separate the folder names with “/”:/first/second /first/scond/third/Default/first/second/Default/first/second/third
* 
Since subfolders are case sensitive, /Default/first/second specifies a different folder than /Default/First/second.
content-description
A description for the content of the WTDocument.
lifecycle-template
The life cycle template to associate with the WTDocument.
lifecycle-state
The life cycle state to associate with the WTDocument.
published-content-link
The create Published Content Link indicator. If "false" or "no" (case insensitive), then no Published Content Link (PCL) is created. This is the only way to not create a PCL. If any other string is used, then a PCL is created. That string is used for the name (or type) of the PCL. Multiple param-sets are allowed, so there can be multiple PCL names. In the case where multiple PCLs are named differently, a different link to a different WTDocument is created for each name. If some or all PCLs have the same name, then one wtdoc will be created and iterated for each identical name after the 1st name. A PCL is created for each iteration. Finally, in the case where the "published-content-link" attribute is not included in the param-set, a WTDocument is created and then iterated for each "nameless" published-content-link.
War dies hilfreich?