Description: Sample Groovy Script to get details of uploaded documents based on the current revision.
Supported Options to get the Existing Revision Details:
RevisionOption.ALL_REVISION
RevisionOption.LATEST_REVISION
RevisionOption.PREVIOUS_REVISION
RevisionOption.SUPERSEDED_REVISION
Context: Document
Document Type: File
Remark: Accessible in 'Post' task mode only.
Script:
def execute(){
DocumentVO document = documentService.getDocumentDetails();
HashMap<Object, Object> optionMap = new HashMap();
optionMap.put(RevisionOption.GET_REVISIONS, RevisionOption.ALL_REVISION);
optionMap.put(RevisionDetailsOption.BASIC_DETAILS, true);
optionMap.put(RevisionOption.INCLUDE_DEACTIVATED, true);
Map<String, DocumentVO> revisionsMap = documentService.getDocumentRevisionDetail(document, optionMap); // Here revisionsMap will have issue number as key and DocumentVO as value.
}