I'm fairly new to Apache NIFI.
I'd like to set up a flow, where there is a file that gets put into a 'hot folder'. If this folder detects a file put into it, this file then gets put into another folder called 'input'. Once the file is copied into the input folder, I'd like trigger off a Java Program to run.
The way i've approached this is to create a 'GETFILE' processor to get the file from the hot folder. and then create a PUTFILE processor to put it in the input folder. So you can imagine there being a connection link between the 'GETFILE' and 'PUTFILE' processors. This works as expected.
However the challenge I'm faced with, is to trigger my Java process to run when the file is copied into the INPUT folder (i.e. after the PUTFILE processor has been executed). I cannot create a link between the PUTFILE and the EXECUTEPROCESS processor (as a means of telling NIFI to run the Java process after the file is copied from the hot folder to the input folder). I can't seem to get the connection arrow to link between the PUTFILE and the EXECUTEPROCESS processors (as NIFI won't let me).
Based on the above description, is there anyone that can recommend an approach to tell NIFI to trigger the Java application to run after detecting the file being added to the input folder?
Thanks.