Defining extended functions in the Request and Response framework XSD

After developing an extension, you must define it in the Request and Response framework XSD.

Procedure

  • If you want to define functions in the request XSD:
    1. Define all attributes which can be passed into the request for the addition or the extension business object. For extension business objects, attributes from the super class do not need to be defined.
    2. Ensure that every attribute defined in the request XSD has a corresponding setter method in the addition or extended business object.
  • If you want to define extended business objects in the XSD:
    The DWLExtension, TCRMExtension, and CommonExtensionBObj objects are defined as follows in MDMCommon_extension.xsd:
    <xsd:element name="DWLExtension">
    <xsd:complexType>
    		<xsd:sequence>
    			<xsd:element ref="ExtendedObject" minOccurs="0"/>
    			<xsd:element ref="CommonExtensionBObj" 
                       minOccurs="0" 
                       maxOccurs="unbounded"/>				
    		</xsd:sequence>
    	</xsd:complexType>
    </xsd:element>
    	
    <xsd:element name="CommonExtensionBObj" 
                 abstract="true" 
                 type="CommonExtensionBObjType"/>
    <xsd:complexType name="CommonExtensionBObjType"/>
    
    <xsd:element name="TCRMExtension">
    <xsd:complexType>
    		<xsd:sequence>
    			<xsd:element ref="ExtendedObject" minOccurs="0"/>
    			<xsd:element ref="CommonExtensionBObj" 
                       minOccurs="0" 
                       maxOccurs="unbounded"/>
    		</xsd:sequence>
    	</xsd:complexType>
    </xsd:element>
    	
    <xsd:element name="ExtendedObject" type="xsd:string"/>
    1. If the object you are extending contains the DWLExtension element, add the extension object definition to MDMCommon_extension.xsd.
      For example, to add XDefaultSourceValueBObjExt to extend DWLDefaultedSourceValueBObj:
      <xsd:element name="XDefaultSourceValueBObjExt" 
                   substitutionGroup="CommonExtensionBObj"   
                   type="XDefaultSourceValueBObjExtType"/>
      	
      	<xsd:complexType name="XDefaultSourceValueBObjExtType">
      	<xsd:complexContent>
      		<xsd:extension base="CommonExtensionBObjType">
      			<xsd:sequence>
      				<xsd:element ref="ExtName" minOccurs="0" />
      			</xsd:sequence>
      		</xsd:extension>
      	</xsd:complexContent>
      </xsd:complexType>
      <xsd:element name="ExtName" type="xsd:string"/>
    2. If the object you are extending contains the TCRMExtension element, add the extension object definition to MDMDomains_extension.xsd.
      For example, to add XPersonBObj2Ext to extend TCRMPersonBObj:
      <xsd:element name="XPersonBObj2Ext" 
                   substitutionGroup="CommonExtensionBObj" 
                   type="XPersonBObj2ExtType"/>
      
       <xsd:complexType name="XPersonBObj2ExtType">
       	<xsd:complexContent>
        		<xsd:extension base="CommonExtensionBObjType">
      			<xsd:sequence>
      				<xsd:element ref="ObjectReferenceId" minOccurs="0" />
                                                      
      <xsd:element ref="CreditRating" minOccurs="0" />
      
      <xsd:element ref="DWLDefaultedSourceValueBObj" minOccurs="0" />
      			</xsd:sequence>
      		</xsd:extension>
       	 </xsd:complexContent>
       </xsd:complexType>
      
      <xsd:element name="CreditRating" type="xsd:string"/> 
      The following example snippet of the request XML contains both of the extended objects:
      <TCRMPersonBObj>
      ……
      <TCRMExtension>					
      <ExtendedObject>XPersonBObj2Ext</ExtendedObject>
      	<XPersonBObj2Ext>
              <CreditRating>100</CreditRating>
      	  <DWLDefaultedSourceValueBObj>
                  <DWLExtension> 
                   ...
                     <ExtendedObject>
                       XDefaultSourceValueBObjExt
                     </ExtendedObject>
      		   <XDefaultSourceValueBObjExt>
      		      <ExtName>2009-01-11</ExtName>
      		   </XDefaultSourceValueBObjExt>
      		</DWLExtension>							
      	  </DWLDefaultedSourceValueBObj>
      	</XPersonBObj2Ext>
      </TCRMExtension>
    3. In the constructor, invoke the init() method, and initialize all the EObjs contained within this new business object
    4. Insert all new fields in the init() method metaDataMap, following the InfoSphere® MDM nullable field design, for example:
      metaDataMap.put("XXXFieldName", null);
    5. If you are creating new transactions that provide addition functionality, add the transactions for new business objects to the CdBusinessTxTp table.
    6. For the Security Module, create a record for the new transaction in the User Access and Group Access tables using the Extension Framework option in the System Maintenance menu of the Administration user interface.