It is a good practice to monitor your service and check whether it is available and/or is performing as expected. To do this, we need to specify what the service’s health term means. In this article, I will present two different definitions. However, keep in mind that you can have your own project’s specific definition. All…
Mule 4.x
How to convert decimal number into integer using DataWeave
This article is about converting decimal numbers into integer ones. This may seem tricky at first. You may say that we do not need to do anything special and the DataWeave engine will handle it underneath. However, there is a nuance that you should be aware of. In transformation to XML, this may not actually…
Mule 4 new Java Module
In one of my previous posts I described Java Component and entry point resolvers as a way to invoke Java Code in Mule 3.x. In this article I will focus on completely new approach in Mule 4. Mule presents brand new Java Module capable of creating new instances, invoking methods on those instances and invoking static methods. Although you can invoke Java using DataWeave 2.0 and Groovy scripting you are losing additional metadata (DataSense). So lets walk through some sample application.
How to avoid repetition in DataWeave for conditional checks?
Tip number 1 will be about data existence check. There is often a situation that nearly the same conditions need to be checked in every line. I have seen many transformations that were really long and complex. Reading them was not only difficult but a lot of repeatable conditional checks were made. Here I will…
Cache or not to cache
For high-workload application it is important to manage resources efficiently. One of the tricks that can save resource usage is caching. In RESTful services this technic is used in GET methods. However it may by used in other cases when operation of getting particular resource can be reused. In this blog post I will extend previously design rest service by adding caching to two operations. Mule uses Cache Scope component. Apart from describing it I will show you possible obstacles and how to handle them.
Implement simple GET operations using Flow Designer
HTTP GET method’s simple design has been published in a previous article. I designed the account service using the RAML specification. It is time, now, to implement that service so our potential users could consume it. To implement the service I use Flow Designer available on Anypoint Platform. To follow my steps you wouldn’t need…
Best practices to design REST GET method on Anypoint Platform
This article is an intro to a blog series about HTTP methods usage in RESTful services. As a GET is the most common, I will start with it. This method is used for retrieving the collection of resources or a single resource. In other words, GET can be used for searching purposes. However, the more…