SlideShare a Scribd company logo
1 of 12
Mule with Drools
Drools : Drools is a Business Rules Management System (BRMS) solution. It provides a core Business Rules
Engine (BRE).
Drools supports the JSR-94 standard for its business rule engine and enterprise framework for the
construction, maintenance, and enforcement of business policies in an organization, application, or service.
Mule have Drools component to execute business rules in it’s application
Now, let us create a simple application in our Anypoint studio. This application we will be
deploying and running in our Mule Standalone Server and will be using Business rules in our
Mule application using Drools
We need to keep a .drl files in our application where all the business rules will be
defined .. In our case all the business rules are in this routingRules.drl file:-
Rules in the routingRules.drl are defined as follows:-
You can see the rules that if weight variable value is less than or equal to 50 then WAREHOUSE_B will b
as printed as destination or else WAREHOUSE_A will be printed
You can see Mule code that the variable weight is generated randomly and the value of the weight is
been checked by the Drools component which is referring routingRules.drl where all the rules are set :-
You can see the value in weight variable is generated randomly and the destination
value is set to WAREHOUSE_B as defined in .drl file
Now we test our application by hitting http://localhost:8082/example and we will get
the following:-
You can see the value in weight variable is again generated randomly and the
destination value is set to WAREHOUSE_A as the weight value is greater than 50 and
the rules are defined in .drl file
Now we hit the url http://localhost:8082/example again and we will get the
following:-
In my next slide I will bring some other techniques in Mule implementation .
Hope you have enjoyed this simpler version.
Keep sharing your knowledge and let our Mule community grow 
Mule with drools

More Related Content

What's hot (10)

Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
 
Mule ESB - How to convert from Xml to Json in 5 minutes
Mule ESB - How to convert from Xml to Json in 5 minutesMule ESB - How to convert from Xml to Json in 5 minutes
Mule ESB - How to convert from Xml to Json in 5 minutes
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
 
Mule xml transformation
Mule xml transformationMule xml transformation
Mule xml transformation
 
Groovy in Mule
Groovy in MuleGroovy in Mule
Groovy in Mule
 
Velocity in Mule
Velocity in MuleVelocity in Mule
Velocity in Mule
 
Spicing your mule response
Spicing your mule responseSpicing your mule response
Spicing your mule response
 
Idempotent filter in Mule
Idempotent filter in MuleIdempotent filter in Mule
Idempotent filter in Mule
 
Mule velocity
Mule velocityMule velocity
Mule velocity
 
Idempotent filter with simple file
Idempotent filter with simple fileIdempotent filter with simple file
Idempotent filter with simple file
 

Viewers also liked

Viewers also liked (19)

Anypoint platform highlights
Anypoint platform highlightsAnypoint platform highlights
Anypoint platform highlights
 
Connecting to external_application
Connecting to external_applicationConnecting to external_application
Connecting to external_application
 
Mule - HTTP Listener
Mule - HTTP ListenerMule - HTTP Listener
Mule - HTTP Listener
 
BigQueryDeveloper
BigQueryDeveloperBigQueryDeveloper
BigQueryDeveloper
 
Mule soa
Mule soaMule soa
Mule soa
 
Mule esb dataweave
Mule esb dataweaveMule esb dataweave
Mule esb dataweave
 
Mule Integration with Dropbox
Mule Integration with DropboxMule Integration with Dropbox
Mule Integration with Dropbox
 
AMAG Forrester about SAP & Lean Enterprise Architecture Management using LeanIX
AMAG Forrester about SAP & Lean Enterprise Architecture Management using LeanIXAMAG Forrester about SAP & Lean Enterprise Architecture Management using LeanIX
AMAG Forrester about SAP & Lean Enterprise Architecture Management using LeanIX
 
