Hi @HJ1
Yes the publish actions are outside of if condition
because if the condition is not met it will publish all other situations.
You can also combinate it with other conditions.
The best would be to share the PublishRule xml to see what could be wrong.
Be careful to combinate more conditions together. The sequence of conditions is very important .
If first condition is met the second is not used anymore for one object.
It happened to me many times.
My full example> (if conditions are not met it will publish standard_files configuration)
<?xml version="1.0"?>
<rules evaluate-rules-on-republish="true"
xsi:schemaLocation="http://www.ptc.com PublishRulesSchema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.ptc.com">
<authoring-application name="PROE">
<additional-files name="standard_files">
<!-- only default='true' files will be generated at this time -->
<file output-prefix="step" default="false" type="step" display-label="STEP"/>
<file output-prefix="iges" default="false" type="iges" display-label="IGES"/>
<file output-prefix="dxf" default="false" type="dxf" display-label="DXF"/>
<file output-prefix="cgm" default="false" type="cgm" display-label="CGM"/>
<file output-prefix="pdf" default="false" type="pdf" display-label="pdf"/>
</additional-files>
<additional-files name="released_drawing">
<!-- only default='true' files will be generated at this time -->
<file output-prefix="dxf" default="true" type="dxf" display-label="DXF"/>
<file output-prefix="pdf" default="true" type="pdf" display-label="pdf"/>
</additional-files>
<condition name="do_not_publish">
<and>
<attribute name="epmdoc_lifeCycleState" value="Under Review"/>
</and>
</condition>
<condition name="is_released_drawing">
<and>
<attribute name="epmdoc_CADName" regex=".*\.drw" />
<or>
<attribute name="epmdoc_lifeCycleState" value="Released"/>
<attribute name="epmdoc_lifeCycleState" value="Uvolněno"/>
<attribute name="epmdoc_lifeCycleState" value="Schvaleno"/>
</or>
</and>
</condition>
<if condition="do_not_publish">
</if>
<if condition="is_released_drawing">
<publish on="checkin" display-label="Released Drawing" additional-files="released_drawing"/>
<publish on="create-representation" display-label="Released Drawing" additional-files="released_drawing" />
<publish on="schedule" display-label="Released Drawing" additional-files="released_drawing"/>
<publish on="unknown-source" display-label="Released Drawing" additional-files="released_drawing"/>
</if>
<publish additional-files="standard_files" on="checkin"/>
<publish additional-files="standard_files" on="create-representation"/>
<publish additional-files="standard_files" on="schedule" />
<publish additional-files="standard_files" on="unknown-source" />
</authoring-application>
</rules>
PetrH