Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

NIFI process group scheduling

avatar
Explorer

Hi,

I am able to schedule a single process in NIFI data flow. I have created a process group which contains ExecuteStreamCommand and PutEmail tasks. Is there way to schedule the entire process group instead of a single process. Please advise. Thanks

1 ACCEPTED SOLUTION

avatar
Master Guru

Hi @Ravi Koppula,
I don't think there is a way to schedule processor groups but there is a way to schedule them all of them on one shot.
1.As you are using ExecuteStreamCommand processor,processor will accepts incoming connections as we can schedule the processor in Timer driven,Cron driven,Event Driven.
2.Just use GenerateFlowfile processor and give success relation to all ExecuteStreamCommand processors and schedule GenerateFlowfile to schedule a run on either cron (or) timer driven.

3.Generateflowfile processor runs on scheduled time and gives trigger flowfile to run all the other ExecuteStreamCommand processors.

Sample Flow:-

40480-trigger-execute-stream.png

View solution in original post

5 REPLIES 5

avatar
Master Guru

Hi @Ravi Koppula,
I don't think there is a way to schedule processor groups but there is a way to schedule them all of them on one shot.
1.As you are using ExecuteStreamCommand processor,processor will accepts incoming connections as we can schedule the processor in Timer driven,Cron driven,Event Driven.
2.Just use GenerateFlowfile processor and give success relation to all ExecuteStreamCommand processors and schedule GenerateFlowfile to schedule a run on either cron (or) timer driven.

3.Generateflowfile processor runs on scheduled time and gives trigger flowfile to run all the other ExecuteStreamCommand processors.

Sample Flow:-

40480-trigger-execute-stream.png

avatar
Explorer

Thanks Yash for Answering my question, i followed as you recommended but the ExecuteStreamCommand not invoked after GenerateFlowFile was started.

This is what i did.

Step 1 : Created GenerateFlowFile and scheduled as cron driven and set the time to run.

Step 2: Added success relation to ExecuteStreamCommand processor which is schedule as Time Driven and run schedule is at 52 weeks.

Result :

Step 1 is executed and step2 is not invoked after step1 success. Is there something i am doing wrong here ?


avatar
Master Guru

@Ravi Koppula, I think you haven't taken off run schedules which you are have used to trigger ExecuteStreamCommand processors before adding GenerateFlofile processor.

Take off all the run schedules and keep them to default as Timer driven and Run Schedule to 0 Sec (or) you can use Event Driven when ever there is flow file it will triggers the processor.

avatar
Explorer

Thanks Yash, I tried the way you suggested. It is working. Thank you so much and i truly appreciate for taking your time and helping me 🙂

avatar
New Contributor

Shu, thanks for the answer. But I was wondering when do we need to schedule at process group level ? Can't we control it by scheduling the first processor in process group.

I am new to NiFi, and just started exploring it. So, may be it's a silly question.