Description: Sample Groovy Script to read file Attribute values from the Edit Attributes screen and write that Attribute data into custom XML parts of the .docx file.
Context: Document (.docx)
Document Type: File
Remark: Accessible in 'Post' task mode only.
Script:
def execute(){
HashMap<String,String> attributeMapping = new HashMap<>();
attributeMapping.put(IDocumentAttribute.REV,"Revision");
attributeMapping.put("Signatory Department","AuthorDepartment");
attributeMapping.put("My Classification","Classification");
documentService.writeAdoddleAttributesToFilePropertyAttributes(attributeMapping);
}