Mallika Ramasamy 3 Posted July 11, 2018 Posted July 11, 2018 The file is read from a rule function. The file is stored inside one of the folders in tibcoBE project.I can not give the complete path as after the deployment there is no fixed name for one of the folders as it keeps changing whenever the instance is created. So decided to store in one of the tibco BE project folders (similar to schema file). But having problem in accessing it. Tried by referring ./SharedResources/StaticData. But the file is not picked up. Can someone help in this.
Ulf Mueller 2 Posted April 11, 2019 Posted April 11, 2019 Set the working directory to the location of the project. Now you can create a custom function that returns the current working directory and read the file from here. eg: String sPath=GetCurrPath.getCurrPath(); String sContent = File.readFileAsString(sPath+"/SharedResources/testInput.txt"); System.debugOut("### File contents is: " + sContent); Attached a sample project.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now