From the technical center of excellence of Massil Technologies, our technology leaders make it easy to understand the complex situations you come across in Mule ESB from the experience of Massil Technologies to have countered them in their experience of working on client projects in real time. This blog introduces the role of Quartz Connector in Mule ESB. This blog is a part of series of blogs being authored and published by Massil Technologies for the benefit of the IT community globally.
One of our clients has a quartz schedule flow which should run only once the initial flow is completed. The solution to this has been provided by Massil Technologies team by utilizing Quartz Connector.
What is Quartz Connector?
When you are scheduling tasks in Mule ESB, it is recommended that you make use of Poll Scope. Quartz Connector supports the scheduling of programmatic events, both inside and outside your Mule ESB flow. Through a quartz endpoint, you can trigger flows that don’t depend on receiving an external input to execute at scheduled times.
For example, an inbound Quartz endpoint can trigger inbound events, such as temperature reports from a remote location, at regular intervals.
Outbound Quartz endpoints can delay otherwise imminent events. For example, you can prevent outgoing email from being sent as soon as it has completed processing in your Mule flow. Instead, you can use Quartz to delay sending it until the top of the next hour.
Now addressing the client requirement, we did the following steps
Create a project and search Quartz connector in Mule ESB Palette and drag it into the Message flow.
Create initial flow which is to be run only once as per requirement and configure the quartz as shown below:
Search Expression in Mule ESB Palette and drag it to the Message flow. In expression write code to execute Periodic flow.
Create a Periodic flow which is to be executed continuously or as for our requirement as follows
Create a sub-flow which is to be executed continuously and add something to it to be executed.
Call the sub-flow from periodic flow by using flow reference as given below:
At this step, you get to see the complete flow.
Run the project & see the Results after successful deployment.
Hence, we have gone through the step by step process to depict the way Massil Technologies team has addressed the client need. Hope this article from Massil Technologies was useful for you. If you have any further queries on this topic, please reach out to firstname.lastname@example.org.