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

Guillaume Nodet commented on CAMEL-28015:
-----------------------------------------

This issue is being investigated by a coding agent (on behalf of gnodet).

Root cause confirmed: (1) SalesforceEndpointConfig.toValueMap() never adds 
PK_CHUNKING, PK_CHUNKING_CHUNK_SIZE, PK_CHUNKING_PARENT, or 
PK_CHUNKING_START_ROW to the value map, so BulkApiProcessor.determineHeaders() 
cannot read them from endpoint config. (2) toValueMap() puts the endpoint 
approval object by reference; AbstractRestProcessor.processApproval() mutates 
it via setPropertyValue(), causing header values to bleed across exchanges.

_Note: This comment was generated by an AI coding agent and requires manual 
verification._

> camel-salesforce - pkChunking options have no effect, and approval header 
> values stay on the endpoint
> -----------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-28015
>                 URL: https://issues.apache.org/jira/browse/CAMEL-28015
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-salesforce
>            Reporter: Claus Ibsen
>            Assignee: Guillaume Nodet
>            Priority: Major
>             Fix For: 4.25.0
>
>
> h4. 1. The pkChunking options of the endpoint have no effect
> The endpoint options pkChunking, pkChunkingChunkSize, pkChunkingParent and 
> pkChunkingStartRow (SalesforceEndpointConfig) are never put into the value 
> map of SalesforceEndpointConfig.toValueMap(). BulkApiProcessor reads them 
> with getParameter(PK_CHUNKING..., exchange, ...), which looks at the message 
> header and then at the value map, so only the CamelSalesforcePkChunking* 
> headers work and the options set on the endpoint are ignored.
> Fix: add the four options to toValueMap(), and a test that the option reaches 
> the createJob request.
> h4. 2. processApproval changes the ApprovalRequest of the endpoint
> SalesforceEndpointConfig.toValueMap() puts the configured ApprovalRequest 
> instance in the value map (valueMap.put(APPROVAL, approval)). 
> AbstractRestProcessor.processApproval gets it with getParameter(APPROVAL, 
> ...) when the message has no approval header, and processApprovalHeaderValues 
> then sets the approval.<property> header values of the message on that 
> instance. The values are written into the approval of the endpoint itself: 
> they stay there for the following messages, and messages processed at the 
> same time change the same object.
> Fix: work on a copy of the configured ApprovalRequest (the endpoint value is 
> a template), and add a test that sends two messages with different approval.* 
> headers.
> Found while declaring the message headers of the components (CAMEL-27980).
> ----
> _Filed by Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to