Specialized Administration > Supporting Visualization and Publishing > WVS Publisher > Advanced Publishing Configuration > Recipe Overlay Mechanism
  
Recipe Overlay Mechanism
Introduction
The WVS Recipe Overlay Mechanism provides a useful technique for adjusting a worker’s runtime recipe configuration for specific categories of publish jobs. The initial recipe configuration is defined by the recipe (.rcp) file residing in the Creo View Adapter’s setup folder, for example proe2pv.rcp. Overlay recipe can also be configured from Windchill server that overrides the initial recipe configuration.
* 
Since VCS users do not have direct access to worker configuration, the recipes are driven through Windchill server using the recipe overlay mechanism.
This section covers the properties that you can use to configure the following aspects of the Recipe Overlay mechanism:
Configuration of overlay recipe file on Windchill server
Naming convention of overlay recipe files
Properties for overlay recipe configuration and naming
The overlay recipe file is added to the transfer folder that is sent to the worker that processes the publish job using the configured common file-system folder. Overlay recipe files can be managed using any of the following mechanisms:
Visualization Configuration Administration UI
Publish rules
WVS properties
Managing Worker Overlay Recipe Files Using the Visualization Configuration Administration UI
You can use the Visualization Configuration Administration UI for managing overlay recipe files on the Windchill server machine. This mechanism provides the following capabilities, assuming you have access to Products, Projects, Libraries, Organizations, or Site context:
Allows you to upload recipe files (.rcp only) to Windchill server using the Visualization Configuration Administration UI from any of the contexts.
Allows you to associate overlay recipe files based on shape type and conversion type information in the recipe file name.
Allows you to associate overlay recipe files based on the publish rules.
* 
The recipe files can be configured for all the context types. If a recipe file is configured at different context levels, the recipe file at the lowest level is used and will not be merged with the recipe file configured at the higher level. For example, a recipe file configured at the organization context level gets overriden in the child context (such as Product or Library) to allow for specific context needs. For more information, see Context Inheritance.
The sections “Advanced Configurations Based On Recipe File Name” and “Advanced Configurations Based On Publish Rules” describe the advanced configurations based on the recipe file name and publish rules for the simplified management of worker overlay recipe files on the Windchill server machine using the Visualization Configuration Administration UI.
Advanced Configurations Based On Recipe File Name
Based on the name of the recipe file uploaded to the Visualization Configuration Administration UI, WVS evaluates and decides which recipe file to send to worker based on the shape type and conversion type mentioned in the file name. The name of the recipe file must be in the following format:
publish_overlayrecipefile_fortype_<shape type>_<conversion type>.rcp
Where:
Shape type refers to the authoring application name such as PROE, SOLIDWORKS, and so on.
Conversion type refers to the file type such as prt, view (for assembly), and so on. The following table provides examples of conversion types and their description:
Conversion Type
Description
prt
Part
drw
Drawing
view
Assembly
viewsingle
Positioning Assembly (PosAssy)
singlelevel
Extended Positioning Assembly (XPosAssy)
lay
Creo Layout File
dgm
Creo Diagram File
frm
Creo Drawing Format File
If the value for conversion type is not provided in the name, then based on the shape type the same recipe file will be used for all the file types (Part, Drawing, and so on). For example, assume that the publish_overlayrecipefile_fortype_PROE_prt.rcp and publish_overlayrecipefile_fortype_PROE.rcp files are uploaded in the Visualization Configuration Administration UI. In this case, the publish_overlayrecipefile_fortype_PROE_prt.rcp recipe file is used when publishing it for PROE Part file. The publish_overlayrecipefile_fortype_PROE.rcp file, that is a generic file for PROE shape type, is used for all other file types such as Assembly, Drawing, and so on, of PROE publishing.
* 
Overlay recipe files uploaded in the Visualization Configuration Administration UI take precedence over the method where files are placed in the Windchill server machine directory.
When fetching the overlay recipe file, if WVS does not find the recipe file in the Visualization Configuration Administration UI with the appropriate name based on the shape and conversion type, then WVS uses the method of using Windchill server directory for accessing overlay recipe files.
Advanced Configurations Based On Publish Rules
You can also use the publish rule definition to fetch the overlay recipe using the Visualization Configuration Administration UI.
When fetching the overlay recipe file using the publish rule definition:
If the recipe file name defined in the publish rule exists in the Visualization Configuration Administration, the job succeeds and uses the recipe options from the overlay recipe file.
this recipe file takes precedence over the other two methods (accessing Windchill server directory for accessing the recipe file or fetching the recipe file based on the recipe file name).
If the recipe file name defined in the publish rule does not exists in the Visualization Configuration Administration, the job fails.
If the worker does not support the publish rule (such as thumbnail or Office) or if the publish rule is not configured, the overlay recipe is always fetched from the Visualization Configuration Administration UI using shape and conversion type. However, if the file does not exist in this UI, the mechanism of using Windchill server machine directory is used for accessing overlay recipe files.
The following is an example of the overlay-recipe-file attribute:
<if condition="is_unreleased_part">
<publish on="checkin" overlay-recipe-file="test.rcp"/>
</if>

