How to keep the original flowfile?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to keep the original flowfile?

srini
Hello,
In the attached flow, the InvokeHTTP replaces the original flowfile. But the SplitJSON needs the original flowfile instead of the flowfile given by the InvokeHTTP. How to do that?



Thanks
Srini
Reply | Threaded
Open this post in threaded view
|

Re: How to keep the original flowfile?

Pierre Villard
Hi Srini,

You have a relationship "original" that will route the original flow file
used to perform the request. Have a look here:
https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.InvokeHTTP/

Thanks

2017-02-23 18:20 GMT+01:00 srini <[hidden email]>:

> Hello,
> In the attached flow, the InvokeHTTP replaces the original flowfile. But
> the
> SplitJSON needs the original flowfile instead of the flowfile given by the
> InvokeHTTP. How to do that?
>
> <http://apache-nifi-developer-list.39713.n7.nabble.com/file/
> n14921/Screenshot_2017-02-23_12.png>
>
> Thanks
> Srini
>
>
>
> --
> View this message in context: http://apache-nifi-developer-
> list.39713.n7.nabble.com/How-to-keep-the-original-flowfile-tp14921.html
> Sent from the Apache NiFi Developer List mailing list archive at
> Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: How to keep the original flowfile?

srini
Hi Pierre,
But I want the response from InvokeHTTP also. How can I use the response and keep the original flowfile so that SplitJson in the flow can use it.

thanks
Srini
Reply | Threaded
Open this post in threaded view
|

Re: How to keep the original flowfile?

Aldrin Piri
Hi Srini,

Depending on the typical size of the response, it is possible to store the
response in an attribute.  This would append the content onto the
previously existing FlowFile in an attribute of your choosing.

On Thu, Feb 23, 2017 at 12:55 PM, srini <[hidden email]> wrote:

> Hi Pierre,
> But I want the response from InvokeHTTP also. How can I use the response
> and
> keep the original flowfile so that SplitJson in the flow can use it.
>
> thanks
> Srini
>
>
>
> --
> View this message in context: http://apache-nifi-developer-
> list.39713.n7.nabble.com/How-to-keep-the-original-flowfile-
> tp14921p14925.html
> Sent from the Apache NiFi Developer List mailing list archive at
> Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: How to keep the original flowfile?

srini
Hi Aldrin,
How can save the response to an attribute and at the same time keep the original flowfile value. I think, I can either get response or original. How to get both?

thanks
Srini
Reply | Threaded
Open this post in threaded view
|

Re: How to keep the original flowfile?

Andy LoPresto-2
Srini,

If you’re routing them to different processors, just drag another connection from the previous processor to the follow-on (this will keep the original flowfile) and route the response to whatever processor needs it. 

I’ve attached a screenshot:


Andy LoPresto
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

On Feb 24, 2017, at 7:24 AM, srini <[hidden email]> wrote:

Hi Aldrin,
How can save the response to an attribute and at the same time keep the
original flowfile value. I think, I can either get response or original. How
to get both?

thanks
Srini




--
View this message in context: http://apache-nifi-developer-list.39713.n7.nabble.com/How-to-keep-the-original-flowfile-tp14921p14945.html
Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.


signature.asc (859 bytes) Download Attachment