Menu
  • HOME
  • TAGS

Set value to payload using expression transformer

mule,mule-studio,mule-component

The expression-transformer replaces the current payload with the value returned by the expression. I'm guessing setEventId is void thus the expression returns null, hence the exception. Use an expression-component instead: <expression-component>payload.setEventId(flowVars['name'])</expression-component> ...

MuleSoft - use decryption with null paylod

mule

It would be better to only decrypt if the payload is not null: it's better to avoid raising exceptions if you can. For this, you can use a choice router to decrypt only if the payload is not null....

mule database iterating data and mapping

mule

Remove the object-to-string-transformer: it transforms the rows enumeration into a String, which prevents for-each to work. EDIT: Moreover, because the inbound HTTP endpoint is request-response, it will need to return a response to the client. Mule will use the current payload (a Jdbc4Array instance) as the payload of the HTTP...

Mule Server 3.6 > Anypoint Studio > Request Connector

json,post,mule,esb,mule-studio

You could try adding <set-variable variableName="Content-Type" value="application/json" /> just above your http request endpoint. For more details have a look here Let me know if this works for you....

Explanation of $ in Mule MEL

mule,mel

$ comes from MVEL, the language underlying MEL. $ serves as the placeholder for the element being filtered. It is actually a regular variable that exists inside the context of the projection. You can also use it to return the current element in the projection to the representative list. Reference:...

How to use flowvariable in a Mule Query

mule,datamapper

