[
https://issues.apache.org/jira/browse/NIFI-1899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15358705#comment-15358705
]
ASF GitHub Bot commented on NIFI-1899:
--------------------------------------
Github user ijokarumawak commented on the issue:
https://github.com/apache/nifi/pull/483
@trixpan Thanks for addressing comments promptly! I confirmed that all of
my comments are addressed. However the modification on ExtractEmailHeader.java
didn't work with following error:
```
java.lang.IllegalStateException:
StandardFlowFileRecord[uuid=3fa0d309-51f4-470c-8d73-40f8fb41b00b,claim=StandardContentC
laim [resourceClaim=StandardResourceClaim[id=1467363128300-1,
container=default, section=1], offset=3812, length=942],of
fset=0,name=332702955935506,size=942] already in use for an active callback
at
org.apache.nifi.controller.repository.StandardProcessSession.validateRecordState(StandardProcessSession.java:2420)
[nifi-framework-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
at
org.apache.nifi.controller.repository.StandardProcessSession.putAllAttributes(StandardProcessSession.java:1445)
[nifi-framework-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
at
org.apache.nifi.processors.email.ExtractEmailHeaders$1.process(ExtractEmailHeaders.java:205)
~[nifi-email-processors-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
```
The reason is `session.putAttributes(originalFlowFile, attributes)` is
inside of read callback for the original flow file. A possible way to solve
this is, making the read callback to do only creation of extracted attribute
map, and do session.putSttributes outside of the callback.
I've modified that part, tested with running NiFi flow and confirmed that
worked. Uploaded an example code on
[Gist](https://gist.github.com/ijokarumawak/4cb6b00535a9385669b97c089745f5d0).
Once above exception and the test file content concern are addressed, I'd
+1. even if I don't have commit privilege :)
> Create ListenSMTP & ExtractEmailAttachment processors
> -----------------------------------------------------
>
> Key: NIFI-1899
> URL: https://issues.apache.org/jira/browse/NIFI-1899
> Project: Apache NiFi
> Issue Type: New Feature
> Reporter: Andre
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)