nanjeshramesh opened a new pull request, #11756:
URL: https://github.com/apache/nifi/pull/11756

   <!-- Licensed to the Apache Software Foundation (ASF) under one or more -->
   <!-- contributor license agreements.  See the NOTICE file distributed with 
-->
   <!-- this work for additional information regarding copyright ownership. -->
   <!-- The ASF licenses this file to You under the Apache License, Version 2.0 
-->
   <!-- (the "License"); you may not use this file except in compliance with -->
   <!-- the License.  You may obtain a copy of the License at -->
   <!--     http://www.apache.org/licenses/LICENSE-2.0 -->
   <!-- Unless required by applicable law or agreed to in writing, software -->
   <!-- distributed under the License is distributed on an "AS IS" BASIS, -->
   <!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied. -->
   <!-- See the License for the specific language governing permissions and -->
   <!-- limitations under the License. -->
   
   # Summary
   
   [NIFI-14181](https://issues.apache.org/jira/browse/NIFI-14181)
   
   `QuerySalesforceObject` accepts an optional input FlowFile and already 
evaluates `Custom WHERE Condition` against it, but `sObject Name` was declared 
with `ENVIRONMENT` expression language scope and read with 
`evaluateAttributeExpressions()` and no FlowFile. A value like `${object}` 
therefore resolved to an empty string, so the processor asked Salesforce to 
describe an sObject named `""` and failed with `NOT_FOUND`, as reported in the 
ticket.
   
   * Declare `sObject Name` with `FLOWFILE_ATTRIBUTES` scope and evaluate it 
against the input FlowFile. With no input FlowFile (for example when the 
processor is scheduled without an incoming connection) the behavior is the same 
as before.
   * Add a unit test that queries an sObject named by a FlowFile attribute. 
Before the change it fails because `describeSObject("")` is called instead of 
`describeSObject("TestObject")`.
   * Add a note to the additional details. The processor keeps one age filter 
value in its state, regardless of the object queried, so when `Age Field` is 
set the `sObject Name` should resolve to the same object for every FlowFile. 
This is the same limitation `Custom WHERE Condition` already has.
   
   `Field Names` is left as it is, since the ticket only covers `sObject Name` 
and leaving it empty queries all fields of whichever object is selected.
   
   # Tracking
   
   ### Issue Tracking
   
   - [x] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue 
created
   
   ### Pull Request Tracking
   
   - [x] Pull Request title starts with Apache NiFi Jira issue number, such as 
`NIFI-00000`
   - [x] Pull Request commit message starts with Apache NiFi Jira issue number, 
as such `NIFI-00000`
   - [x] Pull request contains commits signed with a registered key indicating 
`Verified` status
   
   ### Pull Request Formatting
   
   - [x] Pull Request based on current revision of the `main` branch
   - [x] Pull Request refers to a feature branch with one commit containing 
changes
   
   # Verification
   
   ### Build
   
   - [x] `./mvnw -pl 
nifi-extension-bundles/nifi-salesforce-bundle/nifi-salesforce-processors verify 
-P contrib-check`
     - [x] JDK 21 (compiled with `--release 21`)
     - [ ] JDK 25
   
   ### Licensing
   
   - [x] No new dependencies
   
   ### Documentation
   
   - [x] Documentation formatting appears as expected in rendered files
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to