CRM on Demand for Higher Education: CRM for the Entire Constituent Life Cycle...
CRM on Demand for Higher Education: CRM for the Entire Constituent Life Cycle...CRM on Demand for Higher Education: CRM for the Entire Constituent Life Cycle...
CRM on Demand for Higher Education: CRM for the Entire Constituent Life Cycle...
 
Behind the scenes with Docker volume plugins
Behind the scenes with Docker volume pluginsBehind the scenes with Docker volume plugins
Behind the scenes with Docker volume plugins
 
Dockercon 16 Wrap-up (Docker for Mac and Win, Docker 1.12, Swarm Mode, etc.)
Dockercon 16 Wrap-up (Docker for Mac and Win, Docker 1.12, Swarm Mode, etc.)Dockercon 16 Wrap-up (Docker for Mac and Win, Docker 1.12, Swarm Mode, etc.)
Dockercon 16 Wrap-up (Docker for Mac and Win, Docker 1.12, Swarm Mode, etc.)
 
LeanIX Enterprise Architecture Management - Release Notes 3.4
LeanIX Enterprise Architecture Management - Release Notes 3.4 LeanIX Enterprise Architecture Management - Release Notes 3.4
LeanIX Enterprise Architecture Management - Release Notes 3.4
 
Message enricher in mule
Message enricher in muleMessage enricher in mule
Message enricher in mule
 
Mule real-world-old
Mule real-world-oldMule real-world-old
Mule real-world-old
 
Rethink! How Digital Transformation disrupts Enterprise Architecture
Rethink! How Digital Transformation disrupts Enterprise ArchitectureRethink! How Digital Transformation disrupts Enterprise Architecture
Rethink! How Digital Transformation disrupts Enterprise Architecture
 
Front end architecture
Front end architectureFront end architecture
Front end architecture
 
Exemplo caso de uso(Mulesoft)
Exemplo caso de uso(Mulesoft)Exemplo caso de uso(Mulesoft)
Exemplo caso de uso(Mulesoft)
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Google Cloud Dataflow
Google Cloud DataflowGoogle Cloud Dataflow
Google Cloud Dataflow
 

Similar to Mule with drools

Drupal theming training
Drupal theming trainingDrupal theming training
Drupal theming training
dropsolid
 
Mysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-enMysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-en
chadambrosius
 

Similar to Mule with drools (20)

Drools in mule
Drools in muleDrools in mule
Drools in mule
 
Integrating DROOLS With Mule ESB
Integrating DROOLS With Mule ESBIntegrating DROOLS With Mule ESB
Integrating DROOLS With Mule ESB
 
Cloudhub and Mule
Cloudhub and MuleCloudhub and Mule
Cloudhub and Mule
 
Drupal
DrupalDrupal
Drupal
 
One Div To Save Them All: Controlling Drupal Div's and Implementing a Modular...
One Div To Save Them All: Controlling Drupal Div's and Implementing a Modular...One Div To Save Them All: Controlling Drupal Div's and Implementing a Modular...
One Div To Save Them All: Controlling Drupal Div's and Implementing a Modular...
 
Dn D Custom 1
Dn D Custom 1Dn D Custom 1
Dn D Custom 1
 
Dn D Custom 1
Dn D Custom 1Dn D Custom 1
Dn D Custom 1
 
Simple Odoo ERP auto scaling on AWS
Simple Odoo ERP auto scaling on AWSSimple Odoo ERP auto scaling on AWS
Simple Odoo ERP auto scaling on AWS
 
Drupal theming training
Drupal theming trainingDrupal theming training
Drupal theming training
 
MySQL Devops Webinar
MySQL Devops WebinarMySQL Devops Webinar
MySQL Devops Webinar
 
Mule connectors-session1
Mule connectors-session1Mule connectors-session1
Mule connectors-session1
 
SEO for drupal
SEO for drupalSEO for drupal
SEO for drupal
 
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
UAE MySQL Users Group Meet-up : MySQL Shell Document Store & more...
 
Rspec
RspecRspec
Rspec
 
