0
votes

InvokeHTTP hits the required URL, I know we can add filename property to Update Attribute Processor in order to give a name to image/file in put file, But in my case lets take the Filename comes from a different processor (GenerateFlowFile here) in the form of a variable whcih is passed in UpdateAttribute Processor. The problem is its getting image and filename in different queues while I want in one.

I tried with MergeContent and Wait- Notify processors.

Any other idea useful here ?

I have attached the flow image below this question

Thanks in advance....

Image: -Flow of NiFi processors

1
just do it sequential: GenerateFlowFile -> InvokeHTTP -> UpdateAttribute -> PutFile - daggett
just for sample I had kept generate flow file over there but actually name comes from different processor whose sequence I cannot change..... - Umang Soni
and why you can't call InvokeHTTP after GenerateFlowFile ? - daggett

1 Answers

1
votes

How would you know from one flow which name you want from the other? Is there an ID or something that you'd match on? If so, how do you know the other flow will have the flow file you need when you want it?

Your use case seems more like a "lookup" pattern than a "merge flows" pattern. Maybe from the second flow (with the names) you can store them in a DistributedMapCacheServer using PutDistributedMapCache, and from the other flow you can use FetchDistributedMapCache, using the "not-found" relationship to loop back around to try fetching again until the ID->name pair is in the cache map.

There is also LookupAttribute and LookupRecord, if you can get your names or whatever into a place that has a LookupService in NiFi, such as MongoDB, Redis, HBase, etc.