Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MuleSoft Recuperando dados do salesforce

MuleSoft Recuperando dados do salesforce

MuleSoft Recuperando dados do salesforce2

Alex teles

August 10, 2016
Tweet

More Decks by Alex teles

Other Decks in Education

Transcript

  1.  Recuperando dados com conector do salesforce  Transform Message

    para recuperar os dados  Imprimindo no log
  2.  <poll doc:name="Poll">  <schedulers:cron-scheduler expression="0 0 1 1 *

    ? 2016"/>  <logger message="====Inicio======" level="INFO" doc:name="Logger"/>  </poll>
  3.  <dw:transform-message doc:name="Transform Message">  <dw:set-payload><![CDATA[%dw 1.0  %input payload

    application/java  %output application/json  ---  payload]]></dw:set-payload>
  4.  <?xml version="1.0" encoding="UTF-8"?>  <mule xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw" xmlns:schedulers="http://www.mulesoft.org/schema/mule/schedulers" xmlns:sfdc="http://www.mulesoft.org/schema/mule/sfdc" xmlns="http://www.mulesoft.org/schema/mule/core"

    xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"  xmlns:spring="http://www.springframework.org/schema/beans"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd  http://www.mulesoft.org/schema/mule/sfdc http://www.mulesoft.org/schema/mule/sfdc/current/mule-sfdc.xsd  http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd  http://www.mulesoft.org/schema/mule/schedulers http://www.mulesoft.org/schema/mule/schedulers/current/mule- schedulers.xsd  http://www.mulesoft.org/schema/mule/ee/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd">  <sfdc:config name="Salesforce__Basic_Authentication" username="${sales.user}" password="${sales.password}" securityToken="${sales.token}" doc:name="Salesforce: Basic Authentication"/>  <flow name="salesforcequeryFlow">  <poll doc:name="Poll">  <schedulers:cron-scheduler expression="0 0 1 1 * ? 2016"/>  <logger message="====Inicio======" level="INFO" doc:name="Logger"/>  </poll>  <sfdc:query config-ref="Salesforce__Basic_Authentication" query="dsql:select CPF__c , Idade__c , Nome__c from Informacoes__c" doc:name="Salesforce"/>  <dw:transform-message doc:name="Transform Message">  <dw:set-payload><![CDATA[%dw 1.0  %input payload application/java  %output application/json  ---  payload]]></dw:set-payload>  </dw:transform-message>  <logger message="#[message.payloadAs(java.lang.String)]" level="INFO" doc:name="Logger"/>  </flow>  </mule>