Specialized Administration > Supporting Visualization and Publishing > WVS Publish Rules > Using Conditions in Publish Rules > Republishing
  
Republishing
In order to handle republishing, a file is stored on the representation during the original publish that is referenced during a republish. This file is called publish_params.xml and has a content-role-type of PUBLISH_PARAMS. During a republish, either from the Representation/Annotation table or a scheduled republish, this file is used to make sure the same options are applied during the republish as during the original publish. This affects the additional files concept in that it ensures that the same additional files are created during a republish as the original publish. The details of the additional file types previously published based on the user selection of additional files (in case of manual representation creation) is stored in the publish_params.xml file.
It is necessary to keep a record of the files that are selected during a manual publish. For example, if a new additional file is added to the publish rules, and it is default, that additional file will be created on a republish. If a file is removed, then the additional file is not created. However, if the “default” attribute in the publish_params.xml file changes, it is necessary to recreate what was created initially. The lists of selections must never change during subsequent republishes because they must always represent the original publish.
publish_params.xmlfile format — The following is an example of a republishing publish_params.xml file:
<result>
<publish on="create-representation" output="PDF"
param-set="Share with Arbortext"
additional-files=”standard_cad_xport_files”
evaluate-rules-on-republish="true" version="1.2">

<post-publish name="name">
GDD_of_01-2_VALVE_TIMING_SPROCKET.PRT<post-publish>
<post-publish name="delegate">
com.ptc.wvs.server.publish.EPMPostPublishDelegate</post-publish>
<post-publish name="published-content-link">create</post-publish>
<post-publish name="type">DynamicDocument</post-publish>

<file displayName="iges 2D" type="iges"
default="true" outputPrefix="2d">
<option name="output_2d" value="true" />
</file>
<file displayName="iges 3D" type="iges"
default="false" outputPrefix="3d">
<option name="output_2d" value="false" />
</file>
<file displayName="step file" type="step"
default="true" outputPrefix="step" />
</publish>

<user-selections>
<selected>
<file displayName="iges 2D" type="iges"
default="true" outputPrefix="2d">
<option name="output_2d" value="true" />
</file>
<file displayName="iges 3D" type="iges"
default="false" outputPrefix="3d">
<option name="output_2d" value="false" />
</file>
</selected>
<unselected>
<file displayName="step file" type="step"
default="true" outputPrefix="step" />
</unselected>
</user-selections>
</result>
In the above example:
The root node is now <result>. Previously, it was just the <publish> section. This is to accommodate <user-selections> as well as <publish>.
Under <publish> there is a new list of <file> elements that represent all the additional files in the selected list in the publish rules file. This list corresponds to the new “additional-files” attribute on the <publish> element.
The <user-selections> element is added to store the list of what file the user actually selected. Under this element are two lists, <selected> and <unselected>.
The evaluate-rules-on-republish attribute on the <publish> tag is added to indicate if the publish rules file must be re-evaluated on a republish instead of looking at this file. If the evaluate-rules-on-republish attribute is set to true, then the publish_params.xml file is not used on a republish; instead, the publish rules are evaluated. If the evaluate-rules-on-republish attribute is set to false, then this file is used on a republish. The evaluate-rules-on-republish attribute can also be an attribute on the rules element. At the rules level, the attribute is used as the default value for any publish elements that do not specify the evaluate-rules-on-republish attribute.
Out-of-the-box, the evaluate-rules-on-republish attribute defaults to false during publishing if not set in the Publish Rules. The Publish Rules, as evaluated during the initial publishing request, are saved with the Representation in the publish_params.xml file. If publish_params.xml does not already include evaluate-rules-on-republish="true", the rules is not be re-evaluated when republishing an existing Representation, either on state change or manually.
At Windchill 10.2 M010, two groups of properties have been added to wvs.properties to provide greater configuration control of the evaluation of Publish Rules during republishing:
publish.evaluaterulesonrepublish.default — provides mechanisms for defining the default when evaluate-rules-on-republish is not present.
publish.evaluaterulesonrepublish.override — provides mechanisms for overriding evaluate-rules-on-republish when it is present.
These two new groups of properties are described below.
The following properties control whether to have Publish Rules re-evaluated for an existing representation that is submitted for republishing when the evaluate-rules-on-republish flag was not specified in the Publish Rules file at the time the representation was created. Valid values for these properties are either true or false. When neither property is present, the default value is false. The authoring application-specific property always takes precedence over the property for all authoring applications.
Property
Description
publish.evaluaterulesonrepublish.default
Default value: False
Specifies the default behavior of evaluate-rules-on-republish during republishing for all authoring applications that are included in the publish.usesPublishRules property.
publish.evaluaterulesonrepublish.default.<AUTHORING_APP>
Default value: False
Specifies the default behavior of evaluate-rules-on-republish during republishing for a specific authoring application that is included in the publish.usesPublishRules property.
When a representation is submitted for republishing, the following properties control whether or how to override the evaluate-rules-on-republish flag that was specified in the Publish Rules file at the time the representation was created. If the evaluate-rules-on-republish flag was not specified in the Publish Rules file at the time the representation was created, these properties have no impact. Instead, the default value specified by the publish.evaluaterulesonrepublish.default property is used.
The authoring application-specific property always takes precedence over the property for all authoring applications. Valid values are either true or false. The value true means always evaluate rules on republish, and the value false means never evaluate rules on republish, regardless of what the evaluate-rules-on-republish flag was originally set to on the representation. When neither property is present, the default is null, which means do not overwrite the evaluate-rules-on-republish value that was originally specified.
Property
Description
publish.evaluaterulesonrepublish.override
Default value: False
Overwrites the evaluate-rules-on-republish behavior during republishing for all authoring applications that are included in the publish.usesPublishRules property.
publish.evaluaterulesonrepublish.override.<AUTHORING_APP>
Default value: False
Overwrites the evaluate-rules-on-republish behavior during republishing for a specific authoring application that is included in the publish.usesPublishRules property.