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

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

Publish rules with multiple conditions

ahoerl
5-Regular Member

Publish rules with multiple conditions

Hello,

 

We are using the following publis rules, they are triggered within a workflow:

 

<?xml version="1.0" encoding="UTF-8"?>

<rules xmlns="http://www.ptc.com"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.ptc.com PublishRulesSchema.xsd"
       evaluate-rules-on-republish="true">
    <!-- The 'evaluate-rules-on-republish' attribute above provides a default value for
         all the <publish> elements in this file. If this attribute is absent here, the
         default is 'false'.
     -->

    <!-- CREO FILES Handling (PROE) -->
    <authoring-application name="PROE">
        <additional-files name="stl">
            <file display-label="STL" type="stl" default="true" output-prefix="stl"/>
        </additional-files>

        <additional-files name="step">
            <file display-label="STEP AP214" type="step" default="true" output-prefix="stp"/>
        </additional-files>

        <additional-files name="x_t">
            <file display-label="Parasolid x_t" type="PARASOLID" default="true" output-prefix="x_t" />
        </additional-files>

        <condition name="makeSTEP">
            <and>
                <or>
                    <attribute name="epmdoc_CADName" regex=".*\.prt" />
                    <attribute name="epmdoc_CADName" regex=".*\.asm" />
                </or>
                <or>
                    <attribute name="epmdoc_TEILEART" value="ABC" />
                    <attribute name="epmdoc_TEILEART" value="XYZ" />
                </or>
            </and>
        </condition>

        <condition name="makeSTL">
            <and>
                <or>
                    <attribute name="epmdoc_CADName" regex=".*\.prt" />
                    <attribute name="epmdoc_CADName" regex=".*\.asm" />
                </or>
                <attribute name="epmdoc_TEILEART" value="STLON" />
            </and>
        </condition>

        <condition name="makeXT">
            <and>
                <or>
                    <attribute name="epmdoc_CADName" regex=".*\.prt" />
                    <attribute name="epmdoc_CADName" regex=".*\.asm" />
                </or>
                <or>
                    <attribute name="epmdoc_TEILEART" value="ABC" />
                    <attribute name="epmdoc_TEILEART" value="XZY" />
                    <attribute name="epmdoc_TEILEART" value="OPQ" />
                </or>
            </and>
        </condition>

        <if condition="makeSTL">
            <publish on="unknown-source" additional-files="stl" param-set="post-stl" />
        </if>

        <if condition="makeSTEP">
            <publish on="unknown-source" additional-files="step" param-set="post-step" />
        </if>

        <if condition="makeXT">
            <publish on="unknown-source" additional-files="x_t" param-set="post-x_t" />
        </if>

        <param-set name="post-stl">
            <post-publish name="delegate">com.ptc.wvs.server.publish.AdditionalFilesPostPublishDelegate</post-publish>
            <post-publish name="name">Stl_File_For_{AUTHORING_APP}_{EPM_NUMBER}_{ADDITIONAL_FILE_PRIMARY_BASENAME}_{ADDITIONAL_FILE_PRIMARY_EXTENSION}</post-publish>
            <post-publish name="published-content-link">stl</post-publish>
            <!--post-publish name="additional-file-primary" delete-original="true">.*\.stl</post-publish-->
        </param-set>

        <param-set name="post-step">
            <post-publish name="delegate">com.ptc.wvs.server.publish.AdditionalFilesPostPublishDelegate</post-publish>
            <post-publish name="name">Step_File_For_{AUTHORING_APP}_{EPM_NUMBER}_{ADDITIONAL_FILE_PRIMARY_BASENAME}_{ADDITIONAL_FILE_PRIMARY_EXTENSION}</post-publish>
            <post-publish name="published-content-link">stp</post-publish>
            <!--post-publish name="additional-file-primary" delete-original="true">.*\.stp</post-publish-->
        </param-set>

        <param-set name="post-x_t">
            <post-publish name="delegate">com.ptc.wvs.server.publish.AdditionalFilesPostPublishDelegate</post-publish>
            <post-publish name="name">XT_File_For_{AUTHORING_APP}_{EPM_NUMBER}_{ADDITIONAL_FILE_PRIMARY_BASENAME}_{ADDITIONAL_FILE_PRIMARY_EXTENSION}</post-publish>
            <post-publish name="published-content-link">x_t</post-publish>
            <!--post-publish name="additional-file-primary" delete-original="true">.*\.x_t</post-publish-->
        </param-set>

    </authoring-application>
