You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/11/18 15:49:58 UTC

[jira] [Commented] (CAMEL-10498) Update Salesforce component to support approval REST API

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

ASF GitHub Bot commented on CAMEL-10498:
----------------------------------------

GitHub user zregvart opened a pull request:

    https://github.com/apache/camel/pull/1277

    CAMEL-10498 Update Salesforce component to support approval REST API

    This PR adds support for getting and sending approvals for
    processing via Salesforce REST API[1].
    
    Two new operations were added `approvals` to fetch any approvals already
    in progress, and `approval` to initiate approval process on the supplied
    record or records (batch).
    
    For instance, `approvals` can be simply used as:
    
        ...to("salesforce:approvals")
            .split().body()
            .log("${body.entityId} - ${body.instanceStatus}")
    
    And to send a record for approval you can use:
    
        ...to("salesforce:approval?approval.actionType=Submit&...")
            .log("${body.id} - ${body.instanceStatus}")
    
    The `approval` operation has the ability to set properties on the
    endpoint (let's call that template), via message headers and message
    body. These can be combined, to place default values on the endpoint
    (template), and runtime values trough headers or message body.
    
    If the message body is an `Iterable` of `ApprovalRequest` objects then
    they will be submitted in a batch.
    
    [1]
    https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_process_approvals.htm

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zregvart/camel CAMEL-8396-approval

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/1277.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 #1277
    
----
commit 87625057bfd1f55b631bd91c8793376a0955a43d
Author: Zoran Regvart <zo...@regvart.com>
Date:   2016-11-14T15:33:19Z

    CAMEL-8396 Update Salesforce component to support new REST APIs in Sa...
    ...lesforce API V33.0
    
    This commit adds support for getting and sending approvals for
    processing via Salesforce REST API[1].
    
    Two new operations were added `approvals` to fetch any approvals already
    in progress, and `approval` to initiate approval process on the supplied
    record or records (batch).
    
    For instance, `approvals` can be simply used as:
    
        ...to("salesforce:approvals")
            .split().body()
            .log("${body.entityId} - ${body.instanceStatus}")
    
    And to send a record for approval you can use:
    
        ...to("salesforce:approval?approval.actionType=Submit&...")
            .log("${body.id} - ${body.instanceStatus}")
    
    The `approval` operation has the ability to set properties on the
    endpoint (let's call that template), via message headers and message
    body. These can be combined, to place default values on the endpoint
    (template), and runtime values trough headers or message body.
    
    If the message body is an `Iterable` of `ApprovalRequest` objects then
    they will be submitted in a batch.
    
    [1]
    https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_process_approvals.htm

----


> Update Salesforce component to support approval REST API
> --------------------------------------------------------
>
>                 Key: CAMEL-10498
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10498
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-salesforce
>    Affects Versions: 2.18.0
>         Environment: Any
>            Reporter: Zoran Regvart
>              Labels: feature, features, future
>             Fix For: 2.18.2
>
>
> Part of CAMEL-8396 to add support for the [Approvals|https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_process_approvals.htm].
> Implement support for getting and sending approvals for
> processing via Salesforce REST API.
> Add two new operations: _approvals_ to fetch any approvals already
> in progress, and _approval_ to initiate approval process on the supplied
> record or records (batch).
> To fetch the records in approval process:
> {code:java}
> ...to("salesforce:approvals")
>     .split().body()
>     .log("${body.entityId} - ${body.instanceStatus}")
> {code}
> And to send a record for approval:
> {code:java}
> ...to("salesforce:approval?approval.actionType=Submit&...")
>     .log("${body.id} - ${body.instanceStatus}")
> {code}
> The _approval_ operation should have the ability to set properties on the
> endpoint (let's call that template), via message headers and message
> body. These can be combined, to place default values on the endpoint
> (template), and runtime values trough headers or message body.
> If the message body is an _Iterable_ then
> they should be submitted in a batch.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)