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. The properties documented in this section configure the following aspects of the WVS Recipe Overlay mechanism:
• The overlay recipe file name that is to be sent to the worker.
• The adjusted recipe settings to add to it.
• The publish job category for which they are to be sent.
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.
The following information is based on the information relating to each property in the wvs.properties.xconf file.
Defining the name of the overlay recipe file to create
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.
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.
|