Customization Points
Extendable classes
If the renderer classes described in the Publishing Option Sets section are extended, the extensions must be defined in the ESI service properties file. The following classes are designed to be extended by customizers:
OptionSetRenderer
Service Property name: com.ptc.windchill.esi.rnd.ESIRenderer
Default values of attributes of the <Option> element:
cardinality="duplicate"
requestor="com.ptc.windchill.option.model.OptionSet"
selector="OPTIONSET"
serviceClass="com.ptc.windchill.esi.ov.OptionSetRenderer"
OptionRenderer
Service Property name: com.ptc.windchill.esi.rnd.ESIRenderer
Default values of attributes of the <Option> element:
cardinality="duplicate"
requestor="com.ptc.windchill.option.model.Option"
selector="OPTION"
serviceClass="com.ptc.windchill.esi.ov.OptionRenderer"
AssignedOptionSetLinkRenderer
Service Property name: com.ptc.windchill.esi.rnd.ESIRenderer
Default values of attributes of the <Option> element:
cardinality="duplicate"
requestor="com.ptc.windchill.option.model.OptionSet"
selector="ASSOCIATED_OPTIONSETLINK"
serviceClass="com.ptc.windchill.esi.ov.AssignedOptionSetLinkRenderer"
ExpressionRenderer
Service Property name: com.ptc.windchill.esi.rnd.ESIRenderer
Default values of attributes of the <Option> element:
cardinality="duplicate"
requestor="java.lang.Object"
selector="EXPRESSION"
serviceClass="com.ptc.windchill.esi.ov.ExpressionRenderer"
ChoiceRuleRenderer
Service Property name: com.ptc.windchill.esi.rnd.ESIRenderer
Default values of attributes of the <Option> element:
cardinality="duplicate"
requestor="com.ptc.windchill.option.model.ChoiceRule"
selector="CHOICE_RULE"
serviceClass="com.ptc.windchill.esi.ov.ChoiceRuleRenderer"
RuleMemberLinkRenderer
Service Property name: com.ptc.windchill.esi.rnd.ESIRenderer
Default values of attributes of the <Option> element:
cardinality="duplicate"
requestor="java.lang.Object"
selector=" RULE_MEMBER_LINK"
serviceClass=" com.ptc.windchill.esi.ov.RuleMemberLinkRenderer"
RuleMemberActionLinkRenderer
Service Property name: com.ptc.windchill.esi.rnd.ESIRenderer
Default values of attributes of the <Option> element:
cardinality= "duplicate"
requestor="java.lang.Object"
selector="RULE_MEMBER_ACTION_LINK"
serviceClass= "com.ptc.windchill.esi.ov.RuleMemberActionLinkRenderer"
ExpressionRendererDelegate
Service Property name: com.ptc.windchill.esi.ov.ExpressionRendererDelegateIfc
Default values of attributes of the <Option> element:
cardinality= "singleton"
requestor="java.lang.Object"
selector="expressionRendererDelegate" (Default Selector)
serviceClass= "com.ptc.windchill.esi.ov.DefaultExpressionRendererDelegate"
Delegate can be created specific to each target or can be created for set of target and selector string can be specified as ESI
Configurable Options
The following Windchill ESI configurable options control a certain configurable option that plays a role in the publication of an option set and its related objects:
Defines life cycle state values in the form of a comma-separated list. Publication of an option set is triggered when its life cycle state changes to any of the values specified for the preference. This happens only if the preference Launch ESI Workflow Automatically is set to Yes and the option set is not associated with an implemented Change Notice.
Preference name: Lifecycle States Triggering Publication of an Option Set
Default value: RELEASED
Optional wt.property that controls publication of Option and Variants information when expressions on Expressionable objects or Choice Rule has Alias used. At 11.0 publication of Alias is not supported. When set optional property set to true it allows publication to move ahead by ignoring Alias otherwise aborts publication process.
Windchill Property Name: com.ptc.windchill.esi.AllowPublishingWithoutAlias
Default value: false
Optional wt.property that controls publication of Option and Variants information when expressions on Expressionable objects has Java Function used. At 11.0 publication of Java Function is not supported. When set optional property set to ‘true’ it allows publication to move ahead by ignoring Java Function otherwise aborts publication process.
Windchill Property Name: com.ptc.windchill.esi.AllowPublishingWithoutJavaFunction
Default value: false
Configure Choice rendering to render Numeric Choice, Numeric value and QuantityOfMeasure in ESI Response
Steps to configure:
1. Update ESI ResponseMetaInfo.xml for rendering EnterpriseData object separately. Refer to the section Modify the ESI Response Meta Information File in this guide for more information on how to modify this file.
2. Out of the box code has map added. For example - Choice object type as ESIChoice.
<!-- ESI ESIChoice Mapping -->
<esi:Map id="ESIChoice">
<esi:attributeMapping sourceAttribute="obid">ObjectID</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx" defaultValue="com.ptc.windchill.esi.Choice">Class</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="name">Name</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="number">Number</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="description">Description</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="versionInfo.identifier.versionId">Version</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="iterationInfo.identifier.iterationId">Iteration</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">Specification_category_ObjectID</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">Specification_category_Name</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx" defaultValue="com.ptc.windchill.esi.Option">OptionClass</esi:attributeMapping>
</esi:Map>
3. Modify MapInformation object to specify ‘Value’ and ‘QuantityOfMeasure’. It will start rendering a attributes with the name specified as ‘Value’ and ‘QuantityOfMeasure’ respectively.
<!-- ESI ESIChoice Mapping -->
<esi:Map id="ESIChoice">
<esi:attributeMapping sourceAttribute="obid">ObjectID</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx" defaultValue="com.ptc.windchill.esi.Choice">Class</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="name">Name</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="number">Number</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="description">Description</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="versionInfo.identifier.versionId">Version</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="iterationInfo.identifier.iterationId">Iteration</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">Specification_category_ObjectID</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx">Specification_category_Name</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="xxxx" defaultValue="com.ptc.windchill.esi.Option">OptionClass</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="Value">Value</esi:attributeMapping>
<esi:attributeMapping sourceAttribute="QuantityOfMeasure">QuantityOfMeasure</esi:attributeMapping>
</esi:Map>
4. This will start rendering numeric value for numeric choices along with QuantityOfMeasure if present. These elements will not have any value for String type of Choices.
5. Alternatively, to avoid rendering of blank values you can do the following.
a. Alternative 1: Override adjustChoiceElement API of OptionRenderer and remove blank Value and QuantityOfMeasure attributes for String type of Choices.
b. Alternative 2: Remove empty elements of choices from response XML in ExportToxxx task used by the Distribution Target.
c. Alternative 3: Use XSL to filter elements with a blank Value and QuantityOfMeasure element from the ‘Specification’ element in ESI Response XML. This XSL can be specified on the Distribution Target under general settings.
There are a few configurable attributes on the distribution target that impact the contents of the ESI response message when publishing an option set.
For more information on publishing Option Set and Expressions, see section Attributes Pertaining to an Option Set.
Was this helpful?