You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/03/03 18:00:00 UTC

[jira] [Commented] (NIFI-11158) PutSalesforceObject processor improvements

    [ https://issues.apache.org/jira/browse/NIFI-11158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17696247#comment-17696247 ] 

ASF subversion and git services commented on NIFI-11158:
--------------------------------------------------------

Commit 1273152d781b754d0ba0a57506fa44783bb65d1d in nifi's branch refs/heads/support/nifi-1.x from krisztina-zsihovszki
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=1273152d78 ]

NIFI-11158 PutSalesforceObject processor improvements

This closes #6959.

Reviewed-by: Lehel <le...@hotmail.com>
Reviewed-by: Mark Bathori <ba...@gmail.com>

Signed-off-by: Peter Turcsanyi <tu...@apache.org>


> PutSalesforceObject processor improvements
> ------------------------------------------
>
>                 Key: NIFI-11158
>                 URL: https://issues.apache.org/jira/browse/NIFI-11158
>             Project: Apache NiFi
>          Issue Type: Improvement
>    Affects Versions: 1.20.0
>            Reporter: Zsihovszki Krisztina
>            Assignee: Zsihovszki Krisztina
>            Priority: Major
>             Fix For: 2.0.0
>
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Found a few minor issues while checking PutSalesforceObject processor in the scope of NiFi 1.20 RC1 validation.
>  
>  * The session.penalize call is missing when flowfile is routed to FAILURE relationship.
>  * It would be also useful if an "error.message" attribute was put on the outgoing flowfile containing info about the occurred error.
>  * No provenance event is generated for successful put actions.
>  * SeeAlso tags are missing (there is also a QuerySalesforceObject processor).
>  
> I used an already fetched Salesforce record for testing. It contained null fields. When tried to upload that record (with a new name) to Salesforce, I got an NPE (flowfile was routed to FAILURE):
>  
> {code:java}
> 2023-02-09 10:12:47,176 ERROR [Timer-Driven Process Thread-2] o.a.n.p.salesforce.PutSalesforceObject PutSalesforceObject[id=351e77fb-0186-1000-2c1f-d14e9aad775b] Failed to put records to Salesforce.
> java.lang.NullPointerException: null
>         at java.base/java.util.Objects.requireNonNull(Objects.java:221)
>         at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:178)
>         at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
>         at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
>         at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
>         at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
>         at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
>         at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
>         at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
>         at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
>         at org.apache.nifi.processors.salesforce.util.RecordExtender.getExtendedRecord(RecordExtender.java:71)
>         at org.apache.nifi.processors.salesforce.PutSalesforceObject.onTrigger(PutSalesforceObject.java:164)
> {code}
> I believe it is not a common use case to upload a record with null value field but the code might be improved filter out/ignore null value fields and handle this situation without error.
>  
> A short example to reproduce the above error with NPE (it's a BusinessBrand object).
> {code:java}
> {
>   "Name": "=p'C!QWv",
>   "OrgId": "S/}[R\"Tf",
>   "ParentId": null
> }{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)