salesforce,mule , getting file from sfdc with mule


getting file from sfdc with mule

Question:

Tag: salesforce,mule

I need to get file from sfdc and send it to ftp server. I am using mulesoft to connect sfdc.

I have seen below docs in sfdc, but this is like getting content and do mapping and convert to file. Instead of this, I need to get file directly from sfdc and send the file to ftp or email. Any changes in future will be changed in sfdc so that no changes required in mulesoft code.

enter image description here

sfdc connector

EDIT:

Below thread reads the content of attachment, and making it as required file format. But, I am trying to look for directly reading file from sfdc and load the file to local disk.

I don't find any operation in sfdc connector to get the file from sfdc.

sfdc forum


Answer:

SFDC APIs used to read and write data to Salesforce objects. Usually using SOQL. I do not understand your statement "I need to get a file from SFDC but not reading content". Would you please explain?

The following link list latest Mule SFDC connector APIs. The metadata APIs deals with files instead of SOQL but those files used to read/write your model metadata.

http://mulesoft.github.io/salesforce-connector/6.1.0/mule/sfdc-config.html


Related:


Getting Error While Using HTTP on Mule ESB canvas


mule,mule-studio
I am just trying to write a hello world application with help of below video https://www.youtube.com/watch?v=AUfUMXwzu24 I have just used HTTP from pallet and it is giving me below error "Required attribute config-ref is not defined in listener" in Anypoint studio it is showing error in below line <http:listener config-ref=""...

How to create class in salesforce using developer console


salesforce
I am getting Apex class does not exist error but i am not getting any option to create a class. Please see following screen shots. ...

Mule - Retry connection with basic flow


java,http,soap,exception-handling,mule
I have a basic mule flow: HTTP => SOAP => JAVA CLASS <mule xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns:http="http://www.mulesoft.org/schema/mule/http" 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" version="EE-3.6.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans...

Get XML from URL with Mule


xml,http,mule,flow
I have a basic mule flow: <?xml version="1.0" encoding="UTF-8"?> <mule xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns:jersey="http://www.mulesoft.org/schema/mule/jersey" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"...

Mule Import CSV into Mysql with NULL date


mule,esb,mule-studio
I am using MULE to import a CSV file into a Mysql database. However when importing the CSV, if there is an empty field that is mapped to a date field in Mysql, the import fails out. Here is the Mysql Fields: Description RecDate --------------------------- Varchar(50) Date Here is the...

Oracle Data source configuration in MULE(AnyPoint Studio)


oracle,oracle11g,mule,datasource,mule-studio
I use this config for oracle database in Mule: <spring:beans> <spring:bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" destroy-method="shutdown" name="Bean"> <spring:property name="driverName" value="oracle.jdbc.driver.OracleDriver"/> <spring:property name="url" value="jdbc:oracle:thin:@192.168.28.129:1521:orcl"/> <spring:property name="user" value="username" /> <spring:property name="password" value="123456" /> </spring:bean>...

Mule Datamapper JSON to XML Transformation


mule,datamapper
JSON Input Payload information, Where i have issue with. { "name": "xyz", "city": "california", "serialNumber": [ "T2323" , "T2332" ] } Expected transformed Output Payload : <COMPANY_ITEM_INFO> <COMPANY_NAME>xyz</COMPANY_NAME> <COMPANY_CITY>california</COMPANY_NAME> <Inv_Update SEGMENT="1"> <SERIALNO>T2323</SERIALNO> </Inv_Update SEGMENT="1"> <Inv_Update SEGMENT="1"> <SERIALNO>T2332</SERIALNO> </Inv_Update SEGMENT="1"> </COMPANY_ITEM_INFO> Actual Output...

SOQL query to get member data of members in a specific case team


salesforce,apex,soql
I want to get the Member information for the members of a Case Team. Is there anyway to do this without making multiple queries? It doesn't look like this data is associated with the record in the table CaseTeamMember. ...

Mule getting data from ConsumerIterator