<condition name="is_unreleased_part">
<and>
<attribute name="epmdoc_lifeCycleName" value="Basic"/>
<not>
<attribute name="epmdoc_lifeCycleState" value="Released"/>
</not>
</and>
</condition>
For more information about the overlay-recipe-file attribute, see Evaluating Publish Rules.
Defining the name of the overlay recipe file to create
The information in this and the following sections is based on the information relating to each property in the wvs.properties.xconf file.
When sending an overlay recipe to a worker, WVS needs to know the correct name of the overlay recipe file to create and send in order for the receiving worker to recognize it. This is based on the shape type as the default name in the adapter recipe file is different for different adapters. The following are examples.
<Property default="pview_overlay.rcp"
name="publish.overlayrecipefile.overlayfilename"/>

<Property default="pview_proe2pv_overlay.rcp"
name="publish.overlayrecipefile.overlayfilename.PROE"/>

<Property default="pview_ug2pv_overlay.rcp"
name=""publish.overlayrecipefile.overlayfilename.UG"/>

<Property default="pview_sw2pv_overlay.rcp"
name=""publish.overlayrecipefile.overlayfilename.SOLIDWORKS"/>

<Property default="pview_inventor2pv_overlay.rcp"
name="publish.overlayrecipefile.overlayfilename.INVENTOR"/>

<Property default="pview_catia5_pv_overlay.rcp"
name="publish.overlayrecipefile.overlayfilename.CATIAV5"/>
The resulting overlay recipe file is sent to the worker along with the job (_wvsjob.paj) file via the Common File System.
These properties must not be edited in most cases, although new entries can be added for missing shape types, for example
<Property default="pview_ccdraft2pv_overlay.rcp"
name="publish.overlayrecipefile.overlayfilename.COCRDRAFT"/>
Define the adapter label to use for the file parameter in the Overlay Recipe file WVS creates
The publish.overlayrecipefile.adaptername.<shapetype> properties specify the name of the adapter to be used in recipe file construction. The following are examples. Edit or add new ones for other shape types.
<Property default="proe2pv"
name="publish.overlayrecipefile.adaptername.PROE"/>

<Property default="ug2pv"
name="publish.overlayrecipefile.adaptername.UG"/>

<Property default="sw2pv"
name="publish.overlayrecipefile.adaptername.SOLIDWORKS"/>

<Property default="inventor2pv"
name="publish.overlayrecipefile.adaptername.INVENTOR"/>

<Property default="catia5_pv"
name="publish.overlayrecipefile.adaptername.CATIAV5"/>
These properties define the string to add for each shape type when WVS constructs and overlays recipe file on-the-fly.
These properties must not be edited in most cases, although new entries can be added for missing shape types, for example
<Property default="ccdraft2pv"
name="publish.overlayrecipefile.adaptername.COCRDRAFT"/>
results in an overlay recipe file created with the name specified by the publish.overlayrecipefile.overlayfilename.COCRDRAFT property, containing first line file=ccdraft2pv-rcp.
Define the source overlay recipe files containing the recipe settings for a specific Publish Job conversion type
The publish.overlayrecipefile.fortype.<shapetype>.<convtype> properties specify the file name and location of the source overlay recipe file to be used for specific types of conversion. This is based on the shape type and the conversion type where the conversion type in the property name is optional. If no <convtype> is specified, the same overlay recipe file is used for all conversion types.
The example settings below are for publishing the Creo Parametric assemblies - that is shape type "PROE” and conversion type “view” - with a specific overlay recipe file proe_view.rcp, and all other Creo Parametric conversion types using a generic overlay recipe file proe.rcp.
<Property default="D:\ptc\Windchill\proe_view.rcp"
name="publish.overlayrecipefile.fortype.PROE.view"/>

<Property default="D:\ptc\Windchill\proe.rcp"
name="publish.overlayrecipefile.fortype.PROE"/>

Add further entries for other shape type and conversion type combinations. The source overlay recipe files that are referenced must be created and reside on the Windchill server. For example
<Property default="D:\ptc\Windchill\ccdraft_view.rcp"
name="publish.overlayrecipefile.fortype.COCRDRAFT.view"/>
where COCRDRAFT is the shape type, view is the conversion type and D:\ptc\Windchill\ccdraft_view.rcp is a file on the WVS Background Method Server host that contains the recipe overlay settings to send in this case.
The Publish Job conversion types are documented in knowledge base article CS53556.
* 
Referencing overlay recipe file with WVS property will be deprecated in a future release of Windchill, since the same configuration is available with the Visualization Administration Configuration UI.
Defining a custom class or method overlay file
The publish.overlayrecipefile.filtermethod property defines the class and filter method to be invoked to determine the worker overlay recipe file to use. For the filter method, the property value is specified in the form classname and methodname, with the following signature:
public static <String methodname>(Persistable d <String workerType>
<String fileName>)
where:
Persistable d is the object being published.
String workerType is the full worker type being used,
for example, PROE.prt, PROE.view.
String fileName is the name of the file being converted.
The return is a string which is the overlay recipe file contents. If null is returned, no overlay recipe file is used.
<Property default="" name="publish.overlayrecipefile.filtermethod"/>
Out-of-the-box, there is no filter configured.
The custom method contains the business logic that determines what overlay recipe file to be returned. The method must return the recipe file contents as a string. WVS then creates the overlay file using this content and names it based on a combination of these above-mentioned settings:
publish.overlayrecipefile.overlayfilename.*
and
publish.overlayrecipefile.adaptername.*
* 
This property overrides the publish.overlayrecipefile.fortype.* settings.