Updated on 1/2/2020
Workflow Documentation
Direct link to topic in this publication:



The following table lists the available methods for the resp object:

Return Type Method Explanation
ScriptDocumentTemplate resp.createDocumentTemplate(String documentTemplateSystemID) Creates the document template. See Document Template Example.
ScriptHttpClient resp.createHttpClient() Creates the HTTP client
DWSClient resp.createWSClient(String wsdlLocation) Creates the WS client
ScriptDatabase resp.dbConnect(String databaseName) Returns the database to which Workflow is connected
ScriptDatabase resp.dbConnect(Map database) Returns the database to which Workflow is connected
boolean currentUser.equals (Object) Returns true if the specified object is equal to the current object
Void resp.fail(Object message) Stops the execution of the script and displays the error message
List resp.findUsers(String dslQuery) Returns the list of users based on the query
List resp.findUsers(String dslQuery, Integer pageSize, Integer pageNumber) Returns the list with the specified page size of users based on the query
ScriptFtpClient resp.ftpConnect(Map connectionParams) Connects to the FTP server using the Map in which you define these parameters:
  • server
  • username
  • password
  • port (default 21)
  • protocol (FTP || FTPS || SFTP, default FTP)
  • authentication (PASSWORD || PRIVATE_KEY, default PASSWORD)
  • encryption (SSL || TLS, default SSL)
  • mode (ACTIVE || PASSIVE, default PASSIVE)
  • isImplicit (default false)
The parameters with default value are not required. If you don't define values, the default values will be used.
ScriptFtpClient resp.ftpConnect(Map <String, String> connectionParams, ScriptFile ppkFile)  Use when connecting to FTP by using a private key file, with connection parameters provided in the map.
ScriptFtpClient resp.ftpConnect(String ftpClientName, ScriptFile ppkFile)  Use when connecting to FTP by using a private key file, with connection parameters defined in local parameters.
ScriptFtpClient resp.ftpConnect(String ftpClientName) Connects to the FTP using the FTP server name. The ftpClientName uses defined local parameters. It is expected that you define the local parameters to connect to FTP.
ScriptAccount resp.getAccount(String accoutnSystemId) Returns the account based on the system ID
String resp.getAppParam(String appParamSystemID) Returns the appliaction parameter based on the system ID
ScriptAsyncTask resp.getAsyncTask() Returns the asynchronous task
ScriptCase resp.getCase(String caseKey) Returns the case based on the caseKey
ScriptCaseList resp.getCaseList(String caseListSystemID) Returns the case list
ScriptCaseType resp.getCaseType(String workflowSystemID) Returns the list of cases based on the system ID
ScriptCaseManager resp.getCases() Returns the cases
ScriptCompany resp.getCompany(String companySystenID) Returns the company
ScriptContact resp.getContact(String contactSystemID) Returns the contact
String resp.getContextPath() Returns the context path
ScriptCustomField resp.getCustomField(String customFieldSystemID) Returns the custom field based on the system ID
ScriptCustomTable resp.getcustomTable(String customTableSystemID) Returns the table based on the system ID
ScriptDepartment resp.getDepartment( String departmentSysytemID) Returns the department based on the system ID
String resp.getDomain() Returns the current tenant
ScriptExceptionHandling resp.getException() Returns the exception
ScriptFile resp.getFileFromRepository(String fileName) Returns the file from the repository
Object resp.getGlobalValue(String globalValueName) Returns the global value
ScriptNotification resp.getNotification(String notificationSystemID) Returns the notification based on the system ID
String resp.getPID() Returns the process ID
ScriptPriority resp.getPriority(String prioritySystemID) Returns the priority based on the system ID
ScriptProject resp.getProject(String projectSystemID) Returns the project based on the system ID
ScriptScript resp.getScript(String scritpSystemID) Returns the script based on the system ID
ScriptSOAP resp.getSOAP() Returns the SOAP (Simple Object Access Protocol)
ScriptStatus resp.getStatus(String statusSystemID) Returns the status based on the system ID
boolean resp.storage.deleteFile(String path) Deletes a file
String resp.storage.getLink(ScriptFile file) Gets the URL of a file
boolean resp.storage.deleteFolder(String path) Deletes a folder
ScriptFile resp.storage.saveFile(ScriptFile file, String path) Saves a new file to the local storage
ScriptFile resp.storage.newFolder(String name, String path) Creates a new folder
ScriptFile resp.storage.getFile(String path) Gets a file from local storage
ScriptFile resp.storage.getFiles(String path) Gets all files from a folder
ScriptFile resp.storage.replaceFile(ScriptFile file, String path) Replaces a file
String resp.getTranslation(String dictionarySystemID, Object [] ) Returns the translation based on the system ID
ScriptUser resp.getUser(String loginName) Returns the user based on login name
ScriptUser resp.getUserByEmail(String email) Returns the user based on email
ScriptUserType resp.getUserType(String userTypeSystemID) Returns the userType based on the system ID
List resp.getUsersByEmail(String email) Returns the list of users
ScriptWorkbook resp.getWorkbook(String workbookSystemID) Returns the workbook based on the system ID
ScriptXml resp.getXml() Returns the XML
Object resp.loadLibrary(String libraryName) Loads the custom library
ScriptAccount resp.newAccount() Creates the new account
ScriptAddress resp.newAddress() Creates the new address
ScriptContact resp.newContact() Creates the new contact
ScriptDate resp.newDate() Creates the new date
ScriptDate resp.newDate(Object formatDate) Creates the new date with the specified date format
ScriptFile new.getFile(String fileName, String fileContent) Creats the new file with content
ScriptMessage resp.newMessage() Creates the new message
ScriptUser resp.newUser() Creats the new user
DWSClient resp.renewWSClient(String wsdlLocation) Reloads the DWS client
Void resp.save(ScriptContact contact) Saves the contact
Void resp.save(ScriptAccount account) Saves the account
Void resp.save(ScriptUser user, String password) Saves the user and password
Void resp.save(List listName) Saves the list
Void resp.send(ScriptMessage message) Sends the notification
Void resp.setAppParam(String appParameterName, String value) Sets the application parameter
Void resp.setGlobalValue(String valueName, String value) Sets the global value
Void resp.update(ScriptUser user) Updates the user
Void resp.update(List listName) Updates the list
Void resp.update(ScriptContact contact) Updates the contact
Void resp.update(ScriptAccount account) Updates the account
Void resp.updateUserLogin(String user, String newDepartment, String newUserType)
Sets a user's department and/or user type. This method can be used in scripts of User Login event type.
UserManager resp.getUsers() 
ScriptFile  resp.file.zip(String fileName, List<ScriptFile> files)
Zips given list of files and uses given file name for the zip file
ScriptFile  resp.file.zip(String fileName, String password, List<ScriptFile> files)
Zips list of files, uses given file name for the zip file, and password-protects the zip file
resp.file.unzip(ScriptFile zip)
Extracts files from the zip
resp.file.unzip(ScriptFile zip, String password)
Extracts files from the password-protected zip