About adding custom attributes

You can define and update custom attributes. These attributes can be defined in a template or review context and used to search templates and reviews respectively.

To define custom attributes, a new element has been added in the review context schema:

<xs:element name="custom_attributes" minOccurs="0"> 
    <xs:complexType> 
        <xs:sequence> 
            <xs:element name="attribute" minOccurs="0" maxOccurs="unbounded"> 
                <xs:complexType> 
                    <xs:simpleContent> 
                        <xs:extension base="xs:string"> 
                            <xs:attribute name="key" type="xs:string"/> 
                        </xs:extension> 
                    </xs:simpleContent> 
                </xs:complexType> 
            </xs:element> 
        </xs:sequence> 
    </xs:complexType> 
</xs:element>

You can store custom attributes by putting in the rca_custom_attribute table in the database:

CREATE TABLE  `mra_custom_attribute` ( 
  `id` varchar(255) NOT NULL, 
  `attrKey` varchar(255) default NULL, 
  `attrValue` varchar(255) default NULL, 
  `reviewContext` varchar(255) default NULL, 
  `attributeNo` int(11) default NULL, 
  `reviewTemplate` varchar(255) default NULL, 
  PRIMARY KEY  (`id`), 
  KEY `FK2_customAttrToReviewContext` (`reviewContext`), 
  KEY `FK2_customAttrToReviewTemplate` (`reviewTemplate`), 
  CONSTRAINT `FK2_customAttrToReviewTemplate` FOREIGN KEY (`reviewTemplate`) REFERENCES 
`mra_review_template` (`id`), 
  CONSTRAINT `FK2_customAttrToReviewContext` FOREIGN KEY (`reviewContext`) REFERENCES 
`mra_review_context` (`id`) 
) 

You can retrieve and store custom data into the define tables by using operations and methods from the building block. For example, you can use the Update Custom Attributes operation from the Review Commenting & Approval Core service.

// Ethnio survey code removed