Created 10-05-2017 07:03 AM
I have written custom processors like GetFile with some extra functionals but what i have mentioned is that it reitreives files for example conf.xml only once and then when i update it and roll back to folder with such name .conf.xml it doesn't reitreive this file how can i force processor to do it i mean , how can i force it reiterive any kind of file no matter how many times it was retrevied before.
i use this code to roll back folder after updating file materials:
final Path rootDirPath = Paths.get("C://Users//Desktop//try2//nifi-1.3.0//1");<br>final Path tempCopyFile = rootDirPath.resolve("."+flowFile.getAttribute(CoreAttributes.FILENAME.key()));<br>final Path dotCopyFile = tempCopyFile;
Created 10-05-2017 06:07 PM
I'm not sure what your custom GetFile does, but the existing GetFile has an option of whether to "Keep Source File", which defaults to false. When set to false, the file will be deleted from the file system once it has been processed by GetFile. If set to true, the source file will remain and thus will be processed again when the GetFile processor is triggered to run again. In your custom processor you may want to support this same behavior for your use case.
Created 10-05-2017 06:07 PM
I'm not sure what your custom GetFile does, but the existing GetFile has an option of whether to "Keep Source File", which defaults to false. When set to false, the file will be deleted from the file system once it has been processed by GetFile. If set to true, the source file will remain and thus will be processed again when the GetFile processor is triggered to run again. In your custom processor you may want to support this same behavior for your use case.
Created 10-06-2017 05:25 AM
I have set keep source file to false i have relative logic in my processors but when i get flowfile from folder i want to update it's data and then route it back to same folder but when i try to make this i mean putting i root folder it saves file i this forma '.filename.xml" how can i prevent doing this?