Performing Product Model Extension

The steps to perform product model extension are as follows:

Procedure

  1. Go to the <JBOSS_HOME>/modules/com/tibco/fulfillmentcatalog/main/ directory.
  2. Extract acprop.jar.
  3. Open productmodelattibute.properties file.
  4. Add column name for attribute, which needs to be added. For instance, CPRODUCTCOUNT.
  5. Create jar once again.
  6. Modify map (.XSL) file to publish CPRODUCTCOUNT value in product model.
  7. Start JBOSS server.
  8. 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:

  1. Open the productmodelattibute.properties file located at <JBOSS_HOME>/modules/com/tibco/fulfillmentcatalog/main/acprop.jar.
  2. Add column name in the end, for example, CPRODUCTCOUNT in the existing attribute list.
    Sample Product Model Attribute Properties 1
  3. 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="&quot;Feature&quot;"/>
	    </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="&quot;NULL&quot;"/>
		    </ns0:discreteValue>
		</xsl:otherwise>
	    </xsl:choose>
	</ns0:value>
	<ns0:simpleRule>
	    <ns0:name>
		<xsl:value-of select="&quot;RULE&quot;"/>
	    </ns0:name>
	    <ns0:ruleSetOutcome>
		<xsl:value-of select="./CPRODUCTCOUNT"/>
	    </ns0:ruleSetOutcome>
	</ns0:simpleRule>
</ns0:characteristics>