Is there any way of doing in configuration/customization to stop publishing for specific WTDocument types?
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.
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.
https://www.ptc.com/en/support/article/cs111916