In the module you mentioned the setup for an on premise deployment where a file can be read form a configurable directory is available and can be re-used in your project.
The function is available from the java code associated to the import actions in the module.
Currently this will read the files based on the extension, but this can be easily changed to a complete file name as you seem to need in your case. And it will be something like this:
String file ="src/test/resources/fileTest.txt"; BufferedReader reader = new BufferedReader(new FileReader(file));
Where the file String variable can be the input variable of your java action.
Place a file in the \resource folder of your project.
Use the ‘GetFileContentsFromResource’ action from the CommunityCommons to load the specific file in your microflow.
Thank you Erwin’t! That is exactly what I wanted. The module is currently looks like this, and hopefully, I want to use a complete file name for uploading.
Just to confirm, you are suggesting to add a parameter to the prepared java action as the image below, am I right? or I should write an java action you gave from scratch.