mule
My mule flow is: <sfdc:query config-ref="SFDC__DevInt" query="dsql:SELECT Id FROM Account WHERE Name = #[flowVars.Name]" doc:name="Salesforce"/> <logger message="Select query: #[message.payload]" level="INFO" doc:name="Logger"/> <foreach doc:name="For Each"> <logger message="#[message.payload]" level="INFO" doc:name="Logger"/> <logger message="#[message.payload.Id]" level="INFO" doc:name="Logger"/> </foreach> Above for loops returns the id. Instead of looping is there any direct way of getting data...

How do I upload a file attachment using POST?


swift,salesforce
I've created an audio file I want to attach to an "Order" object in Salesforce. The path to the file is properly located at theSoundPath. The following code causes an error that reads: 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (NSConcreteData)' I'm encoding the file in base64 as required by...

“Failed to Deploy Artefact error” in Eclipse Mule ESB project


mule
I'm trying to run a trivial http echo app against the 3.50 CE runtime and I get the following stack trace(s) when I try to run ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Failed to deploy artifact 'default', see below + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ java.lang.NullPointerException at org.mule.module.launcher.DefaultArchiveDeployer.guardedDeploy(DefaultArchiveDeployer.java:274) ... Exception in thread "main" java.lang.NullPointerException at...

Mule AMQP connector fails trying to requeue message


mule,amqp,mule-component
I'm using the AMQP endpoint and have got it working (with one caveat mentioned here [Possible bug with Mule AMQP transport 3.6.2 community) in other places in my Mule application. I'm trying to build a reliable SMTP queue but having problems. I made the assumption that if the SMTP connector...

How to access Mule flow variables in java code?


java,mule,mule-el
Browsing around, I found something that look like below: import org.mule.api.MuleMessage; import org.mule.api.transformer.TransformerException; import org.mule.transformer.AbstractMessageTransformer; import java.util.Scanner; public class javaTest extends AbstractMessageTransformer{ public Object transformMessage(MuleMessage message, String outputEncoding) throws TransformerException{ message.getInvocationProperty("test"); return message; } } I am using this code, where message is a Mule flow variable that I just...

Mule: Migrating to the New HTTP Connector


http,mule,cxf
I've upgraded from Mule 3.5.x to 3.6.x and since the old http transport is deprecated in 3.6.x I wanted to migrate to the new HTTP connector. Here is the original code for calling my webservice: <http:outbound-endpoint ref="OrderEndpoint" doc:name="GetApprovedOrder"> <cxf:jaxws-client serviceClass="com.acme.orders.IOrderServiceBean" port="OrderServiceBean_v2_0Port" operation="getApprovedOrderOp" /> </http:outbound-endpoint> The point I have got to...

Anypoint studio/Mule hangs during startup


