Re: How to preserve the previous flowfile content using InvokeHttp

2020-01-27 Thread Contacto Control Cobros
Thanks Etienne for your response,

I tried both approaches. The second goes better with what I need, because I
require the sessionID and with the first approach I didn't find how to
share the sessionID after the Notify.

I just hope that storing the content in the distributed cache is better
than having it as an attribute.


El lun., 27 ene. 2020 a las 11:14, Etienne Jouvin ()
escribió:

> Hello.
>
> I manage to do this in two ways :
> 1. Use Wait / Notify process. Put the original content in the wait, and
> after your post is finished call the Notify to free the original one.
> 2. Or use a distribute cache map. Store the original content in the cache,
> do your stuff and then request the original content from the cache.
>
> Hope it helps
>
>
> Le lun. 27 janv. 2020 à 17:12, Contacto Control Cobros <
> contactocontrolcob...@gmail.com> a écrit :
>
>> Hello community
>>
>> I need to read a JSON file that is obtained as an attachment to an email
>> with a specific subject, so far there is no problem. Then I need to make a
>> POST to get a sessionID, with username and password that I have as a
>> parameter.
>>
>> Finally I need to send the JSON content using another POST request,
>> sending as header the sessionID that I obtained.
>>
>> My problem is how to make an InvokeHTTP (POST), without losing the
>> content I read in the first step. Nifi always requires that the body for
>> the POST be the Flowfile content. I would not like to load the JSON as an
>> attribute, it can be very large.
>>
>> I appreciate your help.
>>
>


How to preserve the previous flowfile content using InvokeHttp

2020-01-27 Thread Contacto Control Cobros
Hello community

I need to read a JSON file that is obtained as an attachment to an email
with a specific subject, so far there is no problem. Then I need to make a
POST to get a sessionID, with username and password that I have as a
parameter.

Finally I need to send the JSON content using another POST request, sending
as header the sessionID that I obtained.

My problem is how to make an InvokeHTTP (POST), without losing the content
I read in the first step. Nifi always requires that the body for the POST
be the Flowfile content. I would not like to load the JSON as an attribute,
it can be very large.

I appreciate your help.


ClassNotFound LogSupport using ExtractEmailHeaders in v1.10.0

2020-01-15 Thread Contacto Control Cobros
Hi all,

I am using Apache Nifi 1.10, running with Java 11 and I had an error using
the "ExtractEmailHeaders" processor:


*WARN [Timer-Driven Process Thread-7]
o.a.n.controller.tasks.ConnectableTask Administratively Yielding
ExtractEmailHeaders[id=aabe0e09-016f-1000-02c0-2bb7e4f1c5b8] due to
uncaught Exception: java.lang.NoClassDefFoundError:
com/sun/activation/registries/LogSupportjava.lang.NoClassDefFoundError:
com/sun/activation/registries/LogSupport*

This seems to happen because in the */nifi-1.10.0/lib/java11* folder there
is no JAR file that has the class that was removed in Java 11 (
https://blog.codefx.org/java/java-11-migration-guide/#Removal-Of-Java-EE-Modules
).

I had to remove the file "javax.activation-api-1.2.0.jar" and add the
javax.activation-1.2.0.jar (which contains the com.sun.activation package).
For now, that seems to solve the problem.