Flow variables are accessible via MEL, either with flowVars.VAR_NAME, flowVars['VAR_NAME'] (if the variable contains characters that conflicts with MEL's syntax) or directly VAR_NAME (if you have not disabled the default binding of flow variables as top level MEL variables). In your case, since the flow variable is named orgpayload.CXM_ID, the...

Rollback strategy with maxRedeliveryAttempts and VM inbound configured does not redeliver messages

exception,mule

I finally got the answer after speaking with MuleSoft. The updated flow should look like the below, both the VM's should be one-way and the processing strategy of the TxFlow should be synchronous. If the VM is request-reponse then it below more like a flow-ref with no queue involved and...

Using multiple MEL expressions in Set payload

mule,mel

Can use the set payload script as mentioned in below Example [message.payload=org.mule.util.StringUtils.remove(message.payload,'test1');mess‌​age.payload=org.mule.util.StringUtils.remove(message.payload,'test2')] ...

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

xml,xpath,mule

You can report this in the project jira  https://www.mulesoft.org/jira/login.jsp  Also if you are a enterprise customer you should report it via your customer portal....

Mule avoid downloading file after db select statement

mule

Since you have used HTTP inbound 'exchange-pattern' as request-response. When you enable setpayload(line 6) it is returning to brower. If you dont want that, make HTTP exchange-pattern as one- way.

MuleESB AnyPointStudio JPA implementation

java,hibernate,jpa,mule,esb

Have you seen the following example?: http://java.dzone.com/articles/getting-started-jpa-and-mule...

Data Transformation in Mule ESB

mule,datamapper

You can create a custom MEL function and use it in your flow, in an expression-transformer: <configuration> <expression-language> <global-functions> def translateType(t) { typeMap = ['C' : 'Company', 'P' : 'Person', 'U' : 'Unknown']; typeMap[t]; } </global-functions> </expression-language> </configuration> With this in place, you can use translateType in your flows. Reference:...

Mule attachment returning values

mule

Remove <set-payload value="#[message.payload]" doc:name="Set Payload"/> : it sets the message payload as itself, which is useless. Wrap <flow-ref name="audit" doc:name="audit"/> in an async scope so its response doesn't mess with the response from the JAX-RS component. Unless you really need to expose the audit flow over HTTP, remove the...

Wiretap router versus Async scope

mule,mule-studio

You should always use async, wire-tap is legacy and inherited from older versions of mule. The implications are at the threading level, specially the difference is from which internal thread pool they take the thread from. Please bear in mind that its use should be very simple, otherwise it may...

Mule Batch Negative seek offset

mule

This is known issue in Mule3.5.1 but it has been fixed in Mule3.5.3. So upgrade to this version or don't use batch process in Mule with older version. https://developer.mulesoft.com/docs/display/current/Mule+ESB+3.5.3+Release+Notes...

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

mule,esb,mule-studio

The JSON HTTP body will automatically become the payload of your message in Mule probably represented as Stream. Just for demo purposes, try logging the payload after your http:listener using: <object-to-string-transformer /> <logger level="INFO" message="#[payload]" /> There best way to query JSON is to transform it to a Map suing...

How to access Mule flow variables in java code?

java,mule,mule-el

Whether or not this is the proper fix I am unsure, but what I've done to fix this problem is set a variable in the java code to the value of the message.getInvocationProperty, then return that java variable, like so: import org.mule.api.MuleMessage; import org.mule.api.transformer.TransformerException; import org.mule.transformer.AbstractMessageTransformer; public class javaTest extends...

Payload class type changes when exiting from sub-flow

mule

the CXF processor is an intercepting message processor, so it performs some actions right after the processor chain is executed (in this case the second sub flow). In order to alter this behavior, you can surround the cxf client with <processor-chain> tags.

How to write Mule console output in a Text File

mule,esb

You need to add a log4j properties file into your main/resources directory, this log4j.xml file will do the trick <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'> <appender name="file-appender" class="org.apache.log4j.FileAppender"> <param name="file" value="path_to_your_log_file_here.log" /> <param name="append" value="true" /> <param name="threshold" value="debug" /> <layout...

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

mule,mule-studio

I suspect that you edited the flow in visual mode instead of XML and that Studio has transformed this (which came from the download): <imaps:connector checkFrequency="100" doc:name="IMAP" name="imapsConnector" validateConnections="true"> </imaps:connector> into that: <imaps:connector checkFrequency="100" doc:name="IMAP" name="imapsConnector" validateConnections="true"> <imaps:tls-client path="" storePassword="" /> <imaps:tls-trust-store path="" storePassword="password" /> </imaps:connector> i.e. empty tls...

Mule Mongo Connector to produce INNER JOIN results

mongodb,join,mule

The problem comes from the fact you store string representation of the brands in brandResponses, thus you collect them as strings in the final JSON. Note that for producing JSON, there's no big gain in using Groovy. Building Maps/Lists with MEL and serializing them to JSON Objects/Arrays with the json:object-to-json-transformer...

How to keep mule CE 5.3.0 running

mule,esb

See here: https://developer.mulesoft.com/docs/display/current/Starting+and+Stopping+Mule+ESB#StartingandStoppingMuleESB-StartingandStoppingMuleViatheCommandLine Starting In the Background Use the cd command to navigate to the $MULE_HOME/bin directory. Run the startup script according to the options below. Unix: ./mule start Windows: mule.bat start...

Getting “muleContext cannot be resolved” error in mule Junit test code

java,junit,mule,junit4,junit3

To have an active MuleContext during your test, you need to extend FunctionalTestCase: import org.mule.tck.junit4.FunctionalTestCase; public class SampleTest extends FunctionalTestCase { ...

Getting Error While Using HTTP on Mule ESB canvas

mule,mule-studio

You are missing an http:listener-config element, like for example: <http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="8081" doc:name="HTTP Listener Configuration"/> See: https://developer.mulesoft.com/docs/display/current/HTTP+Listener+Connector...

Oracle Data source configuration in MULE(AnyPoint Studio)

oracle,oracle11g,mule,datasource,mule-studio

This is how you can configure your oracle :- <spring:beans> <spring:bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <spring:property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/> <spring:property name="url" value="jdbc:oracle:thin:@192.168.28.129:1521:xe"/> <spring:property name="username" value="yourUserName"/> <spring:property name="password" value="yourPassword"/> <spring:property name="removeAbandoned"...

How to read mail and insert into database using Mule?

java,email,mule,javamail

I think the answers are correct, however rather than hand rolling your own solution you might be better off using the IMAP connector A sample could be like the below <flow name="incoming-orders"> <imaps:inbound-endpoint user="${mail.user}" password="${mail.password}" host="${mail.host}" port="${mail.port}"/> <logger message="#[payload]" level="INFO" doc:name="Logger" /> </flow> ...

Application is deployed on cloudhub but can't reach it

deployment,mule,cloudhub

You have the port set to 8080. CloudHub only supports incoming traffic on port 80 of your application domain URL as described here: http://www.mulesoft.org/documentation/display/current/Developing+a+CloudHub+Application#DevelopingaCloudHubApplication-ProvidinganExternalHTTPorHTTPSPort. You can use the http.port environment variable: port="${http.port}" Also set the host to 0.0.0.0 <http:listener-config port="${http.port}" host="0.0.0.0" name="http" /> ...

How read a json file with mule?

json,mule,esb

The flow was as follows: <file:inbound-endpoint connector-ref="fileConnector" path="C:/tmp/input" doc:name="File Input" responseTimeout="10000" encoding="UTF-8" mimeType="text/plain"> <file:filename-wildcard-filter pattern="*.json"/> </file:inbound-endpoint> <json:json-to-object-transformer returnClass="java.util.HashMap"doc:name="JSON to Object"/>` The error was in the JSON file. The character encoding was not right and for this reason I was generating errors when trying to transform through <json:...

Mule: Migrating to the New HTTP Connector

http,mule,cxf

The solution is: wrap your element into a processor-chain As follows: <processor-chain> <cxf:jaxws-client serviceClass="com.acme.orders.v2_0.IOrderServiceBean" port="OrderServiceBean_v2_0Port" operation="getApprovedOrderOp" /> <http:request config-ref="http.request.config" path="acme-services/OrderServiceBean_v2_0" method="POST" /> </processor-chain> This is because cxf is intercepting, so after the processor chain you would have the same object as you had in your previous solution....

Insert Arraylist in Database in Mule

arraylist,mule,esb

You don't need a Splitter or the Foreach scope. The Database connector has a bulk mode that makes the connector accept a collection as payload. Enable to submit collections of data with one query, [...]. Enabling bulk mode improves the performance of your applications as it reduces the number of...

Design of request-reply scope in mule, why does the reply section mandate a outbound endpoint

mule

The request-reply scope is a 1:1 implementation of the Request-Reply integration pattern: There are advantages in using a stable (ie non dynamic, non private) channel for replies, including the capacity to trigger the reply from any point in any flow. If you do not need this, consider using synchronous endpoints...

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

mule

You can access inbound properties as follows: import java.util.Map; import org.mule.api.MuleEventContext; import org.mule.api.MuleMessage; import org.mule.api.lifecycle.Callable; public class MyComponent implements Callable{ @Override public Object onCall(MuleEventContext eventContext) throws Exception { MuleMessage message = eventContext.getMessage(); Map uriParams = message.getInboundProperty("http.uri.params"); String name = (String) uriParams.get("name"); ... } } Where 'name' is the name of...

Mailing multiple files from inbound file connector in a single mail

mule,mule-studio,mule-el

I was able to solve it myself by implementing a small java class. Apparently the message properties weren't lost, you just couldn't see them in the debugger anymore because the debugger only shows the properties of the messageCollection that comes out of the aggregator. My flow only needs to run...

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

ftp,mule,mule-studio,mule-component

You've got the transactions wrong: the VM outbound doesn't need to be transacted, it's the VM inbound that needs to in order to trigger redeliveries in case of FTP failures. <flow name="FTPFlow1" doc:name="FTPFlow1"> <set-payload doc:name="Set Payload" value="#[payload]"/> <vm:outbound-endpoint exchange-pattern="one-way" doc:name="VM" path="doProcess" /> </flow> <flow name="FTPFlow2" doc:name="FTPFlow2"> <vm:inbound-endpoint exchange-pattern="one-way" path="doProcessMessage" doc:name="VM">...

Mule Flow not able to invoke exception strategy

mule

Either one of the following: Add "|| exception.causedBy(java.net.UnknownHostException)" to your first exception strategy to catch only unknown hosts exception. Change your second catch exception strategy into exception.causeMatches('java.net.*') to catch all network exceptions (notice the quotes). Change your second catch exception strategy into exception.causeMatches('java.*') to catch all java exceptions (notice the...

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

mule

For what it's worth this is working now (fixed it shortly after posting the question even though it's been a blocker since yesterday). If anyone else runs aground of the same issue.. I wasn't using the latest Community Edition runtime so I upgraded using the eclipse plugin install from (http://studio.mulesoft.org/r4/studio-runtimes)....

Mule: Key of a map contained in a spring bean to be constructed at runtime by concatenating from flowvar and a property in MEL

mule,mule-studio,mule-component,mule-el

Try with: queueName="#[app.registry.detail.vendor[flowVars.msVendorCode] + '${QUEUENAME}']" ...

Mule - Retry connection with basic flow

java,http,soap,exception-handling,mule

You need to wrap your HTTP call with the until-successful scope. Example: <until-successful objectStore-ref="objectStore" maxRetries="5" secondsBetweenRetries="60" > <http:request config-ref="HTTP_Request_Configuration" path="submit" method="POST" /> </until-successful> Reference: https://developer.mulesoft.com/docs/display/current/Until+Successful+Scope...

Mule - Configure dynamically an SQS Connector

mule,mule-studio

Yes, the connector supports connection management, so the connection details can either be configured globally or dynamically per operation during a flow: <sqs:config name="sqs" region="USEAST1" /> <flow name="sqs" processingStrategy="synchronous"> <sqs:send-message config-ref="sqs" accessKey="#[flowVars.accessKey]" secretKey="#[flowVars.secretKey]" queueName="#[flowVars.queueName]" queueUrl="#[flowVars.queueUrl]" /> </flow> The only global parameter that needs to be set is the region....

Mule - Exported project - Error java.io.FileNotFoundException

deployment,path,wsdl,mule

It seems you have hardcoded this path C:\Users\usrAdmin\AnypointStudio\workspace\mule-project-test\src\main\resources\wsdl-test\Request.wsdl in your configuration. Use wsdl-test/Request.wsdl instead so that way the file can be found both in Studio and when the application is packaged, as it will be loaded from the classpath (as a resource) instead of being loaded as file (via an...

Mule consuming JMS topic message

mule

It was my mistake, server was displaying the data in the console. To understand better I have modified the subscriber logger to differentiate data from publisher. <logger message="==Subscriber=#[message.payload]====" level="INFO" doc:name="Logger"/> Now the console displays: ==Subscriber====TOPIC======= ...

How get payload inside webservice class mule

soap,mule,esb

MuleContext is the active context of the running Mule application, it is unrelated to the current MuleEvent being processed by the flow. You need to get a hold of MuleEventContext via a static call to org.mule.RequestContext.getEventContext(). Yes, it is deprecated, but it still works and, to be frank, I don't...

Mule:Assigning objectstore variable value to a flowVar

mule,mule-studio,mule-component,mule-el

Take a look here: https://github.com/mulesoft/mule-module-objectstore/blob/master/src/test/resources/mule-config.xml It has examples of retrieving object store values and putting them in variables. See the "retrieveVariable" flow. Alternatively you can wrap the retrieve in an enricher....

How does Mule API Console work?

javascript,api,mule,esb

Answered Here: http://forum.mulesoft.org/mulesoft/topics/api-console-where-is-the-web-content?rfm=1 (It is within the APIKit libs)...

mule db2 sfdc account data loading

salesforce,mule

As given in the error message, I didnot included complete fields in the list which are mandatory to create/update account in sfdc. My final code is: public List<Map<String, Object>> getPayloadData(@Payload String src){ Map<String, Object> sfdcFields = new HashMap<String, Object>(); List<Map<String, Object>> accountList = new ArrayList<Map<String,Object>>(); sfdcFields.put("ID", "001m000000In0p5AAB"); sfdcFields.put("Current_WSE_Count__c", "20"); accountList.add(sfdcFields);...

Mule ExpressionRuntimeException Message payload is of type: LinkedList

mule,raml

Can you try with: #[message.payload[0]['ACCESS_TOKEN']] If this still throws an exception, please share the full ERROR not just the first line so I can refine my answer....

request-reply scope versus request-reponse exchange pattern

mule,messaging

Essentially you should go for request-response in most of the cases except in the cases where: The endpoint itself does not support request-reponse and still you want to simulate synchronicity You want to send a request to one kind of transport and expect reponse on a differnt one, i.e: send...

Mule ESB Community Standalone Runtime

mule

You can find Mule community edition standalone here :- https://developer.mulesoft.com/download-mule-esb-runtime And yes you can use the community edition standalone without any restriction...

Mule Server 3.6 > Anypoint Studio > Data Extraction

json,mule,esb,mule-studio

You could use a <transformer ref="StringToObject" returnClass="java.util.HashMap"/> Once you have a map, just access the keys. Maybe something like #[payload.billing] and #[payload.account] Basically JSON path is a little limited in Mule, so you rather transform the JSON into a HashMap and query them either using MEL or programatically. Addendum Below...

Is there a way to mock non-global filters in a sub-flow using MUnit?

mule,munit

There are to issues here mixed up. You having to wrap you sub-flow is a MUnit/Mule issue as commented here: How to mock a Java component within Mule Flow using MUnit The second issue is filter mocking. Short answer is you can not, please check: https://github.com/mulesoft/munit/issues/108 Conceptually a filter is...

Problems with sync AMQP connector in Mule

mule,amqp

Please use the lastest version of the connector released today 3.6.2. This will execute without problems the flow with request-response endpoints.

How can I access Mule ESB Community edition via browser?

amazon-web-services,amazon-ec2,mule,mule-component

If you are trying to access to the Mule Management Console (MMC), that is a separate product from Mule ESB and it is only available to manage Mule ESB Enterprise Edition. In some downloads MMC is included with Mule ESB in a bundle for testing purposes but to run in...

How to convert Date String to Calendar Date using Groovy in MarkupBuilder?

java,date,groovy,mule

Just use Date.parse().format() as below: assert Date.parse('yyyy-MM-dd HH:mm:ss', '2015-03-26 15:26:38') .format("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") == '2015-03-26T15:26:38.000Z' ...

how to retrieve particular xml element in mule

mule

Take a look at the xpath3 MEL function: http://www.mulesoft.org/documentation/display/current/Mule+Expression+Language+Reference#MuleExpressionLanguageReference-XpathandRegex Or xpath if using Mule version < 3.6: http://www.mulesoft.org/documentation/display/35X/Mule+Expression+Language+Reference <splitter expression="#[xpath3('//productsList/product', message.payload, 'NODESET')]" /> <logger level="ERROR" message=" #[xpath3('productname', payload, 'STRING')]" /> ...

Mule Import CSV into Mysql with NULL date

mule,esb,mule-studio

The problem comes from: StringUtils.split(message.payload, ',') This produces an array of strings. If the CSV is: your basic description,, it will use an empty string as the value for the date field, which I don't think is OK. If the CSV is: your basic description,NULL, it will use a string...

Mule Datamapper JSON to XML Transformation

mule,datamapper

I know you're looking for a DataMapper solution but in case you're open to alternative, below is a Groovy implementation (since DataMapper is going away, now that Weave is coming, you should be open for options right?). <json:json-to-object-transformer returnClass="java.lang.Object" /> <scripting:transformer> <scripting:script engine="groovy"><![CDATA[ def writer = new StringWriter() def xml...

How to combine two JSON in MULE?

json,mule

That depends on how you are getting the payload from different source .. for example if you are using Scatter-Gather and getting the payload from 2 different source in parallel, you can easily use <combine-collections-transformer doc:name="Combine Collections"/> or <collection-aggregator failOnTimeout="true" doc:name="Collection Aggregator"/> to combine both the JSON into one payload.....

How to increase the DB connection Timeout

mule,mule-studio,mule-component

maxWaitMillis attribute in db pooling profile is the number of milliseconds a client calling getConnection() will wait for a Connection to be checked-in or acquired when the pool is exhausted. Zero means wait indefinitely. The other timeout value is the connection timeout which the amount of time a database connection...

Using Arraylist in Mule to query Salesforce

java,salesforce,mule,esb

Unfortunately, you can't use ArrayLists as parameters in Salesforce (or Database) queries. You'll have to create the query dynamically with a script component. Try this: <scripting:script engine="Groovy"> <![CDATA[def sb = new StringBuilder() sb.append('Select Id,Billing_Number__c from Call_Log__c') if (flowVars.successlist != null && !flowVars.successlist.empty) { sb.append(' where Id in (\'') for (i...

Mule TransformerException: An invalid return type “class [B” was specified for transformer “JAXBMarshallerTransformer”

java,soap,mule

I Found the answer: You just need to add a transformer in response tag after calling web service, like: <response> <data-mapper:transform config-ref="Pojo_To_XML" doc:name="Pojo To XML"/> <logger message="#[payload]" level="INFO" doc:name="Logger"/> </response> and the new mule flow will be like this: ...

Can no longer build Mule projects due to closure of Codehaus

maven,mule

As already mentioned, setting up a Mirror in your Maven settings.xml will fix it. Just to be a bit more explicit, this is what I added to workaround the issue: <mirror> <id>mule-codehaus-mirror</id> <mirrorOf>codehaus-mule-repo,codehaus-releases,codehaus-snapshots</mirrorOf> <name>Mule Codehaus Mirror</name> <url>https://repository.mulesoft.org/nexus/content/repositories/public</url> </mirror> ...

Mule xpath fails with Message payload is of type: String

mule,mule-studio,mule-el

The root cause of the error is: Error: null pointer or function not found: xpath3 So it's not related to the payload being a string at all but instead to the fact that Mule doesn't recognize xpath3 as a valid function. XPath 3 has been added to Mule 3.6.0 so...

Mule OAuth Provider Accesstoken expiry time

oauth,mule

I have found the answer it is 86400 seconds which is 24 hours. Link to the documentation is here, however the description for Token Ttl Seconds is misleading, It should be seconds instead of milliseconds. I have logged a jira for the same here

Revoking OAuth tokens in Mule

oauth-2.0,mule

This is what Mulesoft had to say for the query. Unfortunately, current code does not have(or expose) the methods to: revoke all tokens granted to a user get all tokens granted to a user They have decided to log an enhancement for this and that will take its due course,...

Mule flow adding weird characters to beginning of file

encoding,utf-8,mule

So it seems to be an issue with Mule 3.5.0, when I upgraded to 3.6.1 the issue went away. Still not sure what was causing it, but the version change solved it.

FunctionalTestCase Mule 3.6.0

unit-testing,mule

MuleClient has a new method now to specify the request options, including the method to be used. This is: send(String url, MuleMessage message, OperationOptions operationOptions). The operationOptions can be created in many ways, one of which is: newOptions().method("POST").build() to make a POST request. An example of this can be found...

How to route in Mule ESB using request path

java,xml,mule

You can use the following path="/*" and I have modified your flow as following:- <flow name="Tickets"> <http:listener config-ref="HTTP_Listener_Configuration" path="/*" doc:name="HTTP"/> <logger message="#[message.inboundProperties.'http.listener.path']" level="INFO" doc:name="Logger"/> <choice doc:name="Choice"> <when expression="#[message.inboundProperties.'http.request.path'.contains('/getTicketByTicketCode')]"> <logger message="getTicketByTicketCode flow" level="INFO" doc:name="Logger"/>...

Mule HTTPS Listener won't respond

ssl,mule,keystore

You are doing everything correctly. Just click on the link https://localhost:8080/ from your browser first so that you add the unsigned certificate to your local machine and everything will work fine. You can use Postman or DHC to access your service afterwards. in Chrome click on Advanced -> Proceed to...

Mule getting data from ConsumerIterator

mule

The message payload after sfdc:query is an instance of org.mule.streaming.ConsumerIterator, which implements java.util.Iterator. Therefore there's no reason to call iterator() on it, it is already an iterator. Moreover hasNext returns a boolean, not an Iterator instance, so you can't chain the calls as you did. Your expression should thus be:...

Mule:Retrieving object store in an MEL in Mule 3.5

mule,mule-studio,mule-component,mule-el

The main issue is that you are embedding MEL into MEL which can't work. Also the boolean-as-string comparison is dodgy. Replace this: #[app.registry.storeDownload.contains('#[flowVars.startKey]').equals('false')] with that: #[!(app.registry.storeDownload.contains(flowVars.startKey))] ...

Message enricher and MEL

mule,mel

#[variable:state] is the old expression syntax, it's deprecated and replaced by MEL since 3.3. I think the MEL equivalent is #[flowVars.state] Similarly, message "headers" is obsolete lingo. You have message properties with different scopes (inbound, outbound, flow/invocation and session). And yes the only properties you can set in a flow...

getting file from sfdc with mule

salesforce,mule

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...

How to write dependent queries in MULE CE?

mule,esb,mule-component

You need to use an outbound select query for your second query, like: <jdbc:outbound-endpoint queryKey="SelectSomeBR" connector-ref="ProConnector" doc:name="SomeBRFromPro" pollingFrequency="1000" queryTimeout="-1" exchange-pattern="request-response"> <jdbc:transaction action="NONE" timeout="10" /> <jdbc:query key="SelectSomeBR" value="SELECT * from table2 where IsProcessed = 0 and ParentID = #[map-payload:ID]" /> <jdbc:query key="SelectSomeBR.ack" value="update table2 set IsProcessed=1 where ParentID = #[map-payload:ID] "...

Mule 3.6.1 and Logentries using log4j2

mule,mule-studio,log4j2,logentries

Actually, I found out what was wrong. The problem was here: compile group: 'com.logentries', name: 'logentries-appender', version: 'RELEASE' This downloaded the following jar: file:/C:/Projects/tralala/.mule/apps/ws-comaround-cfx/lib/logentries-appender-1.1.20.jar which do not include the support for log4j2! I had to change to compile group: 'com.logentries', name: 'logentries-appender', version: '1.1.30' 1.1.30 version includes the log4j2 support....

Mule Queued-Asynchronous Flow Queue vs. VM Queue

mule,message-queue

These are two very different concepts, one is based on the way a flow is processed and the other is a lightweight queuing mechanism. VM is a transport and it has persistent queuing capabilities as well as transactions. Please see (the last link to understand the flow execution model): http://www.mulesoft.org/documentation/display/current/Flow+Processing+Strategies...

Which mule transports does the re-connection strategy work with

mule

Most of the lengthy discussion comes from the confusion between reconnection and retry: the former acts at connector/endpoint level and ensures that endpoints keep working (poller polls, listeners listen, dispatchers dispatch), the latter acts at message level and ensures that no message gets lost in an endpoint. In the case...

Mulesoft Anypoint Studio DevKit - @Connector vs @Module ( No need for config-ref )

mule,mule-studio,mule-component

With Anypoint Devkit 3.6, the "config-ref" attribute on elements became required, so you NEED to create a global element definition for your connector. As far as I know, there isn't a way to get around this at this point. HTH...

How to save the response from a HTTP call until successs in Mule?

mule,mule-component

You need to process it synchronously. Check out the Synchronous Until-Successful section here

Where can I download MuleSoft Community Edition?

mule,esb,mule-studio

This is the CE download site.

Mule ESB 3.6 Object To XML not working correctly after Database Connector

xml,mule,mule-studio

Success! After a lot of mucking around (and a crash course in learning XML with Java) and taking Eddu's post above, I was able to create a custom transformer. Changed the 'Object to XML' transformer to a 'Java' transformer in my flow. Created Class SQLCustomerToXML (ensuring return type of String)....

Sending detailed email of exception in Mule ESB using SMTP connector

xml,mule,mule-el

In flow Level, please provide the variableName = url alone(Not as flowVars.url). When accessing it in Catch Exception Strategy set as #[flowVars.url] or #[flowVars['url']].

Mule AMQP connector fails trying to requeue message

mule,amqp,mule-component

As you have noted in your comment, the smtp:outbound-endpoint being a one-way endpoint, its dispatch operation is performed in another thread, thus it occurs in parallel with the execution of the flow. Therefore, amqp:acknowledge-message gets called anyway, independently of the success or failure of the smtp:outbound-endpoint operation. You can get...

Explanation and example for use of ackExpression in Until Successful Scope

mule

until-successful default operation mode is asynchronous. The ackExpression allows you to synchronously produce a response payload to the inbound event.

Dynamic address for HTTP inbound endpoint Mule

mule,mel

Use a Spring Expression (SPeL) instead: <http:inbound-endpoint exchange-pattern="request-response" address="#{appversion.getNewAddress()}" doc:name="HTTP"/> ...

Mule comparing map keys in choice

mule

Your expression is evaluated against the map entry value not the key itself. If you want to check that a map contains a specific key, you could use the keySet or you could just use a simple null check : <when expression="#[payload.keySet().contains('key1')]"> or <when expression="#[message.payload['key1'] != null]"> ...

Change the prefix in CXF with interceptor

soap,cxf,mule,mule-studio

After some testing around, it worked. It might seem very stupid and my jaw dopped a couple of times, I restarted, cleared all cash, re-built and it seems like the interceptor works WHEN I add an extra line, which is unbelievable, I know: package se.comaround.interceptors; import java.util.HashMap; import java.util.Map; import...

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

mule,mule-studio,mule-component,mule-el

The default value is 5 retries. You can change this value with the maxRetries attribute on the until-successfull scope, for ex: maxRetries="10" This value is an integer so its max value is 2147483647...

How to add namespaces and prefixes to elements using Groovy Markup Builder

xml,soap,groovy,mule

Below implementation can be useful: def entityNs = [ 'xmlns:ns1': "http://schemas.datacontract.org/2004/07/PivotalService.Entities" ] Continue with what you have above, with changes like: .... "ns1:Email"(entityNs, 'foo') "ns1:Firstname"(entityNs, 'Bar') .... ...

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

mule

After a fair bit of looking around this is what I have found... numberOfConcurrentTransactedReceivers is important and undocumented !! The behavior depends on the connector it is being used with, so this may not be a complete answer, however it is my attempt at starting something. I am happy to...

Mule ESB, Synchronize custom java class within flow

java,multithreading,mule,esb,mule-studio

I synchronize all methods in my class and solve the problem. Thanks everyone for assistance.

Anypoint studio/Mule hangs during startup

mule,mule-studio

I find the solution. By clearing cache for Mule/ Anypoint Studio it works. ./AnypointStudio /JAVA_HOME/bin/ -clean ...

Mule - Throw Exception with until-successful

java,exception,soap,exception-handling,mule

With the partial information you have provided, all I can say is that the source of the problem is located in: <spring-object bean="testIntegration" /> based on: Component that caused exception is: DefaultJavaComponent{Flow_test.component.1805940825} The main issue is that Mule can't locate a method to call on your custom component: there are...

Get XML from URL with Mule

xml,http,mule,flow

You don't need to transform anything in http inbound endpoint inorder to get data... if you post certain data to this flow using a Rest client or postman, you will automatically get that data in you flow and can print it in logger. You just need to post data from...

Getting Exception “Failed to load transport: org/mule/transport D”

java,junit,mule,junit4,junit3

You're probably missing the file transport JAR in your build path.

Mule: How to configure custom component factory?

mule,mule-component

Use Spring to instantiate your component from the custom factory and refer to the created bean with: <component> <spring-object bean="yourBean"/> <component> Reference: http://www.mulesoft.org/documentation/display/current/Using+Spring+Beans+as+Flow+Components...