mule,mule-studio
I am new to Mule and Anypoint studio. I worked with Mule before. After a while I came back to work with it again. I upgrade to Anypoint Studio March 2015 Release Version: 5.1.0 Build Id: 201503171252 (sorry but I do not remember my old version and it over wrote...

What is the relation of numberOfConcurrentTransactedReceivers with the number of threads mule spawns


mule
I understand that mule has 3 thread pools and how they work, however I am amazed at the lack of documentation around numberOfConcurrentTransactedReceivers, there is virtually nothing that talks about it directly not even Dossots book. There is one blog post which indirectly mentions it, but nothing concrete. This answer...

Get Grandchild Object Field Values from Parent Object


salesforce,apex,soql,grandchild
I'm a newbie at sales-force apex coding. I have 3 custom objects, Location(Parent) -> Group(child) - > Meeting(grand child). All are related to each other through Master detail relationships. I am trying to get 2 field values from the earliest Meeting Record that belongs to the Location. So far I...

Sending detailed email of exception in Mule ESB using SMTP connector


xml,mule,mule-el
I have a "Catch Exception Strategy" in my flow and I use the SMTP connector to send an email to the admin (me). I am able to send the exception using #[exception] but I would like to send a more detailed message including : The complete URL requests The original...

How can I access Mule ESB Community edition via browser?


amazon-web-services,amazon-ec2,mule,mule-component
I am trying to access it via browser, I had no issue with EE but CE is proving difficult. On Putty I have it saying: Mule is already running. And when I go to http://ec2----.us-west-2.compute.amazonaws.com:8585/ it won't load properly. I do have the port 8585 open for inbound traffic as...

How to write dependent queries in MULE CE?


mule,esb,mule-component
I hear that we con't write two Inbound-endpoints in one flow, but below is my requirement, Second select query needs first query payload value. When I run this giving an exception. Please let me know if there is any alternate way to write this. <flow name="Some"> <jdbc:inbound-endpoint queryKey="SelectSome" connector-ref="ProConnector" doc:name="SomeFromPro"...

Mule Server 3.6 > Anypoint Studio > Raw JSON as POST data


mule,esb,mule-studio
Still learning Mulesoft's Anypoint Studio... I am confused as how will I be able to access raw JSON POST data via the HTTP Listener then use the Choice flow control to execute conditions based on a value from a given JSON index. Anyone can show/tell me how to do this?

Mule attachment returning values


mule
<flow..> ... <jersey:resources doc:name="REST"> <component class="com.rest.SyncAccountService"/> </jersey:resources> <set-payload value="#[message.payload]" doc:name="Set Payload"/> <set-property propertyName="mimeType" value="application/octet-stream" doc:name="Property"/> <set-property propertyName="Content-Disposition" value="attachment;filename=${file_name}" doc:name="Property"/> <set-variable variableName="status" value="Success" doc:name="Status"/> <flow-ref...

Mule avoid downloading file after db select statement


mule
<flow name="testFlow1" doc:name="testFlow1"> <http:inbound-endpoint exchange-pattern="request-response" host="${hostname}" port="${port}" path="dbtest" doc:name="HTTP"/> <db:select config-ref="PostgreSQL" doc:name="Database"> <db:parameterized-query><![CDATA[SELECT id, name, int_status FROM test]]></db:parameterized-query> </db:select> <!--line 6 --> <!-- <set-payload value="==no downlaod=#[payload]" doc:name="Set Payload"/>--> </flow> when I run the application...

mule database iterating data and mapping


mule
I am trying to fetch data from db, do mapping and upload to cloud for each record from db one by one. I have done below approach: select data from db, map each record from the db, then upload. Mule flow: <flow name="psi2sfdcFlow2" doc:name="psi2sfdcFlow2"> <http:inbound-endpoint exchange-pattern="request-response" host="${hostname}" port="${port}" path="psi2sfdc" doc:name="HTTP"/>...

Mule Mongo Connector to produce INNER JOIN results


mongodb,join,mule
I have two collections, one of organizations and one of brands within the organization, and I am trying to produce a result set that will have the brands related to the organization show up as as a nested JSON inside the organization JSON result. The code for getting the results...

Which mule transports does the re-connection strategy work with


mule
The reconnection strategies documentation only uses JMS examples, however the FTP transport documentation does state the use of re-connection strategies, without any details or examples though. Further if you look at this answer @David mentions that re-connection will work with only some transports (connected transport). So my first question --...

Mule ESB Server 3.6.1 - HTTP Component URI Params via GET method to Java Component


mule
I am new to Mule ESB... Using Anypoint Studio, how will I be able to access a HTTP GET params in a Java Component? An example would be great!

Mule Server 3.6 > Anypoint Studio > Data Extraction


json,mule,esb,mule-studio
How can extract information against a JSON data, when I have a sessionVars.filters containing: ["account", "billing"] ...where my JSON data contains: { "billing": { "BillNumber": 25, "BillPeriod": "06 Dec 14 - 05 Jan 15", "AccountNumber": 78781843, "PreviousBalance": 0.00, "CurrentBalance": 1237.49, "DueDate": "Jan 26, 2015", "TotalAmountDue": 1237.49, "PreviousBalance": 0.00, "CurrentBalance": 1237.49,...

Beatbox: Possible to add condition to query when pulling SFDC data?


python,pandas,salesforce,beatbox
In Pandas, I want to pull Opportunity data with CreatedDate >= 1/1/2015. Currently, I am extracting all Opportunity data before filtering for CreatedDate. Is it possible to optimize this process by adding the CreatedDate condition to the query? Current State: query_result = service.query("SELECT ID, CreatedDate FROM Opportunity") records = query_result['records']...

how to achieve retry mechanism for ftp outbound end point using vm transaction?


ftp,mule,mule-studio,mule-component
We have tried like using vm as outbound in flow1 and inbound in flow2. In flow2 we are using FTP as outbound end point and we have enabled the vm transaction even then also its not working. Do we need to enable transaction for retrying? As per below question we...

Passing a variable from a list as part of calling a function


python,python-2.7,soap,salesforce
I am using SimpleSalesforce and would like to use the describe() function. An example of that is sf.Contact.describe() to describe the Contact record. I would like to loop through several records in a list, but I'm not sure how to pass in a variable in place of Contact. Objects =...

Mule ESB Community Standalone Runtime


mule
Can anyone tell me if it is possible to use community Runtime of Mule ESB with out any trail? If so, can you please provide me the link to download the community Runtime. I googled it, but couldn't find.

How to combine two JSON in MULE?


json,mule
I have just started working on MULE and I am trying to combine 2 JSONs (say 1 is coming from http post and another is set as Payload in sub flow). Now how can i combine the 2 JSONs. I tried with custom Transformer but no success.So please suggest how...

Salesforce custom button returning 'Unexpected Token ILLEGAL?


javascript,unicode,salesforce
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")} /*Getting the Running User Details*/ var result = sforce.connection.query( "SELECT Advisor__c " + "FROM User " + "WHERE Id = '{!$User.Id}'" ); /*Grab the Records returned by executing the above SOQL Query*/ var userDetails = result.getArray("records")[0]; /*Initializing the Contact record for Update*/ var contactToUpdate = new sforce.SObject("Contact"); contactToUpdate.Id =...

List button in Salesforce1


salesforce,salesforce-ios-sdk
In Salesforce1, Is there an option to add custom List button? For example, follow below steps and you will land to Opportunity tab in Salesforce1 and I want to see button at the bottom(refer screenshot). Step 1 : Login to Salesforce1 using any dev sanbox Step 2 : Tap on...

Mule - Throw Exception with until-successful


java,exception,soap,exception-handling,mule
This is my mule flow: HTTP => Logger => SOAP (CXF) => Until Successful [JAVA] => LOGGER Spring : <spring:beans> <spring:bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <spring:property name="locations"> <spring:list> <spring:value>test.properties</spring:value> </spring:list> </spring:property> </spring:bean> <spring:bean id="testIntegration" class="x.x.x.IntegrationClass" init-method="init">...

Where can I download MuleSoft Community Edition?


mule,esb,mule-studio
Have they got rid of Community edition? I can't find a link to download it anywhere on their site. Is there another link I can download it from somewhere? Thanks...

what is the max retries for until successful scope in mule 3.4.2


mule,mule-studio,mule-component,mule-el
what is the max retries for until successful scope in mule 3.4.2? how many maximum retries we can accoumdate for until successful.is there any limit we have for retries? or else shall I use as many I can?...

Why would my Mule project suddenly start complaining about “Invalid keystore format”


mule,mule-studio
While trying to learn how to use the Imap connector in Mule studio, I came across this tutorial. I downloaded it and imported it into AnyPoint studio as a project, and as it were in that tutorial, it worked great (after sending the connector to the right host/port etc.) I...

How to keep mule CE 5.3.0 running


mule,esb
I've created my mule application, and i deploy it on mule ce 5.3.0 my question now is how to keep my server running which means even if i close my CMD (the window where my mule is running) my application keep running.

Flask-Restful, oauth, and Salesforce


python,rest,flask,oauth-2.0,salesforce
I am building out a REST service using Flask-RESTful that will allow users to connect to their salesforce Environment and pull data. Is it possible to secure a restful API with oauth2?! I cannot seem to find any documentation this....

Bug: Mule xpath3 transform gets transformed namespaces wrong in edge-case


xml,xpath,mule
When XML which contains the XMLSchema namespace xmlns:xs="http://www.w3.org/2001/XMLSchema" but only utilised within an XMLSchema-instance xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" such as: <nsp:Value xsi:type="xs:int">1</nsp:Value> is transformed using xpath3 such as: #[xpath3('//nsp:Configuration', message.payload, 'NODESET')] then the XMLSchema namespace definition will not be added to the outgoing XML. All other namespace definitions will be added fine, but...

How to use flowvariable in a Mule Query


mule,datamapper
I am trying to use a query with flowvariable in the where clause in Mule ESB (Connecting with Salesforce) SELECT id FROM Account WHERE CX_ID__c = '"flowvars.orgpayload.CXM_ID+"' LIMIT 1 But I am not getting an error here. Any pointers on how to use flow variable in a query would help....

Revoking OAuth tokens in Mule


oauth-2.0,mule
I have configured a OAuth provider in Mule using the OAuth connector, and I give out access tokens to users as and when they login, they get a new access token for each device they login with, my question is what is the best thing to do when a user...

Mule Server 3.6 > Anypoint Studio > Request Connector


json,post,mule,esb,mule-studio
How do I set the Request Connector to send Raw JSON data using POST method? On my Set Payload transformer I have this: #[{ "productId": #[sessionVars.productId] }] When I run my Mule App, I get the following error: Error sending HTTP request. Message payload is of type: String What am...

Set value to payload using expression transformer


mule,mule-studio,mule-component
I am wanting to invoke a function on payload which is a Java pojo to set a value. <set-variable variableName="name" value="xyz" doc:name="Variable"/> <foreach doc:name="For Each"> <expression-transformer expression="#[payload.setEventId(flowVars['name'])]" doc:name="Expression"/> <logger message="#[payload.getEventId()]" level="INFO" doc:name="Logger"/> </foreach> But this is giving me error. Root Exception stack trace: org.mule.api.transformer.TransformerException: Expression Evaluator "null" with expression...

Beatbox: How do I add a WHERE clause when pulling data from SFDC?


python,pandas,salesforce,beatbox
In Pandas, I am creating a dataframe that merges data from two different Beatbox queries. First, I pull all my Opportunity data, then I pull all my Account data, and then I merge. However I would like to optimize this process by only pulling data for account['ID'] that exists in...

How to read mail and insert into database using Mule?


java,email,mule,javamail
I have to create an application in Mule which will read the mail from a store and save it's details in a database. I know how to insert the data into the database but I am unable to find any solution about the mail. How do I read the mail...

Mule Batch Negative seek offset


mule
I am getting following error message while starting/running the application. [batch-job-batchprocessBatch1-work-manager.03] com.mulesoft.module.batch.engine.threading.BatchRecordWork: Exception found while processing block 'be158611-147c-11e5-9d15-0026b9eef95d' for instance 'a4815df0-147c-11e5-85c6-0026b9eef95d' of batch job 'batchprocessBatch1'. Records will be queued back java.lang.IllegalAccessError: sun/nio/cs/UTF_8 at sun.nio.cs.UTF_8ConstructorAccess.newInstance(Unknown Source) at...

Mule - Exported project - Error java.io.FileNotFoundException


deployment,path,wsdl,mule
I have exported my mule project which contains a WSDL file in src.main.resources/wsdl-request. The type of export is AnyPoint Studio Project to AnyPoint Deployable Archive. The problem is that when I execute the deployable archive in the server it return this error: Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'file:/C:/Users/usrAdmin/AnypointStudio/workspace/mule-project-test/src/main/resources/wsdl-test/Request.wsdl'....