Drools & jBPM Info Sheet
Drools & jBPM Info SheetDrools & jBPM Info Sheet
Drools & jBPM Info Sheet
 
Drupal 8 Configuration Management for you and your team
Drupal 8 Configuration Management for you and your teamDrupal 8 Configuration Management for you and your team
Drupal 8 Configuration Management for you and your team
 
Understanding Juju Charms
Understanding  Juju CharmsUnderstanding  Juju Charms
Understanding Juju Charms
 
Mysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-enMysql tutorial-excerpt-5.1-en
Mysql tutorial-excerpt-5.1-en
 
Introduction of drupal7 by ayushi infotech
Introduction of drupal7 by ayushi infotechIntroduction of drupal7 by ayushi infotech
Introduction of drupal7 by ayushi infotech
 
SEO for drupal
SEO for drupalSEO for drupal
SEO for drupal
 

More from Rajkattamuri (20)

Github plugin setup in anypointstudio
Github plugin setup in anypointstudioGithub plugin setup in anypointstudio
Github plugin setup in anypointstudio
 
For each component in mule
For each component in muleFor each component in mule
For each component in mule
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
 
File component in mule
File component in muleFile component in mule
File component in mule
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mule
 
Choice component in mule
Choice component in mule Choice component in mule
Choice component in mule
 
WebServices
WebServicesWebServices
WebServices
 
Java Basics in Mule
Java Basics in MuleJava Basics in Mule
Java Basics in Mule
 
WebServices Basic Overview
WebServices Basic OverviewWebServices Basic Overview
WebServices Basic Overview
 
Java For Begineers
Java For BegineersJava For Begineers
Java For Begineers
 
Java Basics
Java BasicsJava Basics
Java Basics
 
WebServices Basics
WebServices BasicsWebServices Basics
WebServices Basics
 
Core java
Core javaCore java
Core java
 
WebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDIWebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDI
 
Web services soap
Web services soapWeb services soap
Web services soap
 
Web services wsdl
Web services wsdlWeb services wsdl
Web services wsdl
 
Web services uddi
Web services uddiWeb services uddi
Web services uddi
 
Maven
MavenMaven
Maven
 
Mule with quartz
Mule with quartz Mule with quartz
Mule with quartz
 
Mule with rabbitmq
Mule with rabbitmqMule with rabbitmq
Mule with rabbitmq
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Mule with drools

  • 2. Drools : Drools is a Business Rules Management System (BRMS) solution. It provides a core Business Rules Engine (BRE). Drools supports the JSR-94 standard for its business rule engine and enterprise framework for the construction, maintenance, and enforcement of business policies in an organization, application, or service.
  • 3.
  • 4. Mule have Drools component to execute business rules in it’s application
  • 5. Now, let us create a simple application in our Anypoint studio. This application we will be deploying and running in our Mule Standalone Server and will be using Business rules in our Mule application using Drools
  • 6. We need to keep a .drl files in our application where all the business rules will be defined .. In our case all the business rules are in this routingRules.drl file:-
  • 7. Rules in the routingRules.drl are defined as follows:- You can see the rules that if weight variable value is less than or equal to 50 then WAREHOUSE_B will b as printed as destination or else WAREHOUSE_A will be printed
  • 8. You can see Mule code that the variable weight is generated randomly and the value of the weight is been checked by the Drools component which is referring routingRules.drl where all the rules are set :-
  • 9. You can see the value in weight variable is generated randomly and the destination value is set to WAREHOUSE_B as defined in .drl file Now we test our application by hitting http://localhost:8082/example and we will get the following:-
  • 10. You can see the value in weight variable is again generated randomly and the destination value is set to WAREHOUSE_A as the weight value is greater than 50 and the rules are defined in .drl file Now we hit the url http://localhost:8082/example again and we will get the following:-
  • 11. In my next slide I will bring some other techniques in Mule implementation . Hope you have enjoyed this simpler version. Keep sharing your knowledge and let our Mule community grow 