We are pulling files from sftp server, and we get two types of files.
1. data file
2. control file
We need to wait for the control file before processing the data file.
Is there a recommended pattern to implement this behavior in nifi?
First of all, the recommended pattern is to avoid this. The most common problems. people are trying to solve are waiting for a file to be copied, or depending on multiple files. In both cases you should be able fine by just listening to the directory.
If you actually have a more complicated situation, the first thing that comes to mind is a design with wait notify. Here is an article that explains this: http://ijokarumawak.github.io/nifi/2017/02/02/nifi-notify-batch/
To help future readers please consider marking this as 'solved' and or valuable ('kudos')