You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by srini <na...@gmail.com> on 2017/02/23 17:20:22 UTC

How to keep the original flowfile?

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.

Re: How to keep the original flowfile?

Posted by Andy LoPresto <al...@apache.org>.
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
alopresto@apache.org
alopresto.apache@gmail.com
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

> On Feb 24, 2017, at 7:24 AM, srini <na...@gmail.com> 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.


Re: How to keep the original flowfile?

Posted by srini <na...@gmail.com>.
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.

Re: How to keep the original flowfile?

Posted by Aldrin Piri <al...@gmail.com>.
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 <na...@gmail.com> 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.
>

Re: How to keep the original flowfile?

Posted by srini <na...@gmail.com>.
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.

Re: How to keep the original flowfile?

Posted by Pierre Villard <pi...@gmail.com>.
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 <na...@gmail.com>:

> 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.
>