cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

How to Stop publishing for Specific WTDocument types?

TT_9345405
11-Garnet

How to Stop publishing for Specific WTDocument types?

Is there any way of doing in configuration/customization to stop publishing for specific WTDocument types?

4 REPLIES 4

You can use the WTProperty

publish.service.filterdocumentpublishmethod  Default Value:  
Synopsis: A method to filter which WTDocuments are published on checkin or upload 
Description: A method can be supplied to provide custom filtering of the WTDocument content that will be published as a result of file upload or checkin (providing they have content that has a worker associated with it). if no method is supplied all WTDocument content that meets the above criteria will be sent for publishing. The property value is specified in the form classname/methodname, with the following signature
public static Boolean methodname(WTDocument doc, ContentItem ci)
a return of Boolean.TRUE indicates the WTDocument should be published, Boolean.FALSE that it should not. 

An example is provided here: https://www.ptc.com/en/support/article/cs52443

 

Hi @BjoernRueegg

 

Thanks for the article.

This property publish.service.filterdocumentpublishmethod will filter/stop publishing only on checkin and upload.

I need to stop publishing on set state.

 

 

I'm not 100% sure but I think the general method will not filter them:

publish.service.filterpublishmethod  Default Value:  
Synopsis: A method to filter which objects can be published 
Description: A method can be supplied to provide custom filtering of Objects that can be published. All publishing, even from preconverted data, will be checked via this method if one has been supplied. If the publish is to convert data stored in Windchill, then the flag publishFromDB will be TRUE, if the publish is for local data or data from the clipboard publishFromDB will be FALSE. The property value is specified in the form classname/methodname, with the following signature
public static Boolean methodname(Persistable p, Boolean publishFromDB)
a return of Boolean.TRUE indicates the Object can be published, Boolean.FALSE that it can not. 

 

public static Boolean methodname(Persistable p, Boolean publishFromDB)

 

But you will also receive all the EPMDocument jobs. 

TomU
23-Emerald IV
(To:TT_9345405)

If you're talking about actual sub-types, you should be able filter these out with the publish rules.  Take a look at conditional rules.

 

TomU_0-1648214748709.png

 

https://support.ptc.com/help/wnc/r12.0.2.0/en/index.html#page/Windchill_Help_Center%2FWVSPublishRulesRecentEnhance.html%23

 

https://www.ptc.com/en/support/article/cs111916

 

Announcements


Top Tags