GitHub user zregvart opened a pull request: https://github.com/apache/camel/pull/1338
CAMEL-10571 SObject tree creation, Composite API **Don't merge look at #1334 first.** @dhirajsb would you mind taking a look at this? This pull requests adds support for SObject tree creation using Salesforce Composite API. It includes the commit from #1334 which it is based on. So please review pull request #1334 before merging this in, and if you can notify me through comments I'll rebase if #1334 gets merged in. This functionality allows user to create multiple, up to 200, records including parent-child relationships, up to 5 levels using one API call. For instance: Account account = ... Contact president = ... Contact marketing = ... Account anotherAccount = ... Contact sales = ... Asset someAsset = ... // build the tree SObjectTree request = new SObjectTree(); request.addObject(account).addChildren(president, marketing); request.addObject(anotherAccount).addChild(sales).addChild(someAsset); final SObjectTree response = template.requestBody("salesforce:composite-tree", tree, SObjectTree.class); The returned response in the output message is the identical object received in the body of the input message updated with identifiers received on successful record creation or populated errors on failure. You can merge this pull request into a Git repository by running: $ git pull https://github.com/zregvart/camel composite-api Alternatively you can review and apply these changes as the patch at: https://github.com/apache/camel/pull/1338.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1338 ---- commit a7cdf08cf52ef4f5cc6f418e6357142b5a441b9a Author: Zoran Regvart <zo...@regvart.com> Date: 2016-12-08T10:27:28Z SObjectDescription metadata in DTOs This commit adds SObjectDescription by making the DTOs extend AbstractDescribedSObjectBase (new class) instead of AbstractSObjectBase. The code generation is performed in Velocity template by recursing the bean SObjectDescription properties. Helper methods are added to GeneratorUtility that help track the stack of the recursive invocation. To prevent hitting Java method length restriction (64K) some properties are blacklisted: PicklistValues and ChildRelationships which most likely would not be needed in the component operation anyways. (cherry picked from commit 2d14fd8caa58f4520cf70801a27a0a57b023f492) commit cfbb26c00858dd472b7f320174fdd0fd431c7f5d Author: Zoran Regvart <zo...@regvart.com> Date: 2016-12-08T10:28:07Z CAMEL-10571 SObject tree creation, Composite API This commit implements support for SObject tree creation via Salesforce Composite API. This allows user to create multiple, up to 200, records including parent-child relationships, up to 5 levels using one API call. For instance: Account account = ... Contact president = ... Contact marketing = ... Account anotherAccount = ... Contact sales = ... Asset someAsset = ... // build the tree SObjectTree request = new SObjectTree(); request.addObject(account).addChildren(president, marketing); request.addObject(anotherAccount).addChild(sales).addChild(someAsset); final SObjectTree response = template.requestBody("salesforce:composite-tree", tree, SObjectTree.class); The returned response in the output message is the identical object received in the body of the input message updated with identifiers received on successful record creation or populated errors on failure. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---