Hello Matt,

it is correct.


Too many session.transfer.


Now it is fine.



________________________________
From: Matt Burgess <[email protected]>
Sent: Wednesday, February 1, 2017 2:55:25 PM
To: [email protected]
Subject: Re: IllegalStateException: FlowFile[1,71039521870109.mockFlowFile,0B] 
has already been transferred

Alessio,

Without seeing your modifications, I am guessing that
session.transfer() is being called multiple times for the same flow
file.  Can you share your onTrigger() code? If not, take a look to see
if there is a loop or other path that could cause session.transfer()
to be called on the same flow file more than once.

Regards,
Matt

On Wed, Feb 1, 2017 at 8:26 AM, Alessio Palma
<[email protected]> wrote:
> Hello all,
>
> I'm working to a processor and a service.
>
> My work is based on source codes from 
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpcgrenier%2Fnifi-examples%2Ftree%2Fsample-processor&data=02%7C01%7CAlessio.Palma%40buongiorno.com%7C6d25b38784b347a25ad208d44aa9fb34%7Cac700e2c754b441295e8c92310ae111e%7C0%7C0%7C636215541299459209&sdata=lzEvixdVeWiaxqPsBw8hnWKzKvSXzI3ftjED925v7Wg%3D&reserved=0
>
>
> My problem is this code
>
>
>         runner = TestRunners.newTestRunner(new StartProcessor());
>
>         :
>
>         .
>
>
>         runner.enqueue("THIS IS A CONTENT".getBytes());
>         runner.run(1);
>
> which stops with :
>
> IllegalStateException: FlowFile[1,71039521870109.mockFlowFile,0B] has already 
> been transferred
>
> runner.run(1)  ---> looks like is missing the contente I put into the queue.
>
> What is the correct way to add a fake flowfile into the queue?
> What's wrong with the above code ?
>
> Thanks in advance.
> AP
>

Reply via email to