# Activity 6: Documentation generation

To obtain documentation, first obtain the template as follows.

- Right-click on VendingMachine.prj and select "Import Documentation Template"; this adds a file Template.docx. (Use Refresh / F5 on the project if the file is not visible.)

Next extend VendingMachine.prj with the following task for document generation:

    Generate Documentations {
        documentationTask for interface IService {
            template = "Template.docx"
            targetFile = "Documentation.docx"
            author = "John Smith"
            role = "R&D: SW Designer"
        }
    }

Execute the CommaSuite workflow (right click on the .prj file and select Run As → Run generators). Next navigate to folder src-gen/doc/ and open the generated .docx file. It contains information from the comments in the .signature and .interface files. In addition, the simple state machine is presented in a table form.