Accessing Data Bank Values in Groovy Script
I have an extension tool test in my scenario that calls a Windows command file (.bat). This is a very simple command that returns the userid of the person logged into the computer. This is put into a databank that I want to pass into the Groovy script to build the file path for a PDF file the web application creates and downloads. The script does retrieve the userid and build the correct path to find the file (I only need to make sure the file is created.) The problem is that the script is throwing an error even though it works correctly.
This is the error it returns:
DataSource: DataHold (row 1), Logon Court Tab (row 1): No Data Source named "GetTDBUserid" found.
View Details for more information.
Please verify that the Data Source is spelled correctly. Also verify that the "Use data source"
check box is selected and that the correct Data Source is selected in the Data Source combo box.
I have tried checking and unchecking the Use data source checkbox on the Tool Setting tab of the extension tool. Am I missing something?
Here is the Groovy script:
public boolean verifyReport(Object input, Context context)
reportFilePath1 = context.getEnvironmentVariableValue("ReportFilePath1");
reportFilePath2 = context.getEnvironmentVariableValue("ReportFilePath2");
reportFullPath = reportFilePath1 + context.getValue("GetTDBUserid","TDBUserid") + reportFilePath2;
Application.showMessage("reportFullPath: " + reportFullPath);
File file = new File(reportFullPath);
if (file.length() > 0)
Sorry this is so long. Thanks for any assistance!