Skip to main content
All CollectionsSystem TasksWorking with Groovy ScriptsGroovy Script Library
Groovy Script - Stop Upload process if Document Revision number is not numeric & display message to User
Groovy Script - Stop Upload process if Document Revision number is not numeric & display message to User
Updated over a week ago

Description: Sample groovy script to stop document upload process if document revision number is not numeric & display message to user

Context: Document

Remark: Accessible in 'Pre' task mode only

Script:

def execute(){

DocumentVO document = documentService.getDocumentDetails();

if (!document.getRevision().matches("[0-9]+")) {

document.setResponseStatus(false);

document.setResponseMessage("Revision should be numeric only.");

}

return document;

}



Did this answer your question?