Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
I am using Windchill PDMLink Release 12.0 and Datecode with CPS 12.0.2.8
Is it possible to have contradictory conditions in publish rules.
We want to have a condtion in the publish where content (STEP/PDF) only is published when attribute MODEL_TYPE is empty. If this value is not empy it should not publish any content only the pvz.
Solved! Go to Solution.
Hi @Hans_TS
But you use regex definition in the value definition.
Iam sure that it can not work.
use <or> definition for each value or use regex= parameter instead of value=
PetrH
We already tried the following:
<condition name="3DPRT_released">
<and>
<attribute name="epmdoc_docType" value="CAD Part" />
<attribute name="epmdoc_MODEL_TYPE" regex=")$" />
<or>
<attribute name="epmdoc_lifeCycleState" value="Design Review" />
<attribute name="epmdoc_lifeCycleState" value="Design Approved" />
<attribute name="epmdoc_lifeCycleState" value="Design Manual Approved" />
<attribute name="epmdoc_lifeCycleState" value="Prototype" />
<attribute name="epmdoc_lifeCycleState" value="Production" />
<attribute name="epmdoc_lifeCycleState" value="Obsolete" />
</or>
</and>
</condition>
Publish rule has no error but when attribute MODEL_TYPE is empty is not publishing any content
Hi,
Thank you for your response.
We already tried that but this is not working.
This is resulting in an error during replacing the publish_rules.xml.
H.smits
It could be configured in two ways.
1. attribute value is empy
2. Attribute is not .....|...|
Do you know how to set up the rule that the value must not have some value?
As example
<condition name="3DPRT_released">
<and>
<attribute name="epmdoc_docType" value="CAD Part" />
<attribute name="epmdoc_MODEL_TYPE" value=not "SOLIDPART|SHEETMETALPART" />
<or>
<attribute name="epmdoc_lifeCycleState" value="Design Review" />
<attribute name="epmdoc_lifeCycleState" value="Design Approved" />
<attribute name="epmdoc_lifeCycleState" value="Design Manual Approved" />
<attribute name="epmdoc_lifeCycleState" value="Prototype" />
<attribute name="epmdoc_lifeCycleState" value="Production" />
<attribute name="epmdoc_lifeCycleState" value="Obsolete" />
Hi @Hans_TS
Check the help
Using Conditions in Publish Rules
Examples of Publish Rules XML Files
Supported element NOT
<not>
<attribute name="epmdoc_lifeCycleState" value="Released" />
</not>
PetrH
I tried the following:
Hi @Hans_TS
But you use regex definition in the value definition.
Iam sure that it can not work.
use <or> definition for each value or use regex= parameter instead of value=
PetrH
Thank you I think this is the solution.