Skip to main content
All CollectionsSystem TasksWorking with Groovy ScriptsGroovy Script Library
Groovy Script - Get details of Uploaded Documents based on Current Revision

Groovy Script - Get details of Uploaded Documents based on Current Revision

Updated over 3 weeks ago

Description: Sample Groovy script to get details of uploaded documents based on the current revision.

Supported options to get existing revisions details:

RevisionOption.ALL_REVISION

RevisionOption.LATEST_REVISION

RevisionOption.PREVIOUS_REVISION

RevisionOption.SUPERSEDED_REVISION

Context: Document

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.

}



Did this answer your question?