Cong
Cong

Reputation: 479

How to set one Processor is triggered by more than one incoming FlowFile from different connection in Nifi?

My plan is that M part will not execute until P1 and P2 parts complete,because P1/P2 part would insert data into Parent tables,and M part would insert data into Child table.

enter image description here

P1/P2 part:GenerateFlowFile->PutSql

M part:ExecuteSql(triggered by event)-PutDatebaseRecord

I’ve tried to use funnel was connected by P1 and P2 parts,and then M part which triggered by event was connected by funnel.However,M part would be triggered by one of the P1 and P2 parts,not by a whole.

How can I make the ExecuteSql Processor will not to execute until all Processor of P1 and P2 parts complete?

Any help is appreciated!

Upvotes: 0

Views: 466

Answers (1)

YuriR
YuriR

Reputation: 1311

You can use wait, notify and funnel processors before M, like this

P1 -> Notify -> Funnel F -> M

P2 -> Notify -> Funnel F -> M

Funnel -> Wait (Signal Count == 2)

Upvotes: 1

Related Questions