Lab 7 - Configure a category graph writer

During the lab, you will be configuring a category graph writer to use the ts:tsResponseRoleLabel property to categorize your troubleshooting topics automatically.

  1. In the lab folder, create a new Spring context file named context.xml.
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns=""
  2. Open the context.xml file in your favorite editor.
  3. Create a new Category Graph Writer bean.
  4. Add the following properties to the Category Graph Writer bean as required:
    Property Type Mandatory Description
    mappings Map <QName,QName> Required Map defining how predicates should be mapped to Alfresco properties. Use a fully-qualified name with Clark notation as the key of the entry.
    Important: Use the following QName for the Alfresco property: {}categories
    <bean id="samples.categoryGraphWriter.mappings" parent="alfresco.rdf.categoryGraphWriter.mappings.abstract">
      <property name="mappings">
          <entry key="{}tsResponseRoleLabel" value="{}categories" />
  5. Save your changes.
  6. Test your Category Graph Writer with the com.componize.samples.lab07.CategoryGraphWriterTest unit test.
  7. Deploy your files to the application server.
  8. Once the application server has started, connect to the Alfresco Share interface.
  9. Create a new category called KEYWORD_1.
  10. Open the troubleshooting-sample.dita file in your favorite editor.
  11. Add the following element:
  12. Save your changes.
The sample file should have been categorized with the KEYWORD_1 category.