Skip to main content
All CollectionsSystem TasksWorking with Groovy ScriptsGroovy Script Library
Groovy Script - Distribute Files based on Organization ID
Groovy Script - Distribute Files based on Organization ID
Updated over a month ago

Description: Sample groovy script to distribute files based on organization id

Context: Document

Remark: Accessible in 'Post' task mode only

Script:

def execute(){

distributeFile("For Status Change","","3,915556", "20-Jul-2017","10","false","true","3");

}

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?