</rules>

The publishing basically works, but for documents that match multiple criteria (for example makeXT and makeSTEP, only STEP files are generated. Is windchill only evaluating one if statement?

 

Thanks for your help 🙂 

ACCEPTED SOLUTION

Accepted Solutions
TomU
23-Emerald IV
(To:ahoerl)

Yes, only the first match is executed.  You need to create conditional statements that capture all possible variants.  Here is a small chunk of my current rules.  Notice how there are multiple additional files sections with different combinations.

 

<?xml version="1.0" encoding="UTF-8"?>

<rules xmlns="http://www.ptc.com"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.ptc.com PublishRulesSchema.xsd"
       evaluate-rules-on-republish="true">
	<!-- The 'evaluate-rules-on-republish' attribute above provides a default value for
		all the <publish> elements in this file. If this attribute is absent here, the
		default is 'false'.
	-->

    <authoring-application name="PROE">
	
		<!-- Additional files definitions -->
		<additional-files name="2D_IGES_DXF_PDF">
			<file display-label="IGES" type="iges" default="true" output-prefix="IGES" />
			<file display-label="DXF"  type="dxf" default="true" output-prefix="DXF" />
			<file display-label="PDF" type="pdf" default="true" output-prefix="PDF" />
		</additional-files>
		
		<additional-files name="2D_PDF">
			<file display-label="PDF" type="pdf" default="true" output-prefix="PDF" />
		</additional-files>
		
		<additional-files name="3D_ASM_STEP">
			<file display-label="STEP" type="step" default="true" output-prefix="STEP">
				<option name="AssemblyConfiguration" value="SingleFile" />
				<option name="ConvertGeometry" value="Solids|Surfaces" />
			</file>
		</additional-files>
		
		<additional-files name="3D_PRT_STEP">
			<file display-label="STEP" type="step" default="true" output-prefix="STEP">
				<option name="ConvertGeometry" value="Solids|Surfaces" />
			</file>
		</additional-files>

		<additional-files name="TM_ASSEMBLY_IGES_STEP_STL">
			<file display-label="IGES" type="iges" default="true" output-prefix="IGES">
				<option name="AssemblyConfiguration" value="SingleFile" />
				<option name="ConvertGeometry" value="Solids|Quilts" />
			</file>
			<file display-label="STEP" type="step" default="true" output-prefix="STEP">
				<option name="AssemblyConfiguration" value="SingleFile" />
				<option name="ConvertGeometry" value="Solids|Surfaces" />
			</file>
			<file display-label="STL" type="stl" default="true" output-prefix="STL">
				<option name="ChordHeight" value="0.01" />
			</file>
		</additional-files>
		
		<additional-files name="TM_PART_IGES_STEP_STL">
			<file display-label="IGES" type="iges" default="true" output-prefix="IGES">
				<option name="ConvertGeometry" value="Solids|Quilts" />
			</file>
			<file display-label="STEP" type="step" default="true" output-prefix="STEP">
				<option name="ConvertGeometry" value="Solids|Surfaces" />
			</file>
			<file display-label="STL" type="stl" default="true" output-prefix="STL">
				<option name="ChordHeight" value="0.01" />
			</file>
		</additional-files>
		
		<!-- ================================================================== -->
		<!-- ======================= In Work ================================== -->
		<!-- ================================================================== -->
		<!-- 2D Creo objects that are allowed to be published at 'In Work' state -->
		<condition name="2D_Creo_Type_In_Work">
			<and>
				<or>
					<attribute name="epmdoc_docType" value="Drawing"/>
					<attribute name="epmdoc_docType" value="Format"/>
					<attribute name="epmdoc_docType" value="Layout"/>
				</or>
				<attribute name="epmdoc_lifeCycleState" value="In Work"/>
			</and>
		</condition>
		<if condition="2D_Creo_Type_In_Work">
			<publish on="create-representation" display-label="2D Manual Publish (CI01)" />
			<publish on="create-representation" display-label="2D Manual Publish + PDF (CI01a)" additional-files="2D_PDF" />
			<publish on="checkin" display-label="Check-in Publish (CI02)" />
			<publish on="schedule" display-label="Scheduled Publish (CI03)" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish (CI04)" />
		</if>
		
		<!-- Creo parts that are allowed to be published at 'In Work' state -->
		<condition name="Creo_Parts_In_Work">
			<and>
				<attribute name="epmdoc_docType" value="CAD Part"/>
				<attribute name="epmdoc_lifeCycleState" value="In Work"/>
			</and>
		</condition>
		<if condition="Creo_Parts_In_Work">
			<publish on="create-representation" display-label="3D Manual Publish (CI05)" />
			<publish on="checkin" display-label="Check-in Publish (CI06)" />
			<publish on="schedule" display-label="Scheduled Publish (CI07)" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish (CI08)" />
		</if>
		
		<!-- Creo assemblies that are allowed to be published at 'In Work' state -->
		<condition name="Creo_Assemblies_In_Work">
			<and>
				<attribute name="epmdoc_docType" value="Assembly"/>
				<attribute name="epmdoc_lifeCycleState" value="In Work"/>
			</and>
		</condition>
		<if condition="Creo_Assemblies_In_Work">
			<publish on="create-representation" display-label="3D Manual Publish (CI09)" />
			<publish on="checkin" display-label="Check-in Publish (CI10)" />
			<publish on="schedule" display-label="Scheduled Publish (CI11)" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish (CI12)" />
		</if>
		

		<!-- ================================================================== -->
		<!-- ======================= Released ================================= -->
		<!-- ================================================================== -->
		<!-- 2D Creo objects that are allowed to be published at 'Released' state, but without export data -->
		<condition name="2D_Creo_Type_Released_No_Export">
			<and>
				<or>
					<attribute name="epmdoc_docType" value="Drawing"/>
					<attribute name="epmdoc_docType" value="Format"/>
					<attribute name="epmdoc_docType" value="Layout"/>
				</or>
				<attribute name="epmdoc_lifeCycleState" value="Released"/>
				<attribute name="epmdoc_EXPORT_DATA" value="False"/>
			</and>
		</condition>
		<if condition="2D_Creo_Type_Released_No_Export">
			<publish on="create-representation" display-label="2D Manual Publish + IGES/DXF/PDF (CR01)" additional-files="2D_IGES_DXF_PDF" />
			<publish on="create-representation" display-label="2D Manual Publish + PDF (CR02)" additional-files="2D_PDF" />
			<publish on="schedule" display-label="Scheduled Publish + PDF (CR03)" additional-files="2D_PDF" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish + PDF (CR04)" additional-files="2D_PDF" />
		</if>
		
		<!-- 2D Creo objects that are allowed to be published at 'Released' state with export data -->
		<condition name="2D_Creo_Type_Released_With_Export">
			<and>
				<or>
					<attribute name="epmdoc_docType" value="Drawing"/>
					<attribute name="epmdoc_docType" value="Format"/>
					<attribute name="epmdoc_docType" value="Layout"/>
				</or>
				<attribute name="epmdoc_lifeCycleState" value="Released"/>
				<!-- No EXPORT_DATA check required.  Export unless explicitly set to "No". -->
			</and>
		</condition>
		<if condition="2D_Creo_Type_Released_With_Export">
			<publish on="create-representation" display-label="2D Manual Publish + IGES/DXF/PDF (CR05)" additional-files="2D_IGES_DXF_PDF" />
			<publish on="schedule" display-label="Scheduled Publish + IGES/DXF/PDF (CR06)" additional-files="2D_IGES_DXF_PDF" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish + IGES/DXF/PDF (CR07)" additional-files="2D_IGES_DXF_PDF" />
		</if>

		<!-- Creo 'TM Parts' at 'Released' state in the Pre-Production context -->
		<condition name="Creo_TM_Parts_Released_With_Export">
			<and>
				<attribute name="epmdoc_docType" value="CAD Part"/>
				<attribute name="epmdoc_lifeCycleState" value="Released"/>
				<attribute name="epmdoc_containerName" value="Pre-Production"/>
				<!-- No EXPORT_DATA check required.  Export regardless of the value. -->
			</and>
		</condition>
		<if condition="Creo_TM_Parts_Released_With_Export">
			<publish on="create-representation" display-label="3D Manual Publish + IGES/STEP/STL (CR08)" additional-files="TM_PART_IGES_STEP_STL" />
			<publish on="schedule" display-label="Scheduled Publish + IGES/STEP/STL (CR09)" additional-files="TM_PART_IGES_STEP_STL" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish + IGES/STEP/STL (CR10)" additional-files="TM_PART_IGES_STEP_STL" />
		</if>
		
		<!-- Creo parts that are allowed to be published at 'Released' state, but without export data -->
		<condition name="Creo_Parts_Released_No_Export">
			<and>
				<attribute name="epmdoc_docType" value="CAD Part"/>
				<attribute name="epmdoc_lifeCycleState" value="Released"/>
				<attribute name="epmdoc_EXPORT_DATA" value="False"/>
			</and>
		</condition>
		<if condition="Creo_Parts_Released_No_Export">
			<publish on="create-representation" display-label="3D Manual Publish + STEP (CR11)" additional-files="3D_PRT_STEP" />
			<publish on="create-representation" display-label="3D Manual Publish - No Export (CR12)" />
			<publish on="schedule" display-label="Scheduled Publish - No Export (CR13)" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish - No Export (CR14)" />
		</if>
		
		<!-- Creo parts that are allowed to be published at 'Released' state with export data -->
		<condition name="Creo_Parts_Released_With_Export">
			<and>
				<attribute name="epmdoc_docType" value="CAD Part"/>
				<attribute name="epmdoc_lifeCycleState" value="Released"/>
				<!-- No EXPORT_DATA check required.  Export unless explicitly set to "No". -->
			</and>
		</condition>
		<if condition="Creo_Parts_Released_With_Export">
			<publish on="create-representation" display-label="3D Manual Publish + STEP (CR15)" additional-files="3D_PRT_STEP" />
			<publish on="schedule" display-label="Scheduled Publish + STEP (CR16)" additional-files="3D_PRT_STEP" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish + STEP (CR17)" additional-files="3D_PRT_STEP" />
		</if>	

		<!-- Creo 'TM Assemblies' at 'Released' state in the Pre-Production context -->
		<condition name="Creo_TM_Assemblies_Released_With_Export">
			<and>
				<attribute name="epmdoc_docType" value="Assembly"/>
				<attribute name="epmdoc_lifeCycleState" value="Released"/>
				<attribute name="epmdoc_containerName" value="Pre-Production"/>
				<!-- No EXPORT_DATA check required.  Export regardless of the value. -->
			</and>
		</condition>
		<if condition="Creo_TM_Assemblies_Released_With_Export">
			<publish on="create-representation" display-label="3D Manual Publish + IGES/STEP/STL (CR18)" additional-files="TM_ASSEMBLY_IGES_STEP_STL" />
			<publish on="schedule" display-label="Scheduled Publish + IGES/STEP/STL (CR19)" additional-files="TM_ASSEMBLY_IGES_STEP_STL" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish + IGES/STEP/STL (CR20)" additional-files="TM_ASSEMBLY_IGES_STEP_STL" />
		</if>
		
		<!-- Creo assemblies that are allowed to be published at 'Released' state with export data -->
		<condition name="Creo_Assemblies_Released_With_Export">
			<and>
				<attribute name="epmdoc_docType" value="Assembly"/>
				<attribute name="epmdoc_lifeCycleState" value="Released"/>
				<attribute name="epmdoc_EXPORT_DATA" value="True"/>
			</and>
		</condition>
		<if condition="Creo_Assemblies_Released_With_Export">
			<publish on="create-representation" display-label="3D Manual Publish + STEP (CR21)" additional-files="3D_ASM_STEP" />
			<publish on="schedule" display-label="Scheduled Publish + STEP (CR22)" additional-files="3D_ASM_STEP" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish + STEP (CR23)" additional-files="3D_ASM_STEP" />
		</if>
		
		<!-- Creo assemblies that are allowed to be published at 'Released' state, but without export data -->
		<condition name="Creo_Assemblies_Released_No_Export">
			<and>
				<attribute name="epmdoc_docType" value="Assembly"/>
				<attribute name="epmdoc_lifeCycleState" value="Released"/>
				<!-- No EXPORT_DATA check required.  Do NOT export unless explicitly set to "Yes". -->
			</and>
		</condition>
		<if condition="Creo_Assemblies_Released_No_Export">
			<publish on="create-representation" display-label="3D Manual Publish + STEP (CR24)" additional-files="3D_ASM_STEP" />
			<publish on="create-representation" display-label="3D Manual Publish - No Export (CR25)" />
			<publish on="schedule" display-label="Scheduled Publish - No Export (CR26)" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish - No Export (CR27)" />
		</if>

View solution in original post

7 REPLIES 7
TomU
23-Emerald IV
(To:ahoerl)

Yes, only the first match is executed.  You need to create conditional statements that capture all possible variants.  Here is a small chunk of my current rules.  Notice how there are multiple additional files sections with different combinations.

 

<?xml version="1.0" encoding="UTF-8"?>

<rules xmlns="http://www.ptc.com"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.ptc.com PublishRulesSchema.xsd"
       evaluate-rules-on-republish="true">
	<!-- The 'evaluate-rules-on-republish' attribute above provides a default value for
		all the <publish> elements in this file. If this attribute is absent here, the
		default is 'false'.
	-->

    <authoring-application name="PROE">
	
		<!-- Additional files definitions -->
		<additional-files name="2D_IGES_DXF_PDF">
			<file display-label="IGES" type="iges" default="true" output-prefix="IGES" />
			<file display-label="DXF"  type="dxf" default="true" output-prefix="DXF" />
			<file display-label="PDF" type="pdf" default="true" output-prefix="PDF" />
		</additional-files>
		
		<additional-files name="2D_PDF">
			<file display-label="PDF" type="pdf" default="true" output-prefix="PDF" />
		</additional-files>
		
		<additional-files name="3D_ASM_STEP">
			<file display-label="STEP" type="step" default="true" output-prefix="STEP">
				<option name="AssemblyConfiguration" value="SingleFile" />
				<option name="ConvertGeometry" value="Solids|Surfaces" />
			</file>
		</additional-files>
		
		<additional-files name="3D_PRT_STEP">
			<file display-label="STEP" type="step" default="true" output-prefix="STEP">
				<option name="ConvertGeometry" value="Solids|Surfaces" />
			</file>
		</additional-files>

		<additional-files name="TM_ASSEMBLY_IGES_STEP_STL">
			<file display-label="IGES" type="iges" default="true" output-prefix="IGES">
				<option name="AssemblyConfiguration" value="SingleFile" />
				<option name="ConvertGeometry" value="Solids|Quilts" />
			</file>
			<file display-label="STEP" type="step" default="true" output-prefix="STEP">
				<option name="AssemblyConfiguration" value="SingleFile" />
				<option name="ConvertGeometry" value="Solids|Surfaces" />
			</file>
			<file display-label="STL" type="stl" default="true" output-prefix="STL">
				<option name="ChordHeight" value="0.01" />
			</file>
		</additional-files>
		
		<additional-files name="TM_PART_IGES_STEP_STL">
			<file display-label="IGES" type="iges" default="true" output-prefix="IGES">
				<option name="ConvertGeometry" value="Solids|Quilts" />
			</file>
			<file display-label="STEP" type="step" default="true" output-prefix="STEP">
				<option name="ConvertGeometry" value="Solids|Surfaces" />
			</file>
			<file display-label="STL" type="stl" default="true" output-prefix="STL">
				<option name="ChordHeight" value="0.01" />
			</file>
		</additional-files>
		
		<!-- ================================================================== -->
		<!-- ======================= In Work ================================== -->
		<!-- ================================================================== -->
		<!-- 2D Creo objects that are allowed to be published at 'In Work' state -->
		<condition name="2D_Creo_Type_In_Work">
			<and>
				<or>
					<attribute name="epmdoc_docType" value="Drawing"/>
					<attribute name="epmdoc_docType" value="Format"/>
					<attribute name="epmdoc_docType" value="Layout"/>
				</or>
				<attribute name="epmdoc_lifeCycleState" value="In Work"/>
			</and>
		</condition>
		<if condition="2D_Creo_Type_In_Work">
			<publish on="create-representation" display-label="2D Manual Publish (CI01)" />
			<publish on="create-representation" display-label="2D Manual Publish + PDF (CI01a)" additional-files="2D_PDF" />
			<publish on="checkin" display-label="Check-in Publish (CI02)" />
			<publish on="schedule" display-label="Scheduled Publish (CI03)" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish (CI04)" />
		</if>
		
		<!-- Creo parts that are allowed to be published at 'In Work' state -->
		<condition name="Creo_Parts_In_Work">
			<and>
				<attribute name="epmdoc_docType" value="CAD Part"/>
				<attribute name="epmdoc_lifeCycleState" value="In Work"/>
			</and>
		</condition>
		<if condition="Creo_Parts_In_Work">
			<publish on="create-representation" display-label="3D Manual Publish (CI05)" />
			<publish on="checkin" display-label="Check-in Publish (CI06)" />
			<publish on="schedule" display-label="Scheduled Publish (CI07)" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish (CI08)" />
		</if>
		
		<!-- Creo assemblies that are allowed to be published at 'In Work' state -->
		<condition name="Creo_Assemblies_In_Work">
			<and>
				<attribute name="epmdoc_docType" value="Assembly"/>
				<attribute name="epmdoc_lifeCycleState" value="In Work"/>
			</and>
		</condition>
		<if condition="Creo_Assemblies_In_Work">
			<publish on="create-representation" display-label="3D Manual Publish (CI09)" />
			<publish on="checkin" display-label="Check-in Publish (CI10)" />
			<publish on="schedule" display-label="Scheduled Publish (CI11)" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish (CI12)" />
		</if>
		

		<!-- ================================================================== -->
		<!-- ======================= Released ================================= -->
		<!-- ================================================================== -->
		<!-- 2D Creo objects that are allowed to be published at 'Released' state, but without export data -->
		<condition name="2D_Creo_Type_Released_No_Export">
			<and>
				<or>
					<attribute name="epmdoc_docType" value="Drawing"/>
					<attribute name="epmdoc_docType" value="Format"/>
					<attribute name="epmdoc_docType" value="Layout"/>
				</or>
				<attribute name="epmdoc_lifeCycleState" value="Released"/>
				<attribute name="epmdoc_EXPORT_DATA" value="False"/>
			</and>
		</condition>
		<if condition="2D_Creo_Type_Released_No_Export">
			<publish on="create-representation" display-label="2D Manual Publish + IGES/DXF/PDF (CR01)" additional-files="2D_IGES_DXF_PDF" />
			<publish on="create-representation" display-label="2D Manual Publish + PDF (CR02)" additional-files="2D_PDF" />
			<publish on="schedule" display-label="Scheduled Publish + PDF (CR03)" additional-files="2D_PDF" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish + PDF (CR04)" additional-files="2D_PDF" />
		</if>
		
		<!-- 2D Creo objects that are allowed to be published at 'Released' state with export data -->
		<condition name="2D_Creo_Type_Released_With_Export">
			<and>
				<or>
					<attribute name="epmdoc_docType" value="Drawing"/>
					<attribute name="epmdoc_docType" value="Format"/>
					<attribute name="epmdoc_docType" value="Layout"/>
				</or>
				<attribute name="epmdoc_lifeCycleState" value="Released"/>
				<!-- No EXPORT_DATA check required.  Export unless explicitly set to "No". -->
			</and>
		</condition>
		<if condition="2D_Creo_Type_Released_With_Export">
			<publish on="create-representation" display-label="2D Manual Publish + IGES/DXF/PDF (CR05)" additional-files="2D_IGES_DXF_PDF" />
			<publish on="schedule" display-label="Scheduled Publish + IGES/DXF/PDF (CR06)" additional-files="2D_IGES_DXF_PDF" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish + IGES/DXF/PDF (CR07)" additional-files="2D_IGES_DXF_PDF" />
		</if>

		<!-- Creo 'TM Parts' at 'Released' state in the Pre-Production context -->
		<condition name="Creo_TM_Parts_Released_With_Export">
			<and>
				<attribute name="epmdoc_docType" value="CAD Part"/>
				<attribute name="epmdoc_lifeCycleState" value="Released"/>
				<attribute name="epmdoc_containerName" value="Pre-Production"/>
				<!-- No EXPORT_DATA check required.  Export regardless of the value. -->
			</and>
		</condition>
		<if condition="Creo_TM_Parts_Released_With_Export">
			<publish on="create-representation" display-label="3D Manual Publish + IGES/STEP/STL (CR08)" additional-files="TM_PART_IGES_STEP_STL" />
			<publish on="schedule" display-label="Scheduled Publish + IGES/STEP/STL (CR09)" additional-files="TM_PART_IGES_STEP_STL" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish + IGES/STEP/STL (CR10)" additional-files="TM_PART_IGES_STEP_STL" />
		</if>
		
		<!-- Creo parts that are allowed to be published at 'Released' state, but without export data -->
		<condition name="Creo_Parts_Released_No_Export">
			<and>
				<attribute name="epmdoc_docType" value="CAD Part"/>
				<attribute name="epmdoc_lifeCycleState" value="Released"/>
				<attribute name="epmdoc_EXPORT_DATA" value="False"/>
			</and>
		</condition>
		<if condition="Creo_Parts_Released_No_Export">
			<publish on="create-representation" display-label="3D Manual Publish + STEP (CR11)" additional-files="3D_PRT_STEP" />
			<publish on="create-representation" display-label="3D Manual Publish - No Export (CR12)" />
			<publish on="schedule" display-label="Scheduled Publish - No Export (CR13)" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish - No Export (CR14)" />
		</if>
		
		<!-- Creo parts that are allowed to be published at 'Released' state with export data -->
		<condition name="Creo_Parts_Released_With_Export">
			<and>
				<attribute name="epmdoc_docType" value="CAD Part"/>
				<attribute name="epmdoc_lifeCycleState" value="Released"/>
				<!-- No EXPORT_DATA check required.  Export unless explicitly set to "No". -->
			</and>
		</condition>
		<if condition="Creo_Parts_Released_With_Export">
			<publish on="create-representation" display-label="3D Manual Publish + STEP (CR15)" additional-files="3D_PRT_STEP" />
			<publish on="schedule" display-label="Scheduled Publish + STEP (CR16)" additional-files="3D_PRT_STEP" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish + STEP (CR17)" additional-files="3D_PRT_STEP" />
		</if>	

		<!-- Creo 'TM Assemblies' at 'Released' state in the Pre-Production context -->
		<condition name="Creo_TM_Assemblies_Released_With_Export">
			<and>
				<attribute name="epmdoc_docType" value="Assembly"/>
				<attribute name="epmdoc_lifeCycleState" value="Released"/>
				<attribute name="epmdoc_containerName" value="Pre-Production"/>
				<!-- No EXPORT_DATA check required.  Export regardless of the value. -->
			</and>
		</condition>
		<if condition="Creo_TM_Assemblies_Released_With_Export">
			<publish on="create-representation" display-label="3D Manual Publish + IGES/STEP/STL (CR18)" additional-files="TM_ASSEMBLY_IGES_STEP_STL" />
			<publish on="schedule" display-label="Scheduled Publish + IGES/STEP/STL (CR19)" additional-files="TM_ASSEMBLY_IGES_STEP_STL" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish + IGES/STEP/STL (CR20)" additional-files="TM_ASSEMBLY_IGES_STEP_STL" />
		</if>
		
		<!-- Creo assemblies that are allowed to be published at 'Released' state with export data -->
		<condition name="Creo_Assemblies_Released_With_Export">
			<and>
				<attribute name="epmdoc_docType" value="Assembly"/>
				<attribute name="epmdoc_lifeCycleState" value="Released"/>
				<attribute name="epmdoc_EXPORT_DATA" value="True"/>
			</and>
		</condition>
		<if condition="Creo_Assemblies_Released_With_Export">
			<publish on="create-representation" display-label="3D Manual Publish + STEP (CR21)" additional-files="3D_ASM_STEP" />
			<publish on="schedule" display-label="Scheduled Publish + STEP (CR22)" additional-files="3D_ASM_STEP" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish + STEP (CR23)" additional-files="3D_ASM_STEP" />
		</if>
		
		<!-- Creo assemblies that are allowed to be published at 'Released' state, but without export data -->
		<condition name="Creo_Assemblies_Released_No_Export">
			<and>
				<attribute name="epmdoc_docType" value="Assembly"/>
				<attribute name="epmdoc_lifeCycleState" value="Released"/>
				<!-- No EXPORT_DATA check required.  Do NOT export unless explicitly set to "Yes". -->
			</and>
		</condition>
		<if condition="Creo_Assemblies_Released_No_Export">
			<publish on="create-representation" display-label="3D Manual Publish + STEP (CR24)" additional-files="3D_ASM_STEP" />
			<publish on="create-representation" display-label="3D Manual Publish - No Export (CR25)" />
			<publish on="schedule" display-label="Scheduled Publish - No Export (CR26)" />
			<!-- Publish when triggered by "Set State" or a Workflow Expression Robot.  See CS158347 -->
			<publish on="unknown-source" display-label="Workflow Publish - No Export (CR27)" />
		</if>
ahoerl
5-Regular Member
(To:TomU)

Ok thank you. I will also create combined rules then.

BalazsToth
12-Amethyst
(To:TomU)

Hello, 

 

thanks for your XML file. It is wery helpful. Could you explain me what is the epmdoc_EXPORT_DATA attribute? Thanks. 

TomU
23-Emerald IV
(To:BalazsToth)


@BalazsToth wrote:

Could you explain me what is the epmdoc_EXPORT_DATA attribute?


It's a parameter in our CAD models (mapped to an attribute in Windchill) that is used as a switch to determine whether or not to generate export data (IGES, DXF, and STEP files) during publishing.

HB_9365038
5-Regular Member
(To:TomU)

Thanks you @TomU .

You think that such attribute car be user to publish only one of DRW sheets ? 

We usually put the DXF as the latest sheet of the drawing. 

The targe is to publish: 

  • sheet1: to PDF
  • sheet2: to PDF
  • DXF: to DXF format

Kind regards, 

Haithem

TomU
23-Emerald IV
(To:HB_9365038)

It does not appear so.

 

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

 

TomU_0-1701294483668.png

 

mmeadows-3
14-Alexandrite
(To:TomU)

Hi Haithem,

 

This is possible using INNEO's Genius Tools Worker.

Genuis Tools Model Processor | FELCO Solutions

Model Processor Worker is an off the shelf product that plugs into the Creo CAD Worker and generates additional files that get uploaded and put back in Windchill as Representation additional content.

It can read a parameter value from the model and decide what sheets to export to which formats.

We use it frequently to create sheet metal DXF flat state drawings.  Users don't create the flat state drawings, we do that during publishing.

Announcements


Top Tags