Skip to main content
Groovy Script - Distribute Files based on Role
Updated yesterday

Description: Sample groovy script to distribute files based on role

Context: Document

Remark: Accessible in 'Post' task mode only

Script:

def execute(){

distributeFile("For Status Change","","Role1,Role2,Role3", "20-Jul-2017","10","false","true","2");

}

def distributeFile(def actionName ,def revisionIds , def distributionList, def actionDueDate , def actionDueDays, def isForPlaceHolder , def isSendNotification ,def distributionType){

HashMap<Object, Object> distributeFile = new HashMap<Object, Object>();

distributeFile.put("actionName", actionName);

distributeFile.put("revisionIds", revisionIds);

distributeFile.put("distributionList", distributionList);

distributeFile.put("actionDueDate", actionDueDate);

distributeFile.put("isForPlaceHolder", isForPlaceHolder);

distributeFile.put("isSendNotification", isSendNotification);

distributeFile.put("distributionType", distributionType);

distributeFile.put("actionDueDays", actionDueDays);

return documentService.distributeFile(distributeFile);

}



Did this answer your question?