Performing Product Model Extension
The steps to perform product model extension are as follows:
- Procedure
- Go to the <JBOSS_HOME>/modules/com/tibco/fulfillmentcatalog/main/ directory.
- Extract
acprop.jar
. - Open
productmodelattibute.properties
file. - Add column name for attribute, which needs to be added. For instance,
CPRODUCTCOUNT
. - Create jar once again.
- Modify map (.XSL) file to publish
CPRODUCTCOUNT
value in product model. - Start JBOSS server.
- Publish product model.
Note: When adding any attribute in the PRODUCT repository, do not provide column name because TIBCO MDM generates it.
Example for Product Model Extension
If you want to add a new attribute in the product model, for example,
PRODUCTCOUNT
in the product repository, perform the following steps:
- Open the productmodelattibute.properties file located at <JBOSS_HOME>/modules/com/tibco/fulfillmentcatalog/main/acprop.jar.
- Add column name in the end, for example,
CPRODUCTCOUNT
in the existing attribute list.Sample Product Model Attribute Properties 1 - Modify the map file
mpfromcatalogitemtobulkproductmodelv1.xsl
to add mapping for the newly added attribute. The following snippet shows the sample map file.
<ns0:characteristics> <ns0:name>PRODUCTCOUNT</ns0:name> <ns0:value> <ns0:type> <xsl:value-of select=""Feature""/> </ns0:type> <xsl:choose> <xsl:when test="count(./CPRODUCTCOUNT)>0 and string-length(./CPRODUCTCOUNT) > 0"> <ns0:discreteValue> <xsl:value-of select="./CPRODUCTCOUNT"/> </ns0:discreteValue> </xsl:when> <xsl:otherwise> <ns0:discreteValue> <xsl:value-of select=""NULL""/> </ns0:discreteValue> </xsl:otherwise> </xsl:choose> </ns0:value> <ns0:simpleRule> <ns0:name> <xsl:value-of select=""RULE""/> </ns0:name> <ns0:ruleSetOutcome> <xsl:value-of select="./CPRODUCTCOUNT"/> </ns0:ruleSetOutcome> </ns0:simpleRule> </ns0:characteristics>