During transformation to JSON often I do not want null properties. It is easy to remove them, by just using skipNullOn attribute. However for empty objects it is not that trivial, especially when you have to deal with many such cases within one transformation. In this article I will show you how you can achieve this quick and easy.
Content Enricher is definitely an useful integration pattern. It allows easily enrich message content with new data gathered from external resource. In vast majority of Mule’s apps I have been using Message Enricher Component. Today I will point main differences in Mule 3.x and Mule 4.x regarding this element. Content Enricher pattern When you think…
In this brief article I will describe the problem and solution that I have lately faced. As it is a good practice not to hard-code connection data I have extracted them to external file called connection.properties. I did not expect to receive an error something like $[smtp.host]. I did not know what it can means. Below I have described what it is.
After I have passed mule Integration Professional exam I got a lot of questions from the community. What materials did I use? What are the main points to learn. What to expect on the exam. I have decided to share some of my experience with the certification. In this blog’s post you can find all materials that I have used.
Raml 1.0 introduces new concept called DataType. This fragment is used to declare type in a separate yaml file. This is not just a simplification of JSON schema to conform raml/yaml. It also brings simple improvements and syntax sugar that allows to write types in more concise form. And therefore more readable. In this article we will look at how to define own data types and reuse them in API and its implementation
In the 3rd tip I have described nuisance with casting to integer value. This time we will look at really large numbers and their formatting. In addition I will mention scientific notation. All these topic are around number format used by DataWeave engine. So let’s see what the problem looks like. Problem This problem may…
Errors occurs all the time. All you can do is to implement error handling. In this article I will describe how to use introduced layer of abstraction in exceptions area. Prior to Mule 4, developer only could access raw Java exception as Mule is a Java based ESB. This lead to situation where you, as a developer, needed analyse documentation to find exact exception that you would like to handle. Now an Error concept was introduced.
Anyone who has designed RESTfull API appreciate API Kit Router available in Mule. It not only generates flows based on API definition but also route and validate messages. Our flows looks more concise and easy to read. This feature is available for both Community and Enterprise editions. For SOAP Web Services SOAP Router is available. However this time this utility works only for Enterprise Edition. Some time ago I developed a couple of services on Mule Community Edition. All services have WSDL contracts and I must say that when I now think about the implementation I would appreciate such router. So I have decided to write something similar that would work for Mule CE.
There are time when you need to get one particular element from an array, but not based on the index. This item needs to fulfill some requirements like equality and so on. In order to perform that task selector ? was introduced. This is applicable for both DataWeave 1.0 and 2.0.
I have already presented how to call Java code using messages processors with the newest Java Module for Mule 4.x. For earlier mule’s version Entry Point Resolvers were used to invoke custom Java code. However for scenarios when we would like to use custom code in DataWeave, for transformations, another approach is needed. Approach presented in this article will be more concise comparing to using message processors. It was highly extended comparing to possibilities of Mule 3.x version. Mule 3 allowed to invoke static methods. In contract Mule 4 not only permits to call static methods but also instantiate classes and access its instance attributes.