Skip to main content
All CollectionsSystem TasksWorking with Groovy ScriptsGroovy Script Library
Groovy Script - Get details of already uploaded documents based on current revision
Groovy Script - Get details of already uploaded documents based on current revision
Updated over a month ago

Description: Sample groovy script to get details of already uploaded documents based on 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?