Skip to main content
All CollectionsSystem TasksWorking with Groovy ScriptsGroovy Script Library
Groovy Script - Pull reviewed files from Bluebeam Studio
Groovy Script - Pull reviewed files from Bluebeam Studio
Updated today

Description: Sample groovy script to pull reviewed files from Bluebeam Studio

Click here for detailed help.

Context: App

Remark: Accessible in 'Post' task mode only

Script:

def execute(){

def bluebeamInstance = customService.createInstance("Bluebeam",ContextEnum.FORM_CONTEXT);

FormVO form = formService.getFormDetails(true);

Map<String,Object> tokenMap = new HashMap<>();

tokenMap.put(IGroovyConstant.ACTION_USERID,formService.getActionUserId());

String accessToken = bluebeamInstance.getTocken(tokenMap);

Map<String,Object> pullMap = new HashMap<>();

pullMap.put(IGroovyConstant.ACCESS_TOKEN,accessToken);

List<String> docList = new ArrayList<>();

pullMap.put(IGroovyConstant.A_DOC_IDS, docList);

pullMap.put(IGroovyConstant.FORM_VO,form);

Map<String,String> bbFileNamesURLMap = bluebeamInstance.pull(pullMap);

Map<String,Object> saveFilesMap = new HashMap<>();

saveFilesMap.put(IGroovyConstant.URL_FILENAME_MAP, bbFileNamesURLMap);

saveFilesMap.put(IGroovyConstant.FORM_VO,form);

Map<String,String> fileNameNewFileNameMap = formService.saveFilesFromUrl(saveFilesMap);

Map<String,Object> attachFilesMap = new HashMap<>();

attachFilesMap.put(IGroovyConstant.FORM_VO,form);

attachFilesMap.put(IGroovyConstant.FILENAME_MAP, fileNameNewFileNameMap);

formService.attachFilesToMsg(attachFilesMap);

bluebeamInstance.closeSession();

}



Did